Commit Graph

330 Commits

Author SHA1 Message Date
Ian bf0c49d96f
Add a guide doc for GPTAssistantAgent (#2562)
* add a oai assistant agent guide

* add a oai assistant agent guide

* polish

* address comments

* remove useless type ingnore comments

* fix ci

---------

Co-authored-by: Ian Zhai <ian@IandeMacBook-Pro.local>
2024-05-03 02:36:48 +00:00
Justin Trugman 10bb25ba7d
Function Calling with GPTAssistantAgent (#2375)
* Function Calling with GPTAssistantAgent

* Add Link to Notebook in Website

* Add metadata to the notebook

* formatting of H2 and H3 text

* updated to new method of function calling

* Run Pre-commit

* utilize get_function_schema
2024-05-02 16:56:15 +00:00
giorgossideris 11a43421e3
Min tokens in token limiter (#2400)
* Add minimum token threshold in MessageHistoryLimiter

* Update transforms tests for the threshold

* Move min_threshold_tokens from Message to Token Limiter

* Optimize _check_tokens_threshold

Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>

* Apply requested changes (renaming, phrasing, validations)

* Fix format

* Fix _check_tokens_threshold logic

* Update docs and notebook

* Improve phrasing

* Add min_tokens example in notebook

* Add min_tokens example in website docs

* Add min_tokens example in notebook

* Update website docs to be in sync with get_logs change

---------

Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-04-29 02:11:16 +00:00
Chi Wang 5a007e0d47
tags for config (#2539) 2024-04-29 01:35:12 +00:00
Chi Wang c94b5c6a61
Use config list in notebook (#2537) 2024-04-28 19:47:27 +00:00
Audel Rouhi 1b8d65df0a
2447 fix pgvector tests and notebook (#2455)
* Re-added missing notebook

* Test installing postgres

* Error handle the connection.

* Fixed import.

* Fixed import.

* Fixed creation of collection without client.

* PGVector portion working. OpenAI untested.

* Fixed prints.

* Added output.

* Fixed pre-commits.

* Run pgvector notebook

* Improve efficiency of get_collection

* Fix delete_collection

* Fixed issues with pytests and validated functions.

* Validated pytests.

* Fixed pre-commits

* Separated extra_requires to allow more logic. Retrieve_chat base dependencies included on pgvector and qdrant.

* Fixed extra newline.

* Added username and password fields.

* URL Encode the connection string parameters to support symbols like %

* Fixed pre-commits.

* Added pgvector service

* pgvector doesn't have health intervals.

* Switched to colon based key values.

* Run on Ubuntu only. Linux is only option with container service support.

* Using default credentials instead.

* Fix postgres setup

* Fix postgres setup

* Don't skip tests on win and mac

* Fix command error

* Try apt install postgresql

* Assert table does not exist when deleted.

* Raise value error on a empty list or None value provided for IDs

* pre-commit

* Add install pgvector

* Add install pgvector

* Reorg test files, create a separate job for test pgvector

* Fix format

* Fix env format

* Simplify job name, enable test_retrieve_config

* Fix test_retrieve_config

* Corrected behavior for get_docs_by_ids with no ids returning all docs.

* Corrected behavior for get_docs_by_ids with no ids returning all docs.

* Fixed pre-commits.

* Added return values for all functions.

* Validated distance search is implemented correctly.

* Validated all pytests

* Removed print.

* Added default clause.

* Make ids optional

* Fix test, make it more robust

* Bump version of openai for the vector_store support

* Added support for choosing the sentence transformer model.

* Added error handling for model name entered.

* Updated model info.

* Added model_name db_config param.

* pre-commit fixes and last link fix.

* Use secrets password.

* fix: link fixed

* updated tests

* Updated config_list.

* pre-commit fix.

* Added chat_result to all output.
Unable to re-run notebooks.

* Pre-commit fix detected this requirement.

* Fix python 3.8 and 3.9 not supported for macos

* Fix python 3.8 and 3.9 not supported for macos

* Fix format

* Reran notebook with MetaLlama3Instruct7BQ4_k_M

* added gpt model.

* Reran notebook

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Hk669 <hrushi669@gmail.com>
2024-04-28 13:43:02 +00:00
Audel Rouhi ded2d612c3
[Re-Opened] Support for PGVector Database in Autogen (#2439)
* PGVector Contrib Initial Commit - KnucklesTeam:autogen:pgvector_contrib fork

* Update website/docs/ecosystem/pgvector.md

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Updated qdrant installation instructions.

* Fixed openai version.

* Added dependencies to install for qdrant and pgvector in contrib tests.

* Added dependencies to install for qdrant and pgvector in contrib tests.

* Cleaned up dependencies.

* Removed flaml out of setup.py. Used only for notebook example.

* Added PGVector notebook link

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-04-18 20:00:03 +00:00
Chi Wang 6636689cb9
speed up notebook in CI and fix CI failures (#2427)
* speed up notebook in CI

* improve notebook

* comment about filter

* bug fix for summary

* bump version to 0.2.26

* restrict openai version

* news update

* add tags in example
2024-04-18 16:43:34 +00:00
Eric Zhu 2df0f39b00
Update the auto_feedback_from_code_execution notebook to use code executor (#2366)
* Use code executors in notebook.

* Add custom code executor guide

* Add to gitignore

* Update

* fix links

* link

* typo

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-04-18 07:53:19 +00:00
Eric Zhu 3c266c5c01
Fix function call notebook to make sure title is displayed. (#2403)
* Fix function call notebook to make sure title is displayed.

* Fix formatting

* formatting
2024-04-17 14:02:10 +00:00
Li Jiang c4e570393d
Support setting vector_db as a param (#2313)
* Added vectordb base and chromadb

* Remove timer and unused functions

* Added filter by distance

* Added test utils

* Fix format

* Fix type hint of dict

* Rename test

* Add test chromadb

* Fix test no chromadb

* Add coverage

* Don't skip test vectordb utils

* Add types

* Fix tests

* Fix docs build error

* Add types to base

* Update base

* Update utils

* Update chromadb

* Add get_docs_by_ids

* Improve docstring

* Update init params

* Update init vector db

* Add get all docs

* Move chroma_results_to_query_results to utils

* Add init vectordb

* Convert format of results for old version

* Improve type hints

* Update get_context for new query results format

* Fix typo

* Improve init db

* Update default folder

* Update logger

* Update init, add embedding func

* Update distance_threshold

* Fix logger name

* Update qdrant

* Fix init db

* Update notebooks

* Use kwargs to improve readability

* Improve docstring of vectordb, add two attributes

* Add db_config

* Update gitignore

* Update comments

* Add source

* Fix file downloaded from urls have the same name

* Remove files added by mistake

* Improve docstring

* Update docstring

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* Update docstring

* Update docstring

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-04-17 08:30:05 +00:00
Grigorij Dudnik 36f1bf5a56
Code writing with a function call notebook created (#2121)
* code writing with function call notebook created

* code formatting

* code formatting

* code formatting

* Remarks improved

* trying to resolve conflicts in Examples.md

* trying to solve conflict, improving llm_config

* working on conflict in examples

* working on conflict in examples

* working with examples.md

* examples

* repairing examples

* Examples updated

* notebook included

* code formatting

* code formatting

* tool defenition added

* code formatting

* dot removed

* starting code

* starting code

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-04-16 15:40:49 +00:00
HRUSHIKESH DOKALA 59daf78d9f
Made the cost info easier to read (#2356)
* gather_usage_summary has been updated

* updated cost info to 'usage_including_cached_inference' and 'usage_excluding_cached_inference'

* fix: pre-commit formatting for cost_info

* improved cost explanation and doc

* improved cost info doc

* include - exclude

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-04-15 01:18:50 +00:00
Shaokun Zhang 9069eb926a
support llm_config in AgentOptimizer (#2299)
* support llm_config in agentoptimizer

* fix doc

* restore seed timeout

---------

Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-04-11 13:46:42 +00:00
Yiran Wu 72bd0bde3c
Update StateFlow to use LocalCommandLineCodeExecutor (#2335)
* update

* update
2024-04-10 21:53:26 +00:00
Mart 918fd6b481
Improve readability of notebooks (#2200)
* Improve readability

* Update context_handling.py

update line breaks according to comment of reviewer

* Update agentchat_groupchat_finite_state_machine.ipynb

corrected sentence according to comment of reviewer

* Update autogen/agentchat/contrib/capabilities/context_handling.py

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>

---------

Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-04-09 15:07:44 +00:00
Davor Runje 0e0895fe18
Fix typo in websockets notebook (#2287)
* Fixe typo in websockets notebook

* fixes
2024-04-05 15:49:23 +00:00
Chi Wang ebd0210fa1
bump version to 0.2.22 (#2256)
* bump version to 0.2.22

* doc update

* link update

* consider the failure case
2024-04-05 13:41:14 +00:00
Li Jiang 42b27b9a9d
Add isort (#2265)
* Add isort

* Apply isort on py files

* Fix circular import

* Fix format for notebooks

* Fix format

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-04-05 02:26:06 +00:00
Li Jiang 46bee1f366
Update RetrieveChat blog to fix some outdated APIs (#2273)
* Fix rag blog

* Update wording
2024-04-04 19:18:39 +00:00
Eric Zhu c63c52adec
Notebook on web scraping with tool use (#2192)
* Add web scrapping notebook

* formatting

* tags

* Update

* update
2024-04-02 14:09:10 +00:00
Davor Runje d970449d5a
added PNG and JPEG files to LFS automatically (#2226) 2024-04-02 05:20:47 +00:00
Andrew Kulakov 44acab46db
Fixed spelling in agentchat_transform_messages.ipynb (#2234) 2024-04-01 16:40:51 +00:00
Davor Runje 3b04210ee7
polishing (#2227) 2024-04-01 16:27:31 +00:00
Wael Karkoub fd96d3d1f5
Improve Image Generation Notebook (#2213)
* notebook improved

* metadata
2024-03-31 22:53:35 +00:00
jtoy 989c18274d
2147 - Fix notebook bug to make a copy of configs for each agent (#2176)
* try fix groupchat llm_config

* Update agentchat_groupchat_RAG.ipynb

* use better config options

* formatting

---------

Co-authored-by: i <i@jtoy.net>
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Jason <jtoy@grids.local>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-03-31 16:39:20 +00:00
Shaokun Zhang 16db0b957f
Render AgentOptimzier notebook in web (#2197)
* update

* change tag

---------

Co-authored-by: AnonymousRepoSub <“shaokunzhang529@outlook.com” >
2024-03-29 14:32:22 +00:00
Wael Karkoub 8cb5c14c82
Transform Messages Capability (#1923)
* wip

* Adds docstrings

* fixed spellings

* wip

* fixed errors

* better class names

* adds tests

* added tests to workflow

* improved token counting

* improved notebook

* improved token counting in test

* improved docstrings

* fix inconsistencies

* changed by mistake

* fixed docstring

* fixed details

* improves tests + adds openai contrib test

* fix spelling oai contrib test

* clearer docstrings

* remove repeated docstr

* improved notebook

* adds metadata to notebook

* Improve outline and description (#2125)

* better dir structure

* clip max tokens to allowed tokens

* more accurate comments/docstrs

* add deperecation warning

* fix front matter desc

* add deperecation warning notebook

* undo local notebook settings changes

* format notebook

* format workflow

---------

Co-authored-by: gagb <gagb@users.noreply.github.com>
2024-03-28 16:16:17 +00:00
Davor Runje 78aa0eb220
Introducing IOStream protocol and adding support for websockets (#1551)
* Introducing IOStream

* bug fixing

* polishing

* refactoring

* refactoring

* refactoring

* wip: async tests

* websockets added

* wip

* merge with main

* notebook added

* FastAPI example added

* wip

* merge

* getter/setter to iostream added

* website/blog/2024-03-03-AutoGen-Update/img/dalle_gpt4v.png: convert to Git LFS

* website/blog/2024-03-03-AutoGen-Update/img/gaia.png: convert to Git LFS

* website/blog/2024-03-03-AutoGen-Update/img/teach.png: convert to Git LFS

* add SSL support

* wip

* wip

* exception handling added to on_connect()

* refactoring: default iostream is being set in a context manager

* test fix

* polishing

* polishing

* polishing

* fixed bug with new thread

* polishing

* a bit of refactoring and docs added

* notebook added to docs

* type checking added to CI

* CI fix

* CI fix

* CI fix

* polishing

* obsolete todo comment removed

* fixed precommit error

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-03-26 22:39:55 +00:00
Shaokun Zhang 72994ea127
Integrate AgentOptimizer (#1767)
* draft agent optimizer

* refactor

* remove

* change openai config interface

* notebook

* update blog

* add test

* clean up

* redir

* update

* update interface

* change model name

* move to contrib

* Update autogen/agentchat/contrib/agent_optimizer.py

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>

---------

Co-authored-by: “skzhang1” <“shaokunzhang529@gmail.com”>
Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-03-26 20:31:02 +00:00
Qingyun Wu a1322d2475
context to kwargs (#2064)
* context to kwargs

* add tag

* add test

* text to kwargs

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-03-26 16:31:55 +00:00
Eric Zhu 2bfa181b4d
New conversational chess notebook using nested chats and tool use (#2137)
* add chess notebook

* update

* update

* Update notebook with figure

* Add example link

* redirect

* Clean up example format

* address gagan's comments

* update references

* fix links
2024-03-25 16:24:08 +00:00
Beibin Li 2f109f5f94
Add vision capability (#2025)
* Add vision capability

* Configurate: description_prompt

* Print warning instead of raising issues for type

* Skip vision capability test if dependencies not installed

* Append "vision" to agent's system message when enabled VisionCapability

* GPT-4V notebook update with ConversableAgent

* Clean GPT-4V notebook

* Add vision capability test to workflow

* Lint import

* Update system message for vision capability

* Add a `custom_caption_func` to VisionCapability

* Add custom function example for vision capability

* Skip test Vision capability custom func

* GPT-4V notebook metadata to website

* Remove redundant files

* The custom caption function takes more inputs now

* Add a more complex example of custom caption func

* Remove trailing space

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-03-24 19:46:55 +00:00
Ikko Eltociear Ashimine a8abe59085
Update agentchat_nestedchat_optiguide.ipynb (#2122)
auxillary -> auxiliary
2024-03-23 01:29:55 +00:00
Aristo 96cbaf72d3
Fix a initiate chats (#1938)
* Fix async a_initiate_chats

* Fix type compatibility for python 3.8

* Use partial func to fix context error

* website/docs/tutorial/assets/conversable-agent.jpg: convert to Git LFS

* Update notebook examples

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Davor Runje <davor@airt.ai>
2024-03-17 22:51:37 +00:00
Ian 36c4d6aa3e
Separate openai assistant related config items from llm_config (#2037)
* add assistant config

* add test

* change notebook to use assistant config

* use assistant config in testing

* code refinement

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-03-16 17:21:59 +00:00
Qingyun Wu 8844f86525
Allow different senders in nested chat (#2028)
* allow sender in nested chat

* description

* update example list

* doc format

* meta data

* add test
2024-03-15 22:26:45 +00:00
Wael Karkoub c5536ee92b
[Feature] Adds Image Generation Capability 2.0 (#1907)
* adds image generation capability

* add todo

* readded cache

* wip

* fix content str bugs

* removed todo: delete imshow

* wip

* fix circular imports

* add notebook

* improve prompt

* improved text analyzer + notebook

* notebook update

* improve notebook

* smaller notebook size

* made changes to the wrong branch :(

* resolve comments + 1

* adds doc strings

* adds cache doc string

* adds doc string to add_to_agent

* adds doc string to ImageGeneration

* instructions are not configurable

* removed unnecessary imports

* changed doc string location

* more doc strings

* improves testability

* adds tests

* adds cache test

* added test to github workflow

* compatible llm config format

* configurable reply function position

* skip_openai + better comments

* fix test

* fix test?

* please fix test?

* last fix test?

* remove type hint

* skip cache test

* adds mock api key

* dalle-2 test

* fix dalle config

* use apu key function

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-03-15 22:11:53 +00:00
Jack Gerrits ea2c1b270e
Add another batch of notebooks to the website (#1969)
* Add another batch of notebooks to the website

* update link

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-03-15 14:30:34 +00:00
Yiran Wu f78985d359
StateFlow Blog (#1826)
* init PR

* update

* update code check

* update

* update

* update

* update

* update

* Test the ability to have agents a,u,t,o,g,e,n speak in turn.

* update

* update

* update

* Evidence that groupchat not terminating because of the TERMINATE substring.

* Raising NoEligibleSpeakerException allows graceful exit before max turns

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* update

* udpate to comments

* update

* Update website/blog/2024-02-29-StateFlow/index.mdx

Co-authored-by: Chi Wang <wang.chi@microsoft.com>

* update links

* remove unnecessary changes

* Update website/blog/2024-02-29-StateFlow/index.mdx

Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>

* Update website/blog/2024-02-29-StateFlow/index.mdx

Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>

* remove test for custom notebook

* update

* update

---------

Co-authored-by: Joshua Kim <Joshua@spectdata.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Joshua Kim <joshkyh@users.noreply.github.com>
2024-03-14 15:46:28 +00:00
Qingyun Wu e1c0423d9a
add RAG under topics (#1990)
* add RAG

* demo

* correct notebook

* Update quarto installation

* Update gitignore

* Update format

* RAG doc

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2024-03-14 00:49:39 +00:00
Jack Gerrits 11df53bb39
Make notebooks available in navbar (#1956) 2024-03-11 22:46:39 +00:00
Chi Wang 523581825b
improve validation of llm_config (#1946)
* improve validation of llm_config

* fixed test_register_for_llm_without_LLM

* docstr about llm_config=None

* Make None a sentinel

* pop tools

---------

Co-authored-by: Davor Runje <davor@airt.ai>
2024-03-11 22:36:00 +00:00
Jack Gerrits 968483369c
Update whisper notebook to use new function registration syntax (#1918)
* Update notebook to use new function registration syntax

* Update agentchat_video_transcript_translate_with_whisper.ipynb

* formatting
2024-03-11 18:10:50 +00:00
Jack Gerrits 00e097d4a5
Update more notebooks to be available on the website (#1890)
* Update more notebooks to be available on the website

* fix notebook

* update link
2024-03-10 02:14:45 +00:00
Qingyun Wu c75655a340
Supporting callable message (#1852)
* add message field

* send

* message func doc str

* test dict message

* retiring soon

* generate_init_message docstr

* remove todo

* update notebook

* CompressibleAgent

* update notebook

* add test

* retrieve agent

* update test

* summary_method args

* summary

* carryover

* dict message

* update nested doc

* generate_init_message

* fix typo

* update docs for mathchat

* Fix missing message

* Add docstrings

* model

* notebook

* default naming

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
2024-03-09 20:27:46 +00:00
Jack Gerrits 78a5a6b20c
Fix formatting in sequential chat notebook (#1914) 2024-03-08 04:38:18 +00:00
Ricky Loynd c5e76653cb
Fix links (#1905) 2024-03-07 22:15:19 +00:00
Yiran Wu 1f9284ce54
Compressible Agent require `model` field for `llm_config` (#1903)
* update

* update

* update

* update

* Update autogen/agentchat/contrib/compressible_agent.py

---------

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
2024-03-07 16:45:17 +00:00
Yiran Wu c37227bd04
Allow user to pass in a customized speaker selection method (#1791)
* init PR

* update

* update code check

* update

* update

* update

* update

* Test the ability to have agents a,u,t,o,g,e,n speak in turn.

* update

* update

* update

* Evidence that groupchat not terminating because of the TERMINATE substring.

* Raising NoEligibleSpeakerException allows graceful exit before max turns

* update

* To confirm with author that custom function is meant to override graph constraints

* Confirmed the expected test behaviour with author

* Update autogen/agentchat/groupchat.py

* update

* update

---------

Co-authored-by: Joshua Kim <Joshua@spectdata.com>
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
2024-03-07 02:28:22 +00:00