mirror of
https://github.com/LiteyukiStudio/nonebot-plugin-marshoai.git
synced 2025-03-10 18:31:03 +08:00
移除未使用import,添加漏掉的换行
This commit is contained in:
parent
5b315c46b1
commit
4fbe6c6366
@ -15,10 +15,8 @@ from nonebot.matcher import (
|
||||
Matcher,
|
||||
current_bot,
|
||||
current_event,
|
||||
current_handler,
|
||||
current_matcher,
|
||||
)
|
||||
from nonebot.typing import T_State
|
||||
from nonebot_plugin_alconna.uniseg import UniMessage, UniMsg
|
||||
from openai import AsyncOpenAI
|
||||
from openai.types.chat import ChatCompletion, ChatCompletionMessage
|
||||
@ -31,7 +29,6 @@ from .plugin.func_call.caller import get_function_calls
|
||||
from .plugin.func_call.models import SessionContext
|
||||
from .util import (
|
||||
extract_content_and_think,
|
||||
get_backup_context,
|
||||
get_image_b64,
|
||||
get_nickname_by_user_id,
|
||||
get_prompt,
|
||||
@ -68,7 +65,7 @@ class MarshoHandler:
|
||||
usermsg = [] if is_support_image_model else ""
|
||||
user_nickname = await get_nickname_by_user_id(self.event.get_user_id())
|
||||
if user_nickname:
|
||||
nickname_prompt = f"此消息的说话者为: {user_nickname}"
|
||||
nickname_prompt = f"\n此消息的说话者为: {user_nickname}"
|
||||
else:
|
||||
nickname_prompt = ""
|
||||
for i in user_input: # type: ignore
|
||||
|
@ -1,5 +1,4 @@
|
||||
import contextlib
|
||||
import json
|
||||
import traceback
|
||||
from typing import Optional
|
||||
|
||||
@ -7,10 +6,6 @@ from arclet.alconna import Alconna, AllParam, Args
|
||||
from azure.ai.inference.models import (
|
||||
AssistantMessage,
|
||||
CompletionsFinishReason,
|
||||
ImageContentItem,
|
||||
ImageUrl,
|
||||
TextContentItem,
|
||||
ToolMessage,
|
||||
UserMessage,
|
||||
)
|
||||
from nonebot import logger, on_command, on_message
|
||||
@ -29,7 +24,6 @@ from .hooks import *
|
||||
from .instances import client, context, model_name, target_list, tools
|
||||
from .metadata import metadata
|
||||
from .plugin.func_call.caller import get_function_calls
|
||||
from .plugin.func_call.models import SessionContext
|
||||
from .util import *
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user