Skip to content

Commit f12c0f3

Browse files
committed
use uuid7 to generate ids
1 parent ad31488 commit f12c0f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/arduino/app_bricks/cloud_llm/cloud_llm.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from langchain_core.messages import SystemMessage
1313
from langchain_core.output_parsers import StrOutputParser
1414
from langchain_core.chat_history import InMemoryChatMessageHistory
15+
from langsmith import uuid7
1516

1617
from arduino.app_utils import Logger, brick
1718

@@ -79,7 +80,7 @@ def __init__(
7980
timeout=self._timeout,
8081
)
8182
self._parser = StrOutputParser()
82-
self._history_cfg = {"configurable": {"session_id": "default_session"}}
83+
self._history_cfg = {"configurable": {"session_id": uuid7()}}
8384

8485
core_chain = self._prompt | self._model | self._parser
8586
self._chain = RunnableWithMessageHistory(

0 commit comments

Comments
 (0)