jack 11 сар өмнө
parent
commit
71ef35dfee
1 өөрчлөгдсөн 3 нэмэгдсэн , 2 устгасан
  1. 3 2
      api_ollama.py

+ 3 - 2
api_ollama.py

@@ -2,8 +2,9 @@
 import time
 from ollama import Client as oClient
 
-class ChatBot:
-    def call_ollama(self, host, messages, model='llava:13b', temperature=0.4):
+class OllamaChat(object):
+    def call_ollama(self, host, text, prompt_words, model='llava:13b', temperature=0.4):
+        messages = text + '\n\n' + prompt_words
         self.client = oClient(host=host)
         self.model = model
         self.messages = messages