File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import argparse
22import asyncio
3- from ftplib import print_line
43
54from temporalio import workflow
65from temporalio .client import (
@@ -73,7 +72,7 @@ async def main():
7372 history .extend (new_history )
7473 print (* new_history , sep = "\n " )
7574 except WorkflowUpdateFailedError :
76- print_line ("** Stale conversation. Reloading..." )
75+ print ("** Stale conversation. Reloading..." )
7776 length = len (history )
7877 history = await handle .query (
7978 CustomerServiceWorkflow .get_chat_history ,
Original file line number Diff line number Diff line change @@ -148,15 +148,15 @@ class ProcessUserMessageInput(BaseModel):
148148
149149@workflow .defn
150150class CustomerServiceWorkflow :
151- def __init__ (self , input_items : list [TResponseInputItem ] = None ):
151+ def __init__ (self , input_items : list [TResponseInputItem ] | None = None ):
152152 self .run_config = RunConfig ()
153- self .chat_history = []
153+ self .chat_history : list [ str ] = []
154154 self .current_agent : Agent [AirlineAgentContext ] = init_agents ()
155155 self .context = AirlineAgentContext ()
156156 self .input_items = [] if input_items is None else input_items
157157
158158 @workflow .run
159- async def run (self , input_items : list [TResponseInputItem ] = None ):
159+ async def run (self , input_items : list [TResponseInputItem ] | None = None ):
160160 await workflow .wait_condition (
161161 lambda : workflow .info ().is_continue_as_new_suggested ()
162162 and workflow .all_handlers_finished ()
Original file line number Diff line number Diff line change 11from dataclasses import dataclass
22
3- from openai import BaseModel
43from temporalio import activity
54
65
7- class Weather (BaseModel ):
8- city : str
9- temperature_range : str
10- conditions : str
11-
12-
136@dataclass
147class Weather :
158 city : str
You can’t perform that action at this time.
0 commit comments