Merge branch 'development' into main

This commit is contained in:
Joshua Smith
2025-04-17 08:48:15 -04:00
committed by GitHub
3 changed files with 18 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
[tool.poetry]
name = "temporal-AI-agent"
name = "temporal_AI_agent"
version = "0.1.0"
description = "Temporal AI Agent"
license = "MIT"
@@ -13,7 +13,7 @@ packages = [
]
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/temporalio/samples-python/issues"
"Bug Tracker" = "https://github.com/temporal-community/temporal-ai-agent/issues"
[tool.poe.tasks]
format = [{cmd = "black ."}, {cmd = "isort ."}]
@@ -43,9 +43,16 @@ gtfs-kit = "^10.1.1"
[tool.poetry.group.dev.dependencies]
pytest = "^7.3"
pytest-asyncio = "^0.18.3"
black = "^23.7"
isort = "^5.12"
[build-system]
requires = ["poetry-core>=1.4.0"]
build-backend = "poetry.core.masonry.api"
build-backend = "poetry.core.masonry.api"
[tool.pytest.ini_options]
asyncio_mode = "auto"
log_cli = true
log_cli_level = "INFO"
log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"

View File

@@ -10,11 +10,14 @@
[ ] financial advise - args being freeform customer input about their financial situation, goals
[ ] tool is maybe a new tool asking the LLM to advise
[ ] LLM failure->autoswitch: <br />
- detect failure in the activity using failurecount <br />
- activity switches to secondary LLM defined in .env
- activity reports switch to workflow
[ ] for demo simulate failure - add utilities/simulated failures from pipeline demo <br />
[ ] ask the ai agent how it did at the end of the conversation, was it efficient? successful? insert a search attribute to document that before return <br />
- Insight into the agents performance <br />
[ ] non-retry the api key error - "Invalid API Key provided: sk_test_**J..." and "AuthenticationError" <br />

View File

@@ -108,7 +108,7 @@ class AgentGoalWorkflow:
conversation_history=self.conversation_history,
agent_goal=self.goal,
)
validation_result = await workflow.execute_activity(
validation_result = await workflow.execute_activity_method(
ToolActivities.agent_validatePrompt,
args=[validation_input],
schedule_to_close_timeout=LLM_ACTIVITY_SCHEDULE_TO_CLOSE_TIMEOUT,
@@ -134,7 +134,7 @@ class AgentGoalWorkflow:
prompt_input = ToolPromptInput(prompt=prompt, context_instructions=context_instructions)
# connect to LLM and execute to get next steps
tool_data = await workflow.execute_activity(
tool_data = await workflow.execute_activity_method(
ToolActivities.agent_toolPlanner,
prompt_input,
schedule_to_close_timeout=LLM_ACTIVITY_SCHEDULE_TO_CLOSE_TIMEOUT,
@@ -316,8 +316,9 @@ class AgentGoalWorkflow:
async def lookup_wf_env_settings(self, combined_input: CombinedInput)->None:
env_lookup_input = EnvLookupInput(
show_confirm_env_var_name = "SHOW_CONFIRM",
show_confirm_default = True)
env_output:EnvLookupOutput = await workflow.execute_activity(
show_confirm_default = True,
)
env_output:EnvLookupOutput = await workflow.execute_activity_method(
ToolActivities.get_wf_env_vars,
env_lookup_input,
start_to_close_timeout=LLM_ACTIVITY_START_TO_CLOSE_TIMEOUT,