We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52ac8d8 commit e2ed3bdCopy full SHA for e2ed3bd
1 file changed
backend/app/agent/agent_tools.py
@@ -1,4 +1,5 @@
1
import datetime
2
+from collections.abc import Callable
3
from contextvars import ContextVar
4
5
from langchain_core.tools import tool
@@ -11,7 +12,7 @@
11
12
from app.utils.auth_utils import decode_django_jwt
13
14
current_user_id_var: ContextVar[str] = ContextVar('current_user_id', default=None)
-thinking_callback_var: ContextVar[callable | None] = ContextVar('thinking_callback', default=None)
15
+thinking_callback_var: ContextVar[Callable | None] = ContextVar('thinking_callback', default=None)
16
17
def set_current_user_id(user_id: str):
18
"""设置当前用户ID到上下文"""
0 commit comments