Skip to content

Commit bb62885

Browse files
Enable cloud_llm brick (#26)
1 parent aa4122e commit bb62885

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
id: arduino:cloud_llm
22
name: Cloud LLM
33
description: "Cloud LLM Brick enables seamless integration with cloud-based Large Language Models (LLMs) for advanced AI capabilities in your Arduino projects."
4-
disabled: true
5-
64
variables:
7-
- API_KEY
5+
- name: API_KEY
6+
description: API Key for the cloud-based LLM service

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)