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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "uipath-llamaindex"
version = "0.0.14"
version = "0.0.15"
description = "UiPath LlamaIndex SDK"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.10"
Expand Down
12 changes: 6 additions & 6 deletions samples/simple-hitl-agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@


# a tool that performs a dangerous task
async def dangerous_task(ctx: Context) -> str:
"""A dangerous task that requires human confirmation."""
async def research_company(ctx: Context) -> str:
"""Research a company."""

# emit an event to the external stream to be captured
ctx.write_event_to_stream(
Expand All @@ -28,13 +28,13 @@ async def dangerous_task(ctx: Context) -> str:

# act on the input from the event
if response.response.strip().lower() == "yes":
return "Dangerous task completed successfully."
return "Research completed successfully."
else:
return "Dangerous task aborted."
return "Research task aborted."


workflow = AgentWorkflow.from_tools_or_functions(
[dangerous_task],
[research_company],
llm=llm,
system_prompt="You are a helpful assistant that can perform dangerous tasks.",
system_prompt="You are a helpful assistant that can research companies.",
)
4 changes: 2 additions & 2 deletions samples/simple-hitl-agent/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[project]
name = "llama-simple-hitl-agent"
version = "0.0.2"
version = "0.0.5"
description = "UiPath LlamaIndex Simple HITL Agent"
authors = [{ name = "John Doe", email = "john.doe@myemail.com" }]
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.10"
dependencies = [
"uipath-llamaindex>=0.0.13",
"uipath-llamaindex>=0.0.14",
"llama-index-llms-openai>=0.2.2"
]
8 changes: 6 additions & 2 deletions samples/simple-hitl-agent/uipath.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
"type": "agent",
"input": {
"type": "object",
"properties": {},
"properties": {
"hack": {
"type": "object"
}
},
"required": []
},
"output": {
Expand All @@ -20,4 +24,4 @@
"version": "2.0",
"resources": []
}
}
}
Loading