OllamaEmbeddingProvider
org.llm4s.llmconnect.provider.OllamaEmbeddingProvider
object OllamaEmbeddingProvider extends EmbeddingProviderDescriptor
Embedding provider implementation for Ollama, a local model inference server.
Generates text embeddings by calling the Ollama /api/embeddings HTTP endpoint. Each input text is embedded individually (one HTTP request per text) because the Ollama embedding API accepts a single prompt per call. Results are collected and returned as an org.llm4s.llmconnect.model.EmbeddingResponse.
No API key is required when Ollama runs locally, though one can be supplied for remote or authenticated deployments.
Ollama's entry in the embedding half of the provider SPI.
It shares the ollama id with OllamaProvider's chat client - the two namespaces are separate - so EMBEDDING_MODEL=ollama/nomic-embed-text and LLM_MODEL=ollama/llama3 name the same provider.
Attributes
- Graph
-
- Supertypes
- Self type
Members list
In this article