org.llm4s.llmconnect.provider.CohereInputType
See theCohereInputType companion object
The Cohere input_type: which side of retrieval a text is on.
Cohere's v3 and v4 models embed a query and a document differently, so a mismatch between how texts were indexed and how a query is embedded quietly degrades retrieval. A request says which it is with its org.llm4s.llmconnect.model.InputPurpose, and the provider maps it onto SearchQuery or SearchDocument by itself, not guessed from the number of inputs or encoded in the model name. An input type the purpose cannot express (Classification, Clustering) is a typed setting of the provider: pass it to CohereEmbeddingProvider.fromConfig, where it takes precedence over the purpose of every request.
Value parameters
- wireName
-
the value sent as
input_typein the request body
Attributes
- Companion
- object
- Source
- CohereEmbeddingProvider.scala
- Graph
-
- Supertypes
Members list
In this article
