From f243b6282441241af65fb6baae9662c5e49bd781 Mon Sep 17 00:00:00 2001 From: Kumaran Rajendhiran Date: Thu, 19 Sep 2024 13:53:32 +0530 Subject: [PATCH] Fix failing example (#249) --- examples/cli/main_user_proxy.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/cli/main_user_proxy.py b/examples/cli/main_user_proxy.py index 3ed5f7c2e..6083af0bc 100644 --- a/examples/cli/main_user_proxy.py +++ b/examples/cli/main_user_proxy.py @@ -29,6 +29,7 @@ def simple_workflow(wf: AutoGenWorkflows, ui: UI, initial_message: str, session_ user_proxy = UserProxyAgent( name="User_Proxy", human_input_mode="ALWAYS", + llm_config=llm_config, ) weatherman = ConversableAgent( name="Weatherman", @@ -40,8 +41,11 @@ def simple_workflow(wf: AutoGenWorkflows, ui: UI, initial_message: str, session_ # Set global security params for all methods weather_client.set_security_params(APIKeyHeader.Parameters(value="secure weather key")) - weather_client.register_for_llm(weatherman) - weather_client.register_for_execution(user_proxy) + wf.register_api( + api=weather_client, + callers=user_proxy, + executors=weatherman, + ) chat_result = user_proxy.initiate_chat( weatherman,