Module: LLM::VoyageAI::ResponseParser
- Defined in:
- lib/llm/providers/voyageai/response_parser.rb
Instance Method Summary collapse
Instance Method Details
#parse_embedding(body) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/llm/providers/voyageai/response_parser.rb', line 5 def (body) { model: body["model"], embeddings: body["data"].map { _1["embedding"] }, total_tokens: body.dig("usage", "total_tokens") } end |