feat(llm): Add support for Ollama LLM (#1526)

This commit is contained in:
Ygal Blum 2024-02-09 16:50:50 +02:00 committed by GitHub
parent b178b51451
commit 6bbec79583
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 53 additions and 1 deletions

View file

@ -80,3 +80,10 @@ class LLMComponent:
)
case "mock":
self.llm = MockLLM()
case "ollama":
from llama_index.llms import Ollama
ollama_settings = settings.ollama
self.llm = Ollama(
model=ollama_settings.model, base_url=ollama_settings.api_base
)