mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-09-24 15:36:23 +00:00
✨ 更新默认模型为 OpenAI GPT-4.1,更新 GitHub Models 相关文档及预置模型列表,更改marshoai_azure_endpoint为marshoai_endpoint
This commit is contained in:
@ -9,7 +9,6 @@ from typing import Any, Dict, List, Optional, Union
|
||||
import aiofiles # type: ignore
|
||||
import httpx
|
||||
import nonebot_plugin_localstore as store
|
||||
from azure.ai.inference.aio import ChatCompletionsClient
|
||||
from azure.ai.inference.models import AssistantMessage, SystemMessage, UserMessage
|
||||
from nonebot import get_driver
|
||||
from nonebot.log import logger
|
||||
@ -21,7 +20,7 @@ from openai.types.chat import ChatCompletion, ChatCompletionChunk, ChatCompletio
|
||||
from zhDateTime import DateTime # type: ignore
|
||||
|
||||
from ._types import DeveloperMessage
|
||||
from .cache.decos import *
|
||||
from .cache.decos import * # noqa: F403
|
||||
from .config import config
|
||||
from .constants import CODE_BLOCK_PATTERN, IMG_LATEX_PATTERN, OPENAI_NEW_MODELS
|
||||
from .deal_latex import ConvertLatex
|
||||
@ -126,6 +125,7 @@ async def make_chat_openai(
|
||||
model_name: 指定AI模型名
|
||||
tools: 工具列表
|
||||
"""
|
||||
print(msg)
|
||||
return await client.chat.completions.create( # type: ignore
|
||||
messages=msg,
|
||||
model=model_name,
|
||||
|
Reference in New Issue
Block a user