File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
docs/content/2.configurations Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ navigation:
1212| 环境变量名称 | 释义 |
1313| :- | :- |
1414| ` VOLCENGINE_ACCESS_KEY ` | 火山引擎 Access Key |
15- | ` VOLCENGINE_SECRET_KEY ` | 火山引擎 Access Key |
15+ | ` VOLCENGINE_SECRET_KEY ` | 火山引擎 Secret Key |
1616
1717对应 ` yaml ` 文件格式:
1818
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def __getattr__(name):
2525 from veadk .memory .short_term_memory import ShortTermMemory
2626
2727 return ShortTermMemory
28- if name == "LongTeremMemory " :
28+ if name == "LongTermMemory " :
2929 from veadk .memory .long_term_memory import LongTermMemory
3030
3131 return LongTermMemory
Original file line number Diff line number Diff line change 1919 BaseSessionService ,
2020 DatabaseSessionService ,
2121 InMemorySessionService ,
22+ Session ,
2223)
2324from pydantic import BaseModel , Field , PrivateAttr
2425
@@ -106,7 +107,7 @@ async def create_session(
106107 app_name : str ,
107108 user_id : str ,
108109 session_id : str ,
109- ) -> None :
110+ ) -> Session | None :
110111 if isinstance (self ._session_service , DatabaseSessionService ):
111112 list_sessions_response = await self ._session_service .list_sessions (
112113 app_name = app_name , user_id = user_id
@@ -122,7 +123,12 @@ async def create_session(
122123 )
123124 is None
124125 ):
125- # create a new session for this running
126- await self ._session_service .create_session (
126+ return await self ._session_service .create_session (
127127 app_name = app_name , user_id = user_id , session_id = session_id
128128 )
129+ else :
130+ logger .info (
131+ f"Session { session_id } already exists with app_name={ app_name } user_id={ user_id } ."
132+ )
133+
134+ return None
You can’t perform that action at this time.
0 commit comments