* Change defualt model for `lmm`
* Try to use PIL image for LMM's _oai_messages
* Update test cases and llava
* Remove redundant files
* Update the imports for lmm tests
* Test case fix
* Docstring update
* LMM notebook lint
* Typo correction for img_utils and its test
* Fix self.client bug for Dalle Agent
The self.client member variable is reserved for OpenAI's LLM-compatible
client, which requires usage summary support.
So, we rename self.client to self._dalle_client to resolve this issue
* Initialization of fsm blog
* Pre-commit pass
* Pinyin name correction
* Updated title
* Updated title
* Added summary of notebook and note about DAG
* Update index.mdx
* Update website/blog/2024-02-11-FSM-GroupChat/index.mdx
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/blog/2024-02-11-FSM-GroupChat/index.mdx
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Removed outdated filename and followed SoM notebook format
* Pre-commit pass
* Update notebook link
* Corrected link to rendered notebook
* Removed agentchat_hierarchy_flow_using_select_speaker and modified agentchat_groupchat_finite_state_machine
* Add notebook/agentchat_groupchat_finite_state_machine.ipynb to paths
---------
Co-authored-by: freedeaths <register917@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* refactored code to simplify
* optimize function. Instead of iterating over each character, guess at size and then iterate by token.
* adding tests
* Add missing tests
* minor test fix
* simplified token truncation by using tiktoken to encode and decode
* updated truncated notification message
* Fix llm_config spec to use os.environ
* Add test case and fix bug in loop
---------
Co-authored-by: gagb <gagb@users.noreply.github.com>
* Change defualt model for `lmm`
* Try to use PIL image for LMM's _oai_messages
* Update test cases and llava
* Remove redundant files
* Update the imports for lmm tests
* Test case fix
* Docstring update
* LMM notebook lint
* Typo correction for img_utils and its test
* Update test_llava.py
debug, reformat
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
Co-authored-by: Shaokun Zhang <shaokun.zhang@psu.edu>
* WIP:logging
* serialize request, response and client
* Fixed code formatting.
* Updated to use a global package, and added some test cases. Still very-much a draft.
* Update work in progress.
* adding cost
* log new agent
* update log_completion test in test_agent_telemetry
* tests
* fix formatting
* Added additional telemetry for wrappers and clients.
* WIP: add test for oai client and oai wrapper table
* update test_telemetry
* fix format
* More tests, update doc and clean up
* small fix for session id - moved to start_logging and return from start_logging
* update start_logging type to return str, add notebook to demonstrate use of telemetry
* add ability to get log dataframe
* precommit formatting fixes
* formatting fix
* Remove pandas dependency from telemetry and only use in notebook
* formatting fixes
* log query exceptions
* fix formatting
* fix ci
* fix comment - add notebook link in doc and fix groupchat serialization
* small fix
* do not serialize Agent
* formatting
* wip
* fix test
* serialization bug fix for soc moderator
* fix test and clean up
* wip: add version table
* fix test
* fix test
* fix test
* make the logging interface more general and fix client model logging
* fix format
* fix formatting and tests
* fix
* fix comment
* Renaming telemetry to logging
* update notebook
* update doc
* formatting
* formatting and clean up
* fix doc
* fix link and title
* fix notebook format and fix comment
* format
* try fixing agent test and update migration guide
* fix link
* debug print
* debug
* format
* add back tests
* fix tests
---------
Co-authored-by: Adam Fourney <adamfo@microsoft.com>
Co-authored-by: Victor Dibia <victordibia@microsoft.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* code executor
* test
* revert to main conversable agent
* prepare for pr
* kernel
* run open ai tests only when it's out of draft status
* update workflow file
* revert workflow changes
* ipython executor
* check kernel installed; fix tests
* fix tests
* fix tests
* update system prompt
* Update notebook, more tests
* notebook
* raise instead of return None
* allow user provided code executor.
* fixing types
* wip
* refactoring
* polishing
* fixed failing tests
* resolved merge conflict
* fixing failing test
* wip
* local command line executor and embedded ipython executor
* revert notebook
* fix format
* fix merged error
* fix lmm test
* fix lmm test
* move warning
* name and description should be part of the agent protocol, reset is not as it is only used for ConversableAgent; removing accidentally commited file
* version for dependency
* Update autogen/agentchat/conversable_agent.py
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
* ordering of protocol
* description
* fix tests
* make ipython executor dependency optional
* update document optional dependencies
* Remove exclude from Agent protocol
* Make ConversableAgent consistent with Agent
* fix tests
* add doc string
* add doc string
* fix notebook
* fix interface
* merge and update agents
* disable config usage in reply function
* description field setter
* customize system message update
* update doc
---------
Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
Co-authored-by: Aaron <aaronlaptop12@hotmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Add new capability to handle long context
* Make print conditional
* Remove superfluous comment
* Fix msg order
* Allow user to specify max_tokens
* Add ability to specify max_tokens per message; improve name
* Improve doc and readability
* Add tests
* Improve documentation and add tests per Erik and Chi's feedback
* Update notebook
* Update doc string of add to agents
* Improve doc string
* improve notebook
* Update github workflows for context handling
* Update docstring
* update notebook to use raw config list.
* Update contrib-openai.yml remove _target
* Fix code formatting
* Fix workflow file
* Update .github/workflows/contrib-openai.yml
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* add initiate_chats implementation and example
* update notebook
* improve takeaway method
* improve print
* improve print
* improve print
* improve print
* add tests
* minor changes
* format
* correct typo
* make prompt a parameter
* add takeaway method
* groupchat messages
* add SoM example
* fix typo
* fix SoM typo
* simplify chat function
* add carryover
* update notebook
* doc
* remove async for now
* remove condition on reply
* correct argument name
* add notebook in website
* format
* make get_chat_takeaway private
* rename takeaway method and add example
* removing SoM example for now
* carryover test
* add test
* takeaway_method
* update tests
* update notebook
* chats_queue
* add get_chat_takeaway
* delete
* add test
* Update autogen/agentchat/conversable_agent.py
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* docstr
* wording etc
* add chat res
* revise title
* update agent_utils
* unify the async method
* add todo about overriding
* attribute check
* ChatResult type
* revise test
* takeaway to summary
* cache and documentation
* Use cache in summarize chat; polish tests
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Move contrib-openai.yml
* Moved groupgroupchat
* From #753
* Removed local test references
* Added ignore=test/agentchat/contrib
* Trying to pass contrib-openai tests
* More specific in unit testing.
* Update .github/workflows/contrib-tests.yml
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
* Remove coverage as it is included in test dependencies
* Improved docstring with overview of GraphGroupChat
* Iterate on feedback
* Precommit pass
* user just use pip install pyautogen[graphs]
* Pass precommit
* Pas precommit
* Graph utils an test completed
* Added inversion tests
* Added inversion util
* allow_repeat_speaker can be a list of Agents
* Remove unnessary imports
* Expect ValueError with 1 and 0 agents
* Check that main passes all tests
* Check main
* Pytest all in main
* All done
* pre-commit changes
* noqa E402
* precommit pass
* Removed bin
* Removed old unit test
* Test test_graph_utils
* minor cleanup
* restore tests
* Correct documentation
* Special case of only one agent remaining.
* Improved pytest
* precommit pass
* Delete OAI_CONFIG_LIST_sample copy
* Returns a filtered list for auto to work
* Rename var speaker_order_dict
* To write test cases
* Added check for a list of Agents to repeat
* precommit pass
* Update documentation
* Extract names in allow_repeat_speaker
* Post review changes
* hange "pull_request_target" into "pull_request" temporarily.
* 3 return values from main
* pre-commit changes
* PC edits
* docstr changes
* PC edits
* Rest of changes from main
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Remove unnecessary script files from tracking
* Non empty scripts files from main
* Revert changes in script files to match main branch
* Removed link from website as notebook is removed.
* test/test_graph_utils.py is tested as part of L52 of build.yml
* GroupChat ValueError check
* docstr update
* More clarification in docstr
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update autogen/agentchat/groupchat.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* 1.add commit to line138 in groupchat.py;2.fix bug if random choice [];3.return selected_agent if len(graph_eligible_agents) is 1;4.replace all speaker_order to speaker_transitions;5.format
* fix graph_modelling notebook in the last cell
* fix failure in test_groupchat.py
* fix agent out of group to initiate a chat like SocietyOfMind
* add a warning rule in graph_utils to check duplicates in any lists
* refactor allowed_or_disallowed_speaker_transitions to Dict[Agent, List[Agent]] and modify the tests and notebook
* delete Rule 4 in graph_utils and related test case. Add a test to resolve 993fd006e9 (r1460726831)
* fix as the final comments
* modify setup option from graphs to graph and add texts in optional-dependencies.md
* Update autogen/graph_utils.py
---------
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: Yishen Sun <freedeaths@FREEDEATHS-XPS>
Co-authored-by: freedeaths <register917@gmail.com>
* custom model client docs followup
* fix function name in docs
* Update website/docs/Use-Cases/enhanced_inference.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/docs/Use-Cases/enhanced_inference.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/docs/Use-Cases/enhanced_inference.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/docs/Use-Cases/enhanced_inference.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Initial infrasctructure for notebooks page
* migrate two notebooks
* add readme notification for notebook dir
* override 'text' prism language to add basic syntactical structure to autogens output
* Rework to retain existing directory and not expose front matter to consumers of the notebook
* improve error handling of process notebooks
* format, ruff and type fixes
* undo changes to navbar
* update readme, CI
* whitespace
* spelling mistakes
* spelling
* Add contributing guide for notebooks
* update notebook
* formatting
* add client interface, response protocol, and move code into openai client class
* add ability to register custom client
* tidy up code
* adding checks and errors, and more unit tests
* remove code
* fix error msg
* add use_docer False in notebook
* better error message
* add another example to custom model notebook
* rename and have register_client take model name too
* make Client protocol and remove inheritance
* renames
* update notebook
* add link
* rename and more error checking for registered agents
* adding message retrieval to client protocol for more flexible response
* fix failing openai test
* api_type req made model_client_cls requirement
* notebook cleanup and added blog
* remove raise error if client list is empty - client list will never be empty it will have placeholders
* rename Client -> ModelClient
* add forgotten file
* fix test by fetching internal client
* Update autogen/oai/client.py
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* don't add retrieval function to cache
* added placeholder cllient class during initial client init, and rewrote registration
* fix spelling
* Update autogen/agentchat/conversable_agent.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* type hints, small fixes, docstr comment
* fix api type checking
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* function calling upgraded: async/sync mixing works now for all combinations and register_function added to simplify registration of functions without decorators
* polishing
* fixing tests
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Added a GroupChatRepresentative class that uses group chat as an inner-monologue.
* Renamed GroupChatRepresentative to SocietyOfMindAgent
* Added tests for the society of mind agent.
* Don't force message attribution -- the defaults are correct.
* Add names to external messages.
* Added some comments to document code, per request.
* Added some comments to document code, per request.
* Added a Notebook example, and the ability to use a prompt as the response_preparer.
* Protect inner chat with try-catch
* Fixed typo.
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* FAQ and notebook extended
* Update notebook/oai_openai_utils.ipynb
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/docs/FAQ.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/docs/FAQ.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/docs/FAQ.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/docs/FAQ.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update FAQ.md
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* add SQL agent and Spider environment
* Make a notebook. Clean up environment.
* add SQL agent and Spider environment
* Make a notebook. Clean up environment.
* clarify that sql agent is for spider environment
* add link to notebook in docs
* Update doc.
---------
Co-authored-by: Wangda Zhang <wangdazhang@microsoft.com>
Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Initial commit of WebSurfer. Adds the browser_utils, and related tests. WebSurfer will be added in a subsequent commit.
* Added the web surfer agent, and related tests.
* Added a notebook to show how WebSurferAgent works.
* Fixed a typo.
* Updated test_web_surfer for compatibility with #1110.
* Updated skip_oai logic.
* Fixed code formatting.
* More pre-commit fixes.
* Added block to contrib-openai.yml
* Added block to contrib-openai.yml
* Added hook for BING_API_KEY
* Temporarily commented out other tests, per request.
* Fixed indentation (maybe?)
* Restoring contrib-openai.yml
* set use_docker to default to true
* black formatting
* centralize checking and add env variable option
* set docker env flag for contrib tests
* set docker env flag for contrib tests
* better error message and cleanup
* disable explicit docker tests
* docker is installed so can't check for that in test
* pr comments and fix test
* rename and fix function descriptions
* documentation
* update notebooks so that they can be run with change in default
* add unit tests for new code
* cache and restore env var
* skip on windows because docker is running in the CI but there are problems connecting the volume
* update documentation
* move header
* update contrib tests
* def _prepare_chat for groupchat manager to reset the groupchat
* typo
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* typehint and simplify
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* update
* update
* Update notebook/oai_client_cost.ipynb
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* update doc and test
---------
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* run sync and async in async
* test for async multitool call
* uncomment notebook
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Davor Runje <davor@airt.ai>
* bug fix for async functions
* Update test_conversable_agent.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update test/agentchat/test_conversable_agent.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* commented out cell in a notebook until issue #1205 is not fixed
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* fixed spelling, minor errors and reformatted using black
* polishing
* added codespell to pre-commit hooks, fixed a number of spelling errors and a few minor bugs in the code
* update autogen library version in notebooks
* update autogen library version in notebooks
* update autogen library version in notebooks
* update autogen library version in notebooks
* update autogen library version in notebooks
* adjust conversable and compressible agents to support tool_calls
* split out tools into their own reply def
* copilot typo
* address review comments
* revert compressible_agent and token_count_utils calls
* cleanup terminate check and remove unnecessary code
* doc search and update
* return function/tool calls as interrupted when user provides a reply to a tool call request
* fix tool name reference
* fix formatting
* fix initiate receiving a dict
* missed changed roled
* ignore incoming role, more similiar to existing code
* consistency
* redundant to_dict
* fix todo comment
* uneeded change
* handle dict reply in groupchat
* Fix generate_tool_call_calls_reply_comment
* change method annotation for register_for_llm from functions to tools
* typo autogen/agentchat/conversable_agent.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* add deprecation comments for function_call
* tweak doc strings
* switch to ToolFunction type
* update the return to
* fix generate_init_message return type
* Revert "fix generate_init_message return type"
This reverts commit 645ba8b76a.
* undo force init to dict
* fix notebooks and groupchat tool handling
* fix type
* use get for key error
* fix teachable to pull content from dict
* change single message tool response
* cleanup unnessary changes
* little better tool response concatenation
* update tools tests
* add skip openai check to tools tests
* fix nits
* move func name normalization to oai_reply and assert configured names
* fix whitespace
* remove extra normalize
* tool name is now normalized in the generate_reply function, so will not be incorrect when sent to receive
* validate function names in init and expand comments for validation methods
* fix dict comprehension
* Dummy llm config for unit tests
* handle tool_calls set to None
* fix tool name reference
* method operates on responses not calls
---------
Co-authored-by: Yiran Wu <32823396+kevin666aa@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* try to fix blog
* modify blog
* fix test error in #717; fix blog typo in installation; update blogs with output examples.
* pre-commit
* pre-commit
* Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
* add future work
* fix grammar
* update agent_builder
* solve #941; add detailed debug info; support json string config
* pre-commit
* solve #954
* pre-commit
* [new feature] build group chat agents from library.
* pre-commit
* add authors' info in notebook; add a new notebook for build_from_library; reduce prompt effort
* update test and example for build_from_library
* pre-commit
* add notebook; update docs
* change notebook name
* change description for notebook and doc
* remove default value for default_llm_config
* add embedding similarity agent selection
* pre-commit
* update test
* add dependency installation in github workflow
* update test
* pre-commit
* update notebook
* support directly json as library; support customize embedding model
* update test
* pre-commit
* update github test workflow
* Update autobuild_agent_library.ipynb
* add agent description
* refine prompt; update notebook
* pre-commit
* update test example
* update test
* update test
* update test
* change `config_path` to `config_path_or_env`; update test
* pre-commit
* update test
* update test
* update test: add config_file_location
* change `config_path_or_env` to `config_file_or_env`
* update test
* solve noqa
* fix import error for conftest
* fix test error
* pre-commit
* * update error message in `_create_agent`.
* replace `gpt-4-1106-preview` to `gpt-4` in test file.
* add comment on local server creation; modify notebook; update contrib-openai.yml for test; add autobuild option in setup.py; add autotest model name statement
* move import huggingface_hub to _create_agent
* pre-commit
* add uncover comment in the endpoint creation code block
* recover contrib-openai.yml for merge
---------
Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
* Add fabric example
* Support both 0.1.x and 0.2.x
* Fix comments
* update ecosystem
* update png
---------
Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* update cost for cache
* fix test
* fix bug when reponse doesn't have usage info
* update setupversion
* update
* update
* Update setup.py
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
---------
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* add function decorator to converasble agent
* polishing
* polishing
* added function decorator to the notebook with async function calls
* added support for return type hint and JSON encoding of returned value if needed
* polishing
* polishing
* refactored async case
* Python 3.8 support added
* polishing
* polishing
* missing docs added
* refacotring and changes as requested
* getLogger
* documentation added
* test fix
* test fix
* added testing of agentchat_function_call_currency_calculator.ipynb to test_notebook.py
* added support for Pydantic parameters in function decorator
* polishing
* Update website/docs/Use-Cases/agent_chat.md
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Update website/docs/Use-Cases/agent_chat.md
Co-authored-by: Li Jiang <bnujli@gmail.com>
* fixes problem with logprob parameter in openai.types.chat.chat_completion.Choice added by openai version 1.5.0
* get 100% code coverage on code added
* updated docs
* default values added to JSON schema
* serialization using json.dump() add for values not string or BaseModel
* added limit to openai version because of breaking changes in 1.5.0
* added line-by-line comments in docs to explain the process
* polishing
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Add examples of constrained generation
* Add guidance based coder that always returns valid code blocks
* Add guidance based agent that always generates a valid json
* Add link to guidance nb
* Add example nb for async funcs
* Add a notebook based test for async function calls
* Update nb
* Update nb
* Remove duplicate code
* Rename func for consistency
* Fix bug
* Add intro text for cmd cell 4
* Add a short comment on await
* Update agentchat_function_call_async.ipynb
Minor typo
* Add link to nb
---------
Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
* add agentchat_video_transcript_translate.ipynb
* finish the agentchat_video_transcript_translate.ipynb file notebook
* modify the recognize_transcript_from_video function
* run the script and add the output to the notebook
* implement the notebook
* add the link to the video clip
* rename the file and add the version requirement of each packages
* add the new notebook path
* add the notebook path to Example.md
* add the new notebook path to the new example.md
* add the instruction of FFmpeg and video download
* Update Examples.md
* Update Examples.md
* Update Examples.md
* Update Examples.md
* Delete notebook/agentchat_video_transcript_translate.ipynb
* Update Examples.md and add the link
---------
Co-authored-by: silver233jpg <60947716+silver233jpg@users.noreply.github.com>
* Change "content" type in Conversable Agent
* content and system_message support str and List
Update for all other agents
* Content_str now also takes None as input
* Group Chat now works with LMM too
* Style: newline for import in Conversable Agentt
* Add test for gourpchat + lmm
* Resolve comments
1. Undo AssistantAgent changes
2. Modify the asserts and raises in `content_str` function and update
test accordingly.
* Undo AssistantAgent
* Update comments and add assertion for LMM
* Typo fix in docstring for content_str
* Remove “None” out conversable_agent.py
* Lint message to dict in multimodal_conversable_agent.py
* Address lint issues
* linting
* Move lmm test into contrib test
* Resolve 2 comments
* Move img_utils into contrib folder
* Resolve img_utils path issues
* Enable defining new functions after agent creation
* Add notebook for function inception example
* format
* 1. fix bug 2. support remove function
* 1. fix bug 2. support remove function
* 1. add example doc 2. change test file 3. change ipynb title
* Update website/docs/Examples.md
---------
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
* Update chat_with_teachable_agent.py to v2.
* Update agentchat_teachability.ipynb to v2.
* Add test of teachability accuracy.
* Update installation instructions.
* Add to contrib tests.
* pre-commit fixes
* Apply reviewer suggestions to test workflows.
* Update agentchat_oai_assistant_retrieval.ipynb
our -> your to reduce confusion
* Update notebook/agentchat_oai_assistant_retrieval.ipynb
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* add agenteval-notebook for math problems and the blog post about it
* update gitignore
* updates to notebook
* adding folder for the logs
* adding math problems logs
* adding folder for alfworld logs
* added limitiation and future work to blog post
* minor edits blog post
* adding changes
* reorg
* modify the main notebook
* modification of the main notebook
* remove wrong notebook
* uploading new notebook
* update agenteval notebook
* change the sample
* Update agenteval_cq_math.ipynb
* adding final changes to notebook
* updated framework picture
* Update index.mdx
* Update index.md
* Add files via upload
* updates to notebool
* revise the blog
* revise the blog
* update the agent img
* revise the blog
* revise the blog
* Excluded model logs from the main branch, you can find them in agenteval branch
* Fixed pre-commit formatting.
* Update website/blog/2023-11-11-AgentEval/index.mdx
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* update gitignore
* update index.mdx
* update authors.yml by adding Negar and Julia
* remove md file
* remove md file
* update gitignore
* update authors file
* pre-commit checks
* pre-commit checks on authors.yml
* pre-commit checks on authors.yml
* update index.mdx
* update authors.yml by adding Negar and Julia
* updated the blog-post version 1
* updated the blog-post: TL;DR is ready
* updated the blog-post: first part of introduction is ready
* updated figures: typos on fig 1, changed terminology on the fig 2
* upadated the Framework part
* fixed redering issues
* upload zip file instead of single samples
* update prealgebra.zip
* update
* upload
* update z
* update naming
* update zip
* update the agenteval notebook
* update the notebook - removing unmercenary logs
* updated fig 1 and references to it
* updated fig 1
* incorporated PR comments
* merged agenteval branch
* final changes to the blog
* updated taxonomy
* update notebook
* minor changes to the blog
* Fixed formatting
* Update the link in agenteval_cq_math.ipynb
* update the blog and link in notebook
* Update index.mdx
* change folder name
* Changes to be committed:
modified: OAI_CONFIG_LIST_sample.txt
* add sample OAI file
* fix the url link to colab and typos
* fix the url link to colab and typos
* add authors
* update profile pic
* "update authors"
* fixing the problem in test_groupchat.py
* update the title lower case
* reverting changes in setup.py
* rerun pre-commit
---------
Co-authored-by: Negar Arabzadeh <ngr.arabzadeh@gmail.com>
Co-authored-by: Julia Kiseleva <jukisele@microsoft.com>
Co-authored-by: afourney <adamfo@microsoft.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
* Add custom text types and recursive
* Add custom text types and recursive
* Fix format
* Update qdrant, Add pdf to unstructured
* Use unstructed as the default text extractor if installed
* Add tests for unstructured
* Update tests env for unstructured
* Fix error if last message is a function call, issue #569
* Remove csv, md and tsv from UNSTRUCTURED_FORMATS
* Update docstring of docs_path
* Update test for get_files_from_dir
* Update docstring of custom_text_types
* Fix missing search_string in update_context
* Add custom_text_types to notebook example
* Refactor GPTAssistantAgent constructor to handle
instructions and overwrite_instructions flag
- Ensure that `system_message` is always consistent with `instructions`
- Ensure provided instructions are always used
- Add option to permanently modify the instructions of the assistant
* Improve default behavior
* Add a test; add method to delete assistant
* Add a new test for overwriting instructions
* Add test case for when no instructions are given for existing assistant
* Add pytest markers to test_gpt_assistant.py
* add test in workflow
* update
* fix test_client_stream
* comment out test_hierarchy_
* Add basic gptassistant notebook
- also improve logging in gpt assistant
* Update notebook/agentchat_oai_assistant_twoagents_basic.ipynb
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
* Notebook showing how to use select speaker to control conversation flow.
* pytest associated with notebook.
* Added llm_config to assistant and user proxy agent, and clarified why we set use_cache to false, as requested in the review.
* Added a @pytest.mark.skipif decorator like other tests to run it only in one py version, 3.10
* Fixed config warning.
* Removd llm_config to UserProxyAgent
* Fixed minor typos.
* Reran outputs
* Remopved llm_config from user_proxy_agent
* Colab Badge link updated.
* pre-commit formatting changes.
* Fixed base_url
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* LMM Code added
* LLaVA notebook update
* Test cases and Notebook modified for OpenAI v1
* Move LMM into contrib
To resolve test issues and deploy issues
In the future, we can install pillow by default, and then move back
LMM agents into agentchat
* LMM test setup update
* try...except... clause for LMM tests
* disable patch for llava agent test
To resolve dependencies issue for build
* Add LMM Blog
* Change docstring for LMM agents
* Docstring update patch
* llava: insert reply at position 1 now
So, it can still handle human_input_mode
and max_consecutive_reply
* Resolve comments
Fixing: typos, blogs, yml, and add OpenAIWrapper
* Signature typo fix for LMM agent: system_message
* Update LMM "content" from latest OpenAI release
Reference https://platform.openai.com/docs/guides/vision
* update LMM test according to latest OpenAI release
* Fully support GPT-4V now
1. Add a notebook for GPT-4V. LLava notebook also updated.
2. img_utils updated
3. GPT-4V formatter now return base64 image with mime type
4. Infer mime type directly from b64 image content (while loading
without suffix)
5. Test cases modified according to all the related changes.
* GPT-4V link updated in blog
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* UPDATE - FAQ section in documentation
* FIX - formatting test failure
* FIX - added disclaimer
* pre-commit
* Update website/docs/FAQ.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/docs/FAQ.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Update website/docs/FAQ.md
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* UPDATE - notebook and FAQ information for config_list_from_models
---------
Co-authored-by: Ward <award40@LAMU0CLP74YXVX6.uhc.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
* LMM notebook
* Use "register_reply" instead.
* Loop check LLaVA non-empty response
* Run notebook
* Make the llava_call function more flexible
* Include API for LLaVA from Replicate
* LLaVA data format update x2
1. prompt formater function
2. conversation format with SEP
* Coding example added
* Rename "ImageAgent" -> "LLaVAAgent"
* Docstring and comments updates
* Debug notebook: Remote LLaVA tested
* Example 1: remove system message
* MultimodalConversableAgent added
* Add gpt4v_formatter
* LLaVA: update example 1
* LLaVA: Add link to "Table of Content"
* Initial commit.
* Disable LLM response caching.
* Add teachability option to setup.py
* Modify test to use OAI_CONFIG_LIST as suggested in the docs.
* Expand unit test.
* Complete unit test.
* Add filter_dict
* details
* AnalysisAgent
* details
* More documentation and debug output.
* Support retrieval of any number of relevant memos, including zero.
* More robust analysis separator.
* cleanup
* teach_config
* refactoring
* For robustness, allow more flexibility on memo storage and retrieval.
* de-dupe the retrieved memos.
* Simplify AnalysisAgent. The unit tests now pass with gpt-3.5
* comments
* Add a verbosity level to control analyzer messages.
* refactoring
* comments
* Persist memory on disk.
* cleanup
* Use markdown to format retrieved memos.
* Use markdown in TextAnalyzerAgent
* Add another verbosity level.
* clean up logging
* notebook
* minor edits
* cleanup
* linter fixes
* Skip tests that fail to import openai
* Address reviewer feedback.
* lint
* refactoring
* Improve wording
* Improve code coverage.
* lint
* Use llm_config to control caching.
* lowercase notebook name
* Sort out the parameters passed through to ConversableAgent, and supply full docstrings for the others.
* lint
* Allow TextAnalyzerAgent to be given a different llm_config than TeachableAgent.
* documentation
* Modifications to run openai workflow.
* Test on just python 3.10.
Replace agent with agent teachable_agent as recommended.
* Test on python 3.9 instead of 3.10.
* Remove space from name -> teachableagent
---------
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Add group chat and retrieve agent example
* Fix link and models
* Support call rag in a group chat and not init with rag
* Fix n_results logic
* Update notebook
* Fix format
* Improve wording
* Update variable name
* Revert to main
* Update function call
* Update keys
* Update contents
* Update contents
* FORMATTING
* UPDATE - OAI __init__.py
* ruff
* ADD - notebook covering oai API configuration options and their different purposes
* ADD openai util updates so that the function just assumes the same environment variable name for all models, also added functionality for adding API configurations like api_base etc.
* ADD - updates to config_list_from_dotenv and tests for openai_util testing, update example notebook
* UPDATE - added working config_list_from_dotenv() with passing tests, and updated notebook
* UPDATE - code and tests to potentially get around the window build permission error, used different method of producing temporary files
---------
Co-authored-by: Ward <award40@LAMU0CLP74YXVX6.uhc.com>
* UPDATE - Updated retrieve_utils.py to have the ability to parse text from pdf files
* UNDO - change to recursive condition
* UPDATE - updated agentchat_RetrieveChat.ipynb to clarify which file types are accepted to be in the docs path
* ADD - missing import
* UPDATE - setup.py to have PyPDF2 in retrievechat
* RE-ADD - urls
* ADD - tests for retrieve utils, and removed deprecated PyPdf2
* Update agentchat_RetrieveChat.ipynb
* Update retrieve_utils.py
Fix format
* Update retrieve_utils.py
Replace print with logger
* UPDATE - added more specific exception to PDF decryption try/catch
* FIX - typo, return statement at wrong indentation in extract_text_from_pdf
---------
Co-authored-by: Ward <award40@LAMU0CLP74YXVX6.uhc.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Improves clarity and fixes punctuation in README and Multi-agent documentation
* fix broken colab link to agentchat_groupchat_research.ipynb (others are fine)
* fix typos, improves readability
* fix bug for windows
* fix bug for windows
* more clear example
* link to example
* add test
* format
* comment
* fix assertion error
* fix test error and links
---------
Co-authored-by: Chi Wang (MSR) <chiw@microsoft.com>
* group chat for visualization
* show figure
* webpage update
* link update
* example 2
* example 2
---------
Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
* test
* chart
* plan
* separate
* bump version to 2.0.1
* explain plan and code/lang
* notebook update
* notebook update
* typo
* plan
* match can be None
* max consecutive auto reply
* chess notebook
* link to notebook
* clear history
* filter
* **context -> context
* format str template
* groupchat
* register class specific reply
* groupchat notebook
* move human reply into generate_reply
* arg in config
* colab link
* remove room
* rename