-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for Human Input Mode in AutoGen Studio (#3484)
* bump version, add claude default model * Move WebSocketConnectionManager into its own file. * Update the AutoGenStudio to use Async code throughout the call stack Update *WorkflowManager* classes: - Add async `a_send_message_function` parameter to mirror `send_message_function` param. - Add async `a_process_message` coroutine to mirror the synchronous `process_message` function. - Add async `a_run` coroutine to mirror the `run` function - Add async `_a_run_workflow` coroutine to mirror the synchronous `_run_workflow` function. Update *ExtendedConversableAgent* and *ExtendedGroupChatManager* classes: - Override the async `a_receive` coroutines Update *AutoGenChatManager*: - Add async `a_send` and `a_chat` coroutines to mirror their sync counterparts. - Accept the `WebSocketManager` instance as a parameter, so it can do Async comms directly. Update *app.py* - Provide the `WebSocketManager` instance to the *AutoGenChatManager* constructor - Await the manager's `a_chat` coroutine, rather than calling the synchronous `chat` function. * Add Human Input Support Updates to *ExtendedConversableAgent* and *ExtendedGroupChatManager* classes - override the `get_human_input` function and async `a_get_human_input` coroutine Updates to *WorkflowManager* classes: - add parameters `a_human_input_function` and `a_human_input_timeout` and pass along on to the ExtendedConversableAgent and ExtendedGroupChatManager - fix for invalid configuration passed from UI when human input mode is not NEVER and no model is attached Updates to *AutoGenChatManager* class: - add parameter `human_input_timeout` and pass it along to *WorkflowManager* classes - add async `a_prompt_for_input` coroutine that relies on `websocket_manager.get_input` coroutine (which snuck into last commit) Updates to *App.py* - global var HUMAN_INPUT_TIMEOUT_SECONDS = 180, we can replace this with a configurable value in the future * add formatting/precommit fixes * version bump --------- Co-authored-by: Joe Landers <[email protected]>
- Loading branch information
1 parent
70a1791
commit 084a54d
Showing
11 changed files
with
780 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,6 +175,13 @@ def init_db_samples(dbmanager: Any): | |
model="gpt-4-1106-preview", description="OpenAI GPT-4 model", user_id="[email protected]", api_type="open_ai" | ||
) | ||
|
||
anthropic_sonnet_model = Model( | ||
model="claude-3-5-sonnet-20240620", | ||
description="Anthropic's Claude 3.5 Sonnet model", | ||
api_type="anthropic", | ||
user_id="[email protected]", | ||
) | ||
|
||
# skills | ||
generate_pdf_skill = Skill( | ||
name="generate_and_save_pdf", | ||
|
@@ -303,6 +310,7 @@ def init_db_samples(dbmanager: Any): | |
session.add(google_gemini_model) | ||
session.add(azure_model) | ||
session.add(gpt_4_model) | ||
session.add(anthropic_sonnet_model) | ||
session.add(generate_image_skill) | ||
session.add(generate_pdf_skill) | ||
session.add(user_proxy) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
VERSION = "0.1.4" | ||
VERSION = "0.1.6" | ||
__version__ = VERSION | ||
APP_NAME = "autogenstudio" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.