add: 添加ollama调用AI chat逻辑
This commit is contained in:
@@ -19,7 +19,7 @@ class Ollama(Platform):
|
|||||||
|
|
||||||
async def create_chat_completion(self, plugin: Plugin, evt: MessageEvent) -> ChatCompletion:
|
async def create_chat_completion(self, plugin: Plugin, evt: MessageEvent) -> ChatCompletion:
|
||||||
full_context = []
|
full_context = []
|
||||||
context = maubot_llmplus.platforms.get_context(plugin, evt)
|
context = await maubot_llmplus.platforms.get_context(plugin, evt)
|
||||||
full_context.extend(list(context))
|
full_context.extend(list(context))
|
||||||
|
|
||||||
endpoint = f"{self.url}/api/chat"
|
endpoint = f"{self.url}/api/chat"
|
||||||
|
|||||||
Reference in New Issue
Block a user