Class: Langchain::LLM::AwsTitanResponse
- Inherits:
-
BaseResponse
- Object
- BaseResponse
- Langchain::LLM::AwsTitanResponse
- Defined in:
- lib/langchain/llm/response/aws_titan_response.rb
Instance Attribute Summary
Attributes inherited from BaseResponse
#context, #model, #raw_response
Instance Method Summary collapse
Methods inherited from BaseResponse
#chat_completion, #chat_completions, #completion, #completion_tokens, #completions, #created_at, #initialize, #total_tokens
Constructor Details
This class inherits a constructor from Langchain::LLM::BaseResponse
Instance Method Details
#embedding ⇒ Object
5 6 7 |
# File 'lib/langchain/llm/response/aws_titan_response.rb', line 5 def &.first end |
#embeddings ⇒ Object
9 10 11 |
# File 'lib/langchain/llm/response/aws_titan_response.rb', line 9 def [raw_response.dig("embedding")] end |
#prompt_tokens ⇒ Object
13 14 15 |
# File 'lib/langchain/llm/response/aws_titan_response.rb', line 13 def prompt_tokens raw_response.dig("inputTextTokenCount") end |