mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 05:58:08 +01:00
changes to be specific about travel scenarios, setup guidance about goal_categories, fixed a bug about llm selection in tool_activities.py, better comments
This commit is contained in:
@@ -36,10 +36,13 @@ OPENAI_API_KEY=sk-proj-...
|
||||
# TEMPORAL_API_KEY=abcdef1234567890
|
||||
|
||||
# Set starting goal of agent
|
||||
AGENT_GOAL=goal_choose_agent_type # (default)
|
||||
AGENT_GOAL=goal_choose_agent_type # default, for multi-goal
|
||||
#AGENT_GOAL=goal_event_flight_invoice # for original goal
|
||||
#AGENT_GOAL=goal_match_train_invoice # for replay goal
|
||||
|
||||
#Choose which category(ies) of goals you want to be listed by the Agent - options are system (always included), hr, travel, or all.
|
||||
GOAL_CATEGORIES=hr,travel,fin # default is all
|
||||
GOAL_CATEGORIES=hr,travel-flights,travel-trains,fin # default is all
|
||||
#GOAL_CATEGORIES=travel-flights
|
||||
|
||||
# Set if the UI should force a user confirmation step or not
|
||||
SHOW_CONFIRM=True
|
||||
|
||||
@@ -50,7 +50,7 @@ class ToolActivities:
|
||||
else:
|
||||
print("Warning: OPENAI_API_KEY not set but LLM_PROVIDER is 'openai'")
|
||||
|
||||
if self.llm_provider == "grok":
|
||||
elif self.llm_provider == "grok":
|
||||
if os.environ.get("GROK_API_KEY"):
|
||||
self.grok_client = OpenAI(api_key=os.environ.get("GROK_API_KEY"), base_url="https://api.x.ai/v1")
|
||||
print("Initialized grok client")
|
||||
|
||||
4
setup.md
4
setup.md
@@ -17,6 +17,8 @@ SHOW_CONFIRM=True
|
||||
|
||||
The agent can be configured to pursue different goals using the `AGENT_GOAL` environment variable in your `.env` file.
|
||||
|
||||
The agent can support multiple goals using goal categories using `GOAL_CATEGORIES` in your .env file. If unset, default is all.
|
||||
|
||||
See the section Goal-Specific Tool Configuration below for tool configuration for specific goals.
|
||||
|
||||
### LLM Provider Configuration
|
||||
@@ -125,7 +127,7 @@ Access the UI at `http://localhost:5173`
|
||||
|
||||
|
||||
## Goal-Specific Tool Configuration
|
||||
Here is configuration guidance for specific goals. `travel,fin` goals have configuration & setup as below.
|
||||
Here is configuration guidance for specific goals. Travel and financial goals have configuration & setup as below.
|
||||
### Goal: Find an event in Australia / New Zealand, book flights to it and invoice the user for the cost
|
||||
- `AGENT_GOAL=goal_event_flight_invoice` - Helps users find events, book flights, and arrange train travel with invoice generation
|
||||
- This is the scenario in the [original video](https://www.youtube.com/watch?v=GEXllEH2XiQ)
|
||||
|
||||
@@ -98,7 +98,7 @@ goal_pirate_treasure = AgentGoal(
|
||||
|
||||
goal_match_train_invoice = AgentGoal(
|
||||
id = "goal_match_train_invoice",
|
||||
category_tag="travel",
|
||||
category_tag="travel-trains",
|
||||
agent_name="UK Premier League Match Trip Booking",
|
||||
agent_friendly_description="Book a trip to a city in the UK around the dates of a premier league match.",
|
||||
tools=[
|
||||
@@ -146,7 +146,7 @@ goal_match_train_invoice = AgentGoal(
|
||||
|
||||
goal_event_flight_invoice = AgentGoal(
|
||||
id = "goal_event_flight_invoice",
|
||||
category_tag="travel",
|
||||
category_tag="travel-flights",
|
||||
agent_name="Australia and New Zealand Event Flight Booking",
|
||||
agent_friendly_description="Book a trip to a city in Australia or New Zealand around the dates of events in that city.",
|
||||
tools=[
|
||||
|
||||
@@ -255,6 +255,7 @@ paycheck_bank_integration_status_check = ToolDefinition(
|
||||
],
|
||||
)
|
||||
|
||||
# ----- Financial use cases tools -----
|
||||
financial_check_account_is_valid = ToolDefinition(
|
||||
name="FinCheckAccountIsValid",
|
||||
description="Check if an account is valid by email address or account ID. "
|
||||
|
||||
Reference in New Issue
Block a user