Skip to content

Commit 5e8b146

Browse files
authored
feat: rename template input field to question with description (#807)
1 parent 9cde58c commit 5e8b146

5 files changed

Lines changed: 22 additions & 21 deletions

File tree

template/README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A quickstart UiPath LangGraph agent. It answers user queries using live tools an
66
77
## What it does
88

9-
1. **Prepares** the conversation — injects a system prompt and the user query into state
9+
1. **Prepares** the conversation — injects a system prompt and the user question into state
1010
2. **Runs a ReAct agent node** that autonomously decides which tools to call and in what order
1111
3. **Postprocesses** — validates and truncates the response if it exceeds the configured max length
1212

@@ -19,13 +19,12 @@ A quickstart UiPath LangGraph agent. It answers user queries using live tools an
1919

2020
### LLM Providers
2121

22-
The template defaults to **GPT-4.1 Mini** via `UiPathChat`. To switch providers, edit `main.py`:
22+
The template defaults to **Claude Haiku 4.5** via `UiPathChatAnthropicBedrock`. To switch providers, edit `main.py`:
2323

2424
```python
2525
# Choose your LLM provider by uncommenting one of the following:
26-
llm = UiPathChat(model="gpt-4.1-mini-2025-04-14")
26+
llm = UiPathChatAnthropicBedrock(model="anthropic.claude-haiku-4-5-20251001-v1:0")
2727
# llm = UiPathAzureChatOpenAI(model="gpt-4.1-mini-2025-04-14")
28-
# llm = UiPathChatAnthropicBedrock(model="anthropic.claude-haiku-4-5-20251001-v1:0")
2928
# llm = UiPathChatGoogleGenerativeAI(model="gemini-2.5-flash")
3029
```
3130

@@ -44,7 +43,7 @@ flowchart TD
4443
```json
4544
// Input
4645
{
47-
"query": "What's the weather like in London?"
46+
"question": "What's the weather like in London?"
4847
}
4948

5049
// Output
@@ -57,10 +56,10 @@ flowchart TD
5756

5857
```bash
5958
# Run
60-
uv run uipath run agent --file input.json
59+
uv run uipath run agent --input-file input.json --output-file output.json
6160

6261
# Debug with dynamic node breakpoints
63-
uv run uipath debug agent --file input.json
62+
uv run uipath debug agent --input-file input.json --output-file output.json
6463
```
6564

6665
## Evaluation

template/entry-points.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
"entryPoints": [
55
{
66
"filePath": "agent",
7-
"uniqueId": "ed2b77c0-1fab-478a-abe4-41b3a6f573c2",
7+
"uniqueId": "dd6b5e6a-fa02-4220-b78e-e99c2f112e34",
88
"type": "agent",
99
"input": {
1010
"type": "object",
1111
"properties": {
12-
"query": {
13-
"title": "Query",
12+
"question": {
13+
"description": "Question for the assistant, e.g. 'What's the weather in Paris?'",
14+
"title": "Question",
1415
"type": "string"
1516
}
1617
},
1718
"required": [
18-
"query"
19+
"question"
1920
]
2021
},
2122
"output": {
@@ -65,7 +66,8 @@
6566
"type": "model",
6667
"subgraph": null,
6768
"metadata": {
68-
"model_name": "anthropic.claude-haiku-4-5-20251001-v1:0"
69+
"model_name": "anthropic.claude-haiku-4-5-20251001-v1:0",
70+
"max_tokens": 4096
6971
}
7072
},
7173
{
@@ -76,7 +78,7 @@
7678
"metadata": {
7779
"tool_names": [
7880
"get_current_time",
79-
"web_search"
81+
"get_weather"
8082
],
8183
"tool_count": 2
8284
}

template/evaluations/eval-sets/evaluation-set-default.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"id": "ada5a2c1-976c-470b-964f-eb70a5e61eb4",
1414
"name": "Weather in Paris",
1515
"inputs": {
16-
"query": "Is it good weather for a walk in Paris?"
16+
"question": "Is it good weather for a walk in Paris?"
1717
},
1818
"evaluationCriterias": {
1919
"evaluator-llm-judge-output": {

template/input.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"query": "What's the weather like in London?"
2+
"question": "What's the weather like in London?"
33
}

template/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,17 @@
66
from langchain_core.tools import tool
77
from langgraph.graph import END, START, StateGraph
88
from langgraph.graph.message import add_messages
9-
from pydantic import BaseModel
9+
from pydantic import BaseModel, Field
1010

1111
from uipath_langchain.chat import (
1212
UiPathAzureChatOpenAI,
13-
UiPathChat,
1413
UiPathChatAnthropicBedrock,
1514
UiPathChatGoogleGenerativeAI,
1615
)
1716

1817
# Choose your LLM provider by uncommenting one of the following:
19-
llm = UiPathChat(model="gpt-4.1-mini-2025-04-14")
18+
llm = UiPathChatAnthropicBedrock(model="anthropic.claude-haiku-4-5-20251001-v1:0")
2019
# llm = UiPathAzureChatOpenAI(model="gpt-4.1-mini-2025-04-14")
21-
# llm = UiPathChatAnthropicBedrock(model="anthropic.claude-haiku-4-5-20251001-v1:0")
2220
# llm = UiPathChatGoogleGenerativeAI(model="gemini-2.5-flash")
2321

2422
SYSTEM_PROMPT = (
@@ -31,7 +29,9 @@
3129

3230

3331
class InputModel(BaseModel):
34-
query: str
32+
question: str = Field(
33+
description="Question for the assistant, e.g. 'What's the weather in Paris?'"
34+
)
3535

3636

3737
class AgentResponse(TypedDict):
@@ -76,7 +76,7 @@ async def prepare(input: InputModel) -> dict[str, Any]:
7676
return {
7777
"messages": [
7878
SystemMessage(SYSTEM_PROMPT),
79-
HumanMessage(input.query),
79+
HumanMessage(input.question),
8080
],
8181
}
8282

0 commit comments

Comments
 (0)