mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
Add clarification re: format of start and end dates, and (probably?) fix non-determinism error caused by SHOW_CONFIRM
This commit is contained in:
@@ -50,6 +50,7 @@ guess_location_tool = ToolDefinition(
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
# ----- Travel use cases tools -----
|
||||
search_flights_tool = ToolDefinition(
|
||||
name="SearchFlights",
|
||||
@@ -198,12 +199,12 @@ future_pto_calc_tool = ToolDefinition(
|
||||
ToolArgument(
|
||||
name="start_date",
|
||||
type="string",
|
||||
description="Start date of proposed PTO",
|
||||
description="Start date of proposed PTO, sent in the form yyyy-mm-dd",
|
||||
),
|
||||
ToolArgument(
|
||||
name="end_date",
|
||||
type="string",
|
||||
description="End date of proposed PTO",
|
||||
description="End date of proposed PTO, sent in the form yyyy-mm-dd",
|
||||
),
|
||||
ToolArgument(
|
||||
name="email",
|
||||
@@ -221,12 +222,12 @@ book_pto_tool = ToolDefinition(
|
||||
ToolArgument(
|
||||
name="start_date",
|
||||
type="string",
|
||||
description="Start date of proposed PTO",
|
||||
description="Start date of proposed PTO, sent in the form yyyy-mm-dd",
|
||||
),
|
||||
ToolArgument(
|
||||
name="end_date",
|
||||
type="string",
|
||||
description="End date of proposed PTO",
|
||||
description="End date of proposed PTO, sent in the form yyyy-mm-dd",
|
||||
),
|
||||
ToolArgument(
|
||||
name="email",
|
||||
|
||||
@@ -26,11 +26,11 @@ with workflow.unsafe.imports_passed_through():
|
||||
# Constants
|
||||
MAX_TURNS_BEFORE_CONTINUE = 250
|
||||
|
||||
SHOW_CONFIRM = True
|
||||
show_confirm_env = os.getenv("SHOW_CONFIRM")
|
||||
if show_confirm_env is not None:
|
||||
if show_confirm_env == "False":
|
||||
SHOW_CONFIRM = False
|
||||
if show_confirm_env is not None and show_confirm_env.lower() == "false":
|
||||
SHOW_CONFIRM = False
|
||||
else:
|
||||
SHOW_CONFIRM = True
|
||||
|
||||
#ToolData as part of the workflow is what's accessible to the UI - see LLMResponse.jsx for example
|
||||
class ToolData(TypedDict, total=False):
|
||||
|
||||
Reference in New Issue
Block a user