mirror of https://github.com/dapr/dapr-agents.git
updated quickstarts to use the updated sync workflow monitoring
This commit is contained in:
parent
e8d96e186d
commit
704e9d774b
|
|
@ -27,7 +27,7 @@ def write_blog(outline: str) -> str:
|
|||
if __name__ == '__main__':
|
||||
wfapp = WorkflowApp()
|
||||
|
||||
results = wfapp.run_and_monitor_workflow(
|
||||
results = wfapp.run_and_monitor_workflow_sync(
|
||||
analyze_topic,
|
||||
input="AI Agents"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ def write_blog(outline: str) -> str:
|
|||
if __name__ == '__main__':
|
||||
wfapp = WorkflowApp()
|
||||
|
||||
results = wfapp.run_and_monitor_workflow(
|
||||
results = wfapp.run_and_monitor_workflow_sync(
|
||||
analyze_topic,
|
||||
input="AI Agents"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ def get_line(character: str) -> str:
|
|||
if __name__ == '__main__':
|
||||
wfapp = WorkflowApp()
|
||||
|
||||
results = wfapp.run_and_monitor_workflow(task_chain_workflow)
|
||||
results = wfapp.run_and_monitor_workflow_sync(task_chain_workflow)
|
||||
print(f"Famous Line: {results}")
|
||||
```
|
||||
|
||||
|
|
@ -209,7 +209,7 @@ if __name__ == "__main__":
|
|||
research_topic = "The environmental impact of quantum computing"
|
||||
|
||||
logging.info(f"Starting research workflow on: {research_topic}")
|
||||
results = wfapp.run_and_monitor_workflow(research_workflow, input=research_topic)
|
||||
results = wfapp.run_and_monitor_workflow_sync(research_workflow, input=research_topic)
|
||||
logging.info(f"\nResearch Report:\n{results}")
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -73,6 +73,6 @@ if __name__ == "__main__":
|
|||
research_topic = "The environmental impact of quantum computing"
|
||||
|
||||
logging.info(f"Starting research workflow on: {research_topic}")
|
||||
results = wfapp.run_and_monitor_workflow(research_workflow, input=research_topic)
|
||||
results = wfapp.run_and_monitor_workflow_sync(research_workflow, input=research_topic)
|
||||
if len(results) > 0:
|
||||
logging.info(f"\nResearch Report:\n{results}")
|
||||
|
|
@ -26,5 +26,5 @@ def get_line(character: str) -> str:
|
|||
if __name__ == '__main__':
|
||||
wfapp = WorkflowApp()
|
||||
|
||||
results = wfapp.run_and_monitor_workflow(task_chain_workflow)
|
||||
results = wfapp.run_and_monitor_workflow_sync(task_chain_workflow)
|
||||
print(f"Famous Line: {results}")
|
||||
|
|
@ -5,8 +5,6 @@ from dotenv import load_dotenv
|
|||
# Load environment variables
|
||||
load_dotenv()
|
||||
|
||||
# Initialize the WorkflowApp
|
||||
|
||||
# Define Workflow logic
|
||||
@workflow(name='task_chain_workflow')
|
||||
def task_chain_workflow(ctx: DaprWorkflowContext):
|
||||
|
|
@ -31,5 +29,5 @@ def get_line(character: str) -> str:
|
|||
if __name__ == '__main__':
|
||||
wfapp = WorkflowApp()
|
||||
|
||||
results = wfapp.run_and_monitor_workflow(task_chain_workflow)
|
||||
results = wfapp.run_and_monitor_workflow_sync(task_chain_workflow)
|
||||
print(f"Results: {results}")
|
||||
Loading…
Reference in New Issue