Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable human interaction in AutoGenStudio #3432

Conversation

SailorJoe6
Copy link
Collaborator

Why are these changes needed?

The AutoGenStudio UI doesn't currently support user input modes 'ALWAYS', or 'TERMINATE' which are vital when allowing agents to generate and run code, so that the user can verify the code before it gets execute in their environment. This is likely due to difficulties encountered with Python's asyncio event loop getting blocked by synchronous calls to the AutoGen chat functions. This PR fixes those issues and adds support for all human input modes

Related issue number

Resolves #1358
Resolves #1664
Part of roadmap #737

Checks

victordibia and others added 30 commits May 15, 2024 21:21
Fix bug for finding key in nested dictionary
Fixed example workflows for autogenstudio tutorial notebook
Bug microsoft#3122 GroupChat Skills being overwritten.
* remove workflow class

* bump version to 0.0.14
* Added 'role' as a summary_args and to the reflection_with_llm flow to be able to pass the role for the summarizing prompt

* Added 'role' as a summary_args and to the reflection_with_llm flow to be able to pass the role for the summarizing prompt, minor docstring adjustments

* Added test for summary prompt role assignment

* Fixed docstrings and mocked llm-config in the test

* Update autogen/agentchat/conversable_agent.py

Co-authored-by: Chi Wang <[email protected]>

* ran pre-commit

* ran pre-commit2

* fixed old arg name

* Delete dasdaasd

No idea what this file was about

* Fixed incorrect merge update on test_groupchat

---------

Co-authored-by: Chi Wang <[email protected]>
Co-authored-by: Eric Zhu <[email protected]>
* first pass at offline agent eval integration

* Integrating AgentEval for offline scenarios

* removing old changes

* fixing notebook, updating docs

* fixing subcriteria bug

* updating class comment

* cleaning up agent constructors

* moving AgentEval agents to separate folder and adding a brief README

* fixing build breaks

* fixing formatting break

* fixing comments

* consolidating files in the agenteval folder under contrib and cleaning up imports

* fixing import ordering

* adding basic agenteval tests and fixing criteria parsing bug

* first try at adding openai agenteval tests to build process

* adding non-openai agenteval tests to build process

* updating test settings

* updating openai test

* Update test/agentchat/contrib/agent_eval/test_agent_eval.py

Co-authored-by: Wael Karkoub <[email protected]>

* Update .github/workflows/contrib-openai.yml

Co-authored-by: Wael Karkoub <[email protected]>

* test commit

* updating typing and converting to pydantic objects

* fixing test file

---------

Co-authored-by: Beibin Li <[email protected]>
Co-authored-by: Chi Wang <[email protected]>
Co-authored-by: Wael Karkoub <[email protected]>
* Update gallery.json

* Update gallery.json

* Update gallery.json

* Update gallery.json

---------

Co-authored-by: Shaokun Zhang <[email protected]>
wenngong and others added 17 commits July 29, 2024 17:02
* update markdown hyperlinks to stable urls

* update notebook images and text

* re-write observability section

* Updated section

* update wording

* added newline

* update styling in image tags to be jsx compatible

* added text

* update link

* simplified text

* created blog

* replace flow images with fewer shadows

* reformat line

* add authors

* updated discord link and direct paths to image URLS

* removed images since they are not stored in the AgentOps github

* remove trailing whitespaces

* removed newline

* removed whitespace

* Update website/blog/2024-07-25-AgentOps/index.mdx

Co-authored-by: Mark Sze <[email protected]>

* single quotes with double quotes

---------

Co-authored-by: Braelyn Boynton <[email protected]>
Co-authored-by: Mark Sze <[email protected]>
….md extension in the link for ConversableAgent (microsoft#3221)

ConversableAgent has a break link in website/docs/Use-Cases/agent_chat.md file
Co-authored-by: Chi Wang <[email protected]>
Co-authored-by: Qingyun Wu <[email protected]>
* Add gpt-4o-mini to model list

* Fix formatting issue and verify with pre-commit

* Remove extra space

* Minor change to make pre-commit (formatting checks) pass

---------

Co-authored-by: Qingyun Wu <[email protected]>
Co-authored-by: Chi Wang <[email protected]>
Co-authored-by: HRUSHIKESH DOKALA <[email protected]>
Co-authored-by: Ian <[email protected]>
* update markdown hyperlinks to stable urls

* update notebook images and text

* re-write observability section

* Updated section

* update wording

* added newline

* update styling in image tags to be jsx compatible

* added text

* update link

* simplified text

* created blog

* replace flow images with fewer shadows

* reformat line

* add authors

* updated discord link and direct paths to image URLS

* removed images since they are not stored in the AgentOps github

* remove trailing whitespaces

* removed newline

* removed whitespace

* Update website/blog/2024-07-25-AgentOps/index.mdx

Co-authored-by: Mark Sze <[email protected]>

* single quotes with double quotes

* fix widths

---------

Co-authored-by: Braelyn Boynton <[email protected]>
Co-authored-by: Mark Sze <[email protected]>
* bump version

* update

* format

---------

Co-authored-by: kevin666aa <[email protected]>
Co-authored-by: Yiran Wu <[email protected]>
Co-authored-by: Chi Wang <[email protected]>
…t#3220)

* [Typo] Update MongoDB Notebook to acknlowedge >=M10 support

The notebook instructions state we support only >=M30 clusters for AutoGen. This is slightly misleading. We support >=M10 clusters or any cluster that allows for index creation from client code. This support is continually updating so this PR updates the language to reflect that.

* Add link!

---------

Co-authored-by: Li Jiang <[email protected]>
* fix broken reference links that's pointing to a page that doesn't exists

* Fix 2 broken links and use the correct format

---------

Co-authored-by: Chi Wang <[email protected]>
* Update error language and corresponding tests

* Updated another test to use the new error message
…alling in Ollama (microsoft#3197)

* Recreated documentation for Local LLMs - LiteLLM and Ollama

* Added Docker = False for code execution example

---------

Co-authored-by: Chi Wang <[email protected]>
…t#3214)

* add SendAsync api and tests

* update example to use new sendAsync API
- Updated the code to call the synchronous `runWorkflow` code in a separate thread, thus eliminating the blockage on the asyncio event loop
- Completely removed the message_handler_thread as it's no longer needed, since the event loop is no longer blocked
- Split out AutoGenChatManager into it's own file, and enhanced it for user feedback
- Enhanced WebSocketConnectionManager as well for user feedback
- Updates to chatbox.tsx, agentconfig.tsx and atoms.tsx (though atoms changes just for troubleshooting)
- updates to app.py to handle getting human input
@SailorJoe6
Copy link
Collaborator Author

@microsoft-github-policy-service agree

@gagb gagb requested a review from victordibia August 27, 2024 17:32
@victordibia victordibia deleted the branch microsoft:autogenstudio August 28, 2024 05:32
@victordibia victordibia reopened this Aug 28, 2024
Copy link

gitguardian bot commented Aug 28, 2024

⚠️ GitGuardian has uncovered 17 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
10404693 Triggered Generic High Entropy Secret d344481 test/oai/test_utils.py View secret
10404695 Triggered Generic High Entropy Secret d5911f0 test/oai/test_utils.py View secret
10404695 Triggered Generic High Entropy Secret 42b4cb4 test/oai/test_utils.py View secret
10404696 Triggered Generic High Entropy Secret d344481 test/oai/test_utils.py View secret
10422482 Triggered Generic High Entropy Secret d344481 test/oai/test_utils.py View secret
10493810 Triggered Generic Password 45faf8f notebook/agentchat_pgvector_RetrieveChat.ipynb View secret
10493810 Triggered Generic Password 153bac5 notebook/agentchat_pgvector_RetrieveChat.ipynb View secret
10493810 Triggered Generic Password 45faf8f notebook/agentchat_pgvector_RetrieveChat.ipynb View secret
10493810 Triggered Generic Password 153bac5 notebook/agentchat_pgvector_RetrieveChat.ipynb View secret
10493810 Triggered Generic Password 45faf8f notebook/agentchat_pgvector_RetrieveChat.ipynb View secret
11616921 Triggered Generic High Entropy Secret 83a7162 notebook/agentchat_agentops.ipynb View secret
11616921 Triggered Generic High Entropy Secret 9671680 notebook/agentchat_agentops.ipynb View secret
12853598 Triggered Generic High Entropy Secret d344481 test/oai/test_utils.py View secret
12853599 Triggered Generic High Entropy Secret d344481 test/oai/test_utils.py View secret
12853600 Triggered Generic High Entropy Secret d344481 test/oai/test_utils.py View secret
12853601 Triggered Generic High Entropy Secret d344481 test/oai/test_utils.py View secret
12853602 Triggered Generic High Entropy Secret d344481 test/oai/test_utils.py View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@victordibia victordibia added the proj-studio Related to AutoGen Studio. label Aug 28, 2024
@victordibia
Copy link
Collaborator

victordibia commented Aug 28, 2024

hi @SailorJoe6 ,

Thanks for this PR. I tested it and it works mostly - really well done! I am eager to merge this in!
I recently updated the autogenstudio branch, rebasing on main hence the inconsistencies above.
Can you kindly help with the following.

  • Recreate your PR based on current autogenstudio branch (sorry about the repeat work).
  • The asyncio logic in websocketmanger. (asyncio.timeout) seems to depend on python 3.11. Any chance this can be rewritten and tested to function in python 3.10? I am happy to consider pros/cons here if needed.

There are a few ux and other small matters that we can discuss and fix later (e.g., making the wait status more clear, ensuring feedback messages are are not written directly to the db etc).

@SailorJoe6
Copy link
Collaborator Author

Hey @victordibia Thanks for the review. I'm happy to re-submit based off the most recent main. Should I submit a PR to merge this to main then?

@SailorJoe6
Copy link
Collaborator Author

Almost forgot. I'm sure I can re-write the Asyncio timeout logic to work in 3.10

@SailorJoe6
Copy link
Collaborator Author

Ask and you shall receive ;-)
#3445

@SailorJoe6 SailorJoe6 closed this Aug 28, 2024
@SailorJoe6 SailorJoe6 deleted the jlanders/roadmap_issue_#1358_human_input branch September 1, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proj-studio Related to AutoGen Studio.
Projects
None yet
Development

Successfully merging this pull request may close these issues.