Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/arduino/app_bricks/cloud_llm/brick_config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
id: arduino:cloud_llm
name: Cloud LLM
description: "Cloud LLM Brick enables seamless integration with cloud-based Large Language Models (LLMs) for advanced AI capabilities in your Arduino projects."
disabled: true

variables:
- API_KEY
- name: API_KEY
description: API Key for the cloud-based LLM service
3 changes: 2 additions & 1 deletion src/arduino/app_bricks/cloud_llm/cloud_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from langchain_core.messages import SystemMessage
from langchain_core.output_parsers import StrOutputParser
from langchain_core.chat_history import InMemoryChatMessageHistory
from langsmith import uuid7

from arduino.app_utils import Logger, brick

Expand Down Expand Up @@ -79,7 +80,7 @@ def __init__(
timeout=self._timeout,
)
self._parser = StrOutputParser()
self._history_cfg = {"configurable": {"session_id": "default_session"}}
self._history_cfg = {"configurable": {"session_id": uuid7()}}

core_chain = self._prompt | self._model | self._parser
self._chain = RunnableWithMessageHistory(
Expand Down