重构代码,准备将聊天请求逻辑移入MarshoHandler

This commit is contained in:
2025-02-22 20:39:03 +08:00
parent aaa4056482
commit 17551885f5
6 changed files with 130 additions and 56 deletions

View File

@ -3,7 +3,8 @@ from nonebot import get_driver
from openai import AsyncOpenAI
from .config import config
from .models import Cache, MarshoContext, MarshoTools
from .handler import MarshoHandler
from .models import MarshoContext, MarshoTools
driver = get_driver()
@ -11,7 +12,6 @@ command_start = driver.config.command_start
model_name = config.marshoai_default_model
context = MarshoContext()
tools = MarshoTools()
cache = Cache()
token = config.marshoai_token
endpoint = config.marshoai_azure_endpoint
# client = ChatCompletionsClient(endpoint=endpoint, credential=AzureKeyCredential(token))