Skip to content

Commit f508d0e

Browse files
committed
fix: instantiate llm inside node in langgraph scaffold template
1 parent a3d3ddd commit f508d0e

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-langchain"
3-
version = "0.11.14"
3+
version = "0.11.15"
44
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.11"

src/uipath_langchain/_cli/_templates/main.py.template

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ from langgraph.graph import START, StateGraph, END
33
from uipath_langchain.chat import UiPathChat
44
from pydantic import BaseModel
55

6-
llm = UiPathChat(model="gpt-4o-mini-2024-07-18")
7-
86

97
class GraphState(BaseModel):
108
topic: str
@@ -15,6 +13,7 @@ class GraphOutput(BaseModel):
1513

1614

1715
async def generate_report(state: GraphState) -> GraphOutput:
16+
llm = UiPathChat(model="gpt-4o-mini-2024-07-18")
1817
system_prompt = "You are a report generator. Please provide a brief report based on the given topic."
1918
output = await llm.ainvoke(
2019
[SystemMessage(system_prompt), HumanMessage(state.topic)]

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)