@@ -139,21 +139,22 @@ async def calculator_flow(expression: str) -> str:
139139 return f'{ operation .title ()} ({ a } , { b } ) = { result .get ("result" )} '
140140
141141
142- if __name__ == '__main__' :
143- import asyncio
142+ async def main ():
143+ result = await say_hi ('Alice' )
144+ logger .info ('say_hi' , result = result )
145+
146+ result = await say_hi_stream ('Bob' )
147+ logger .info ('say_hi_stream' , result = result [:150 ])
144148
145- async def main ():
146- result = await say_hi ('Alice' )
147- logger .info ('say_hi' , result = result )
149+ result = await say_hi_with_config ('Charlie' )
150+ logger .info ('say_hi_with_config' , result = result )
148151
149- result = await say_hi_stream ( 'Bob ' )
150- logger .info ('say_hi_stream ' , result = result [: 150 ] )
152+ result = await weather_flow ( 'New York ' )
153+ logger .info ('weather_flow ' , result = result )
151154
152- result = await say_hi_with_config ( 'Charlie ' )
153- logger .info ('say_hi_with_config ' , result = result )
155+ result = await calculator_flow ( 'add_5_3 ' )
156+ logger .info ('calculator_flow ' , result = result )
154157
155- result = await weather_flow ('New York' )
156- logger .info ('weather_flow' , result = result )
157158
158- result = await calculator_flow ( 'add_5_3' )
159- logger . info ( 'calculator_flow' , result = result )
159+ if __name__ == '__main__' :
160+ ai . run_main ( main () )
0 commit comments