summaryrefslogtreecommitdiff
path: root/rag/generator/ollama.py
diff options
context:
space:
mode:
Diffstat (limited to 'rag/generator/ollama.py')
-rw-r--r--rag/generator/ollama.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/rag/generator/ollama.py b/rag/generator/ollama.py
index 77f8304..b72d763 100644
--- a/rag/generator/ollama.py
+++ b/rag/generator/ollama.py
@@ -39,12 +39,3 @@ class Ollama(metaclass=AbstractGenerator):
metaprompt = self.__metaprompt(prompt)
for chunk in ollama.generate(model=self.model, prompt=metaprompt, stream=True):
yield chunk["response"]
-
- def chat(
- self, prompt: Prompt, messages: List[Dict[str, str]]
- ) -> Generator[Any, Any, Any]:
- log.debug("Generating answer with ollama...")
- metaprompt = self.__metaprompt(prompt)
- messages.append({"role": "user", "content": metaprompt})
- for chunk in ollama.chat(model=self.model, messages=messages, stream=True):
- yield chunk["message"]["content"]