MCPcopy
hub / github.com/stitionai/devika / __init__

Method __init__

src/llm/ollama_client.py:9–17  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

7
8class Ollama:
9 def __init__(self):
10 try:
11 self.client = ollama.Client(Config().get_ollama_api_endpoint())
12 self.models = self.client.list()["models"]
13 log.info("Ollama available")
14 except:
15 self.client = None
16 log.warning("Ollama not available")
17 log.warning("run ollama server to use ollama models otherwise use API models")
18
19 def inference(self, model_id: str, prompt: str) -> str:
20 response = self.client.generate(

Callers

nothing calls this directly

Calls 4

ConfigClass · 0.90
infoMethod · 0.80
warningMethod · 0.80

Tested by

no test coverage detected