Skip to content

Commit e2ed3bd

Browse files
committed
fix: 修复 callable 类型注解错误
1 parent 52ac8d8 commit e2ed3bd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

backend/app/agent/agent_tools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import datetime
2+
from collections.abc import Callable
23
from contextvars import ContextVar
34

45
from langchain_core.tools import tool
@@ -11,7 +12,7 @@
1112
from app.utils.auth_utils import decode_django_jwt
1213

1314
current_user_id_var: ContextVar[str] = ContextVar('current_user_id', default=None)
14-
thinking_callback_var: ContextVar[callable | None] = ContextVar('thinking_callback', default=None)
15+
thinking_callback_var: ContextVar[Callable | None] = ContextVar('thinking_callback', default=None)
1516

1617
def set_current_user_id(user_id: str):
1718
"""设置当前用户ID到上下文"""

0 commit comments

Comments
 (0)