add: 添加ollama调用AI chat逻辑
This commit is contained in:
@@ -17,6 +17,7 @@ platforms:
|
||||
api_key:
|
||||
model: llama3.2
|
||||
max_words: 1000
|
||||
max_context_messages: 100
|
||||
openai:
|
||||
url:
|
||||
api_key:
|
||||
|
||||
@@ -3,7 +3,6 @@ id: cn.tayxie.llmplus
|
||||
version: 1.0.0
|
||||
license: MIT
|
||||
modules:
|
||||
- maubot_platform
|
||||
- maubot_llmplus
|
||||
main_class: AiBotPlugin
|
||||
config: true
|
||||
|
||||
@@ -7,9 +7,9 @@ from mautrix.types import Format, TextMessageEventContent, EventType, MessageTyp
|
||||
from mautrix.util import markdown
|
||||
from mautrix.util.config import BaseProxyConfig, ConfigUpdateHelper
|
||||
|
||||
from maubot_platform.local_paltform import Ollama, LmStudio
|
||||
from maubot_platform import Platform
|
||||
from maubot_platform.thrid_platform import OpenAi, Anthropic
|
||||
from maubot_llmplus.local_paltform import Ollama, LmStudio
|
||||
from maubot_llmplus.platforms import Platform
|
||||
from maubot_llmplus.thrid_platform import OpenAi, Anthropic
|
||||
|
||||
"""
|
||||
配置文件加载
|
||||
|
||||
@@ -3,8 +3,8 @@ import json
|
||||
from mautrix.types import MessageEvent
|
||||
from mautrix.util.config import BaseProxyConfig
|
||||
|
||||
from maubot_platform import platforms
|
||||
from maubot_platform.platforms import Platform, ChatCompletion
|
||||
from maubot_llmplus import platforms
|
||||
from maubot_llmplus.platforms import Platform, ChatCompletion
|
||||
|
||||
|
||||
class Ollama(Platform):
|
||||
@@ -1,7 +1,7 @@
|
||||
from mautrix.types import MessageEvent
|
||||
from mautrix.util.config import BaseProxyConfig
|
||||
|
||||
from maubot_platform.platforms import Platform, ChatCompletion
|
||||
from maubot_llmplus.platforms import Platform, ChatCompletion
|
||||
|
||||
|
||||
class OpenAi(Platform):
|
||||
Reference in New Issue
Block a user