mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-16 22:48:09 +01:00
workflow rename, prompt tuning
This commit is contained in:
@@ -8,7 +8,7 @@ async def main():
|
||||
# Create client connected to server at the given address
|
||||
client = await Client.connect("localhost:7233")
|
||||
|
||||
workflow_id = "ollama-agent"
|
||||
workflow_id = "agent-workflow"
|
||||
|
||||
handle = client.get_workflow_handle_for(ToolWorkflow.run, workflow_id)
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ from workflows import ToolWorkflow
|
||||
async def main():
|
||||
# Create client connected to server at the given address
|
||||
client = await Client.connect("localhost:7233")
|
||||
workflow_id = "ollama-agent"
|
||||
workflow_id = "agent-workflow"
|
||||
|
||||
handle = client.get_workflow_handle(workflow_id)
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ async def main():
|
||||
with concurrent.futures.ThreadPoolExecutor(max_workers=100) as activity_executor:
|
||||
worker = Worker(
|
||||
client,
|
||||
task_queue="ollama-task-queue",
|
||||
task_queue="agent-task-queue",
|
||||
workflows=[ToolWorkflow],
|
||||
activities=[
|
||||
activities.prompt_llm,
|
||||
|
||||
@@ -91,7 +91,7 @@ async def main(prompt: str):
|
||||
# 4) Connect to Temporal and start or signal the workflow
|
||||
client = await Client.connect("localhost:7233")
|
||||
|
||||
workflow_id = "ollama-agent"
|
||||
workflow_id = "agent-workflow"
|
||||
|
||||
# Note that we start the ToolWorkflow.run with 'combined_input'
|
||||
# Then we immediately signal with the initial prompt
|
||||
@@ -99,7 +99,7 @@ async def main(prompt: str):
|
||||
ToolWorkflow.run,
|
||||
combined_input,
|
||||
id=workflow_id,
|
||||
task_queue="ollama-task-queue",
|
||||
task_queue="agent-task-queue",
|
||||
start_signal="user_prompt", # This will send your first prompt to the workflow
|
||||
start_signal_args=[prompt],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user