47 Commits

Author SHA1 Message Date
r48Bit
9418b179c2
Update to correct pip install for litellm (#2602)
The doc mentions `pip install litellm[proxy]` which won't work. The correct command is  `pip install 'litellm[proxy]'`.
2024-05-06 16:18:01 +00:00
Wael Karkoub
372ac1e794
Text Compression Transform (#2225)
* adds implementation

* handles optional import

* cleanup

* updates github workflows

* skip test if dependencies not installed

* skip test if dependencies not installed

* use cpu

* skip openai

* unskip openai

* adds protocol

* better docstr

* minor fixes

* updates optional dependencies docs

* wip

* update docstrings

* wip

* adds back llmlingua requirement

* finalized protocol

* improve docstr

* guide complete

* improve docstr

* fix FAQ

* added cache support

* improve cache key

* cache key fix + faq fix

* improve docs

* improve guide

* args -> params

* spelling
2024-05-06 14:16:49 +00:00
Abdur Rahman Nawaz
4711d7bb9c
Fix for http client (#2579)
* Fix for http client

* fixed constructor to only ignore the http_client while copying

* fixed comment formating

* removed check for http_client and added error message with docs

* fix formatting

* fix formatting

* added test for http-fix

* changed title and content of docs

* changed test func name
2024-05-04 14:12:36 +00:00
Ian
3a4bb088f7
add faq for autogen and openai assistant compatible version (#2587) 2024-05-04 06:56:50 +00:00
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
Gabriel Bezerra Valério
a0fffc815b
feat: add bind_dir arg to DockerCommandLineExecutor + docs update (#2309)
* add bind_dir arg and update docs

* lint
2024-04-30 20:49:04 +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
c94b5c6a61
Use config list in notebook (#2537) 2024-04-28 19:47:27 +00:00
William W Wang
fbcc56c90e
AutoGen cache using Azure Cosmos DB (#2327)
* Create cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Create test_cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cache.py

* Update cache_factory.py

* Update cache.py

* Update cache_factory.py

* Update test_cache.py

* Update test_cache.py

* Update cache.py

* Update llm-caching.md

* Update cache.py

* Update cache.py

* Update cache.py

* Update cache_factory.py

* Update cosmos_db_cache.py

* Update cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update build.yml

* Update build.yml

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update autogen/cache/cache_factory.py

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

* Update cache_factory.py

* Update cosmos_db_cache.py

* Update cache.py

* Update cache_factory.py

* Update cosmos_db_cache.py

* Update .github/workflows/build.yml

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

* Update cache.py

* Update cache.py

* Update cache.py

* Update cache_factory.py

* Update cosmos_db_cache.py

* Update cache.py

* Update cache_factory.py

* Update cosmos_db_cache.py

* Update cache.py

* Update cache_factory.py

* Update cache_factory.py

* Update cache.py

* Update cosmos_db_cache.py

* Update cache.py

* Update cache.py

* Update cache_factory.py

* Update cache.py

* Update cache_factory.py

* Update cosmos_db_cache.py

* Update cache.py

* Update cache_factory.py

* Update cosmos_db_cache.py

* Update cache.py

* Update cache_factory.py

* Update cosmos_db_cache.py

* Update test_cache.py

* Update test_cache.py

* Update test_cache.py

* Update cache.py

* Update cache.py

* Update cache_factory.py

* Update cache.py

* Update cache_factory.py

* Update test_cache.py

* Update test_cache.py

* Update cache.py

* Update cache.py

* Update test_cache.py

* Update cache.py

* Update cache.py

* Update cache_factory.py

* Update cache_factory.py

* Update cache_factory.py

* Update cache_factory.py

* Update cache_factory.py

* Update build.yml

* Update test_cache.py

* Update test_cosmos_db_cache.py

* Update test_cache.py

* Update cache.py

* Update cache_factory.py

* Update cosmos_db_cache.py

* Update test_cache.py

* Update test_cosmos_db_cache.py

* Update test_cache.py

* Update test_cosmos_db_cache.py

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update cache_factory.py

* Update cache.py

* Update cosmos_db_cache.py

* Update cache.py

* Update build.yml

* Update test_cache.py

* Update test_cache.py

* Update test_cache.py

* Update test_cache.py

* Update cache_factory.py

* Update cosmos_db_cache.py

* Update test_cache.py

* Update test_cache.py

* Update test_cache.py

* Update test_cache.py

* Update test_cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update test_cache.py

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update test_cache.py

* Update test_cosmos_db_cache.py

* Update cache.py

* Update cache.py

* Update cache.py

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

* Update cache.py

* Update test_cosmos_db_cache.py

* Update cosmos_db_cache.py

* Update cache.py

* Update test_cosmos_db_cache.py

* Update test_cosmos_db_cache.py

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-04-26 15:23:18 +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
Eric Zhu
4c7107c328
Use latest APIs for tool use, code execution and cache in topic pages (#2071)
* Use code executors and cache in docs.

* Update topic pages

* clean up imports

* update notebook

* Update notebooks

* format

* format

* Update links

* revert notebook

* update

* format

---------

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
2024-04-18 16:55:42 +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
Beibin Li
0aaf30a8da
Merge "Gemini" feature into the main branch (#2360)
* Start Gemini integration: works ok with Text now

* Gemini notebook lint

* try catch "import" for Gemini

* Debug: id issue for chat completion in Gemini

* Add RAG example

* Update docs for RAG

* Fix missing pydash

* Remove temp folder

* Fix test error in runs/7206014032/job/19630042864

* Fix tqdm warning

* Fix notebook output

* Gemini's vision model is supported now

* Install instructions for the Gemini branch

* Catch and retry when see Interval Server Error 500

* Allow gemini to take more flexible messages
i.e., it can take messages where "user" is not the last role.

* Use int time for Gemini client

* Handle other exceptions in gemini call

* rename to "create" function for gemini

* GeminiClient compatible with ModelClient now

* Lint

* Update instructions in Gemini notebook

* Lint

* Remove empty blocks from Gemini notebook

* Add gemini into example page

* self.create instead of call

* Add py and Py into python execution

* Remove error code from merging

* Remove pydash dependency for gemini

* Add cloud-gemini doc

* Remove temp file

* cache import update

* Add test case for summary with mm input

* Lint: warnings instead of print

* Add test cases for gemini

* Gemini test config

* Disable default model for gemini

* Typo fix in gemini workflow

* Correct grammar in example notebook

* Raise if "model" is not provided in create(...)

* Move TODOs into a roadmap

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

Co-authored-by: Davor Runje <davor@airt.ai>

* Gemini test config update

* Update setup.py

Co-authored-by: Davor Runje <davor@airt.ai>

* Update test/oai/test_gemini.py

Co-authored-by: Davor Runje <davor@airt.ai>

* Update test/oai/test_gemini.py

Co-authored-by: Davor Runje <davor@airt.ai>

* Remove python 3.8 from gemini
No google's generativeai for Windows with Python 3.8

* Update import error handling for gemini

* Count tokens and cost for gemini

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Davor Runje <davor@airt.ai>
2024-04-17 00:24:07 +00:00
levscaut
812b7f9666
add support for Anthropic Claude function call (#2311)
* add support for function call

* clear pip install output

* add convert function from `tools` to `functions`

* fix empty user input error(temporary)
2024-04-12 14:53:29 +00:00
Burhanuddin Mustafa Lakdawala
049184edc1
fix markdown for long context user guide (#2351)
https://microsoft.github.io/autogen/docs/topics/long_contexts/
2024-04-11 16:33:01 +00:00
Seth
5292024839
Fix docs related to Azure OpenAI's "model" (#2315)
* gitfu to get gh verified commits

* revive lost point

* fixed openai model related docs

* newline EOF
2024-04-09 18:19:30 +00:00
Wael Karkoub
eca6c048f7
Document Migration to TransformMessages (#2247)
* wip

* tweaks

* undo fix

* undo removal

* adds to FAQ

* modify docs

* undo formatter

* updates docs

* update deprec notice in compressible agent

* restore notebooks

* giorgossideris comments

* cleanup

* resolve comments

* improve english

* improve english

* cleanup

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-04-09 16:30:15 +00:00
Yiran Wu
f7629d668b
Add Custom GroupChat Speaker Selection to tutorial (#2219)
* update

* updated

* update

* update

* update

* update

* remove changes to conversation pattern

* update

* update

* update
2024-04-05 18:03:23 +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
levscaut
b49d6206de
add support for system message in claude (#2280) 2024-04-04 22:44:50 +00:00
levscaut
f5e382a0dd
Add support for Anthropic Claude models (#2245)
* init notebook

* move notebook to website, remove set your api section

* add link to claude page

* replace config_from_json of raw python config

* update cost

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-04-03 22:21:08 +00:00
Davor Runje
d970449d5a
added PNG and JPEG files to LFS automatically (#2226) 2024-04-02 05:20:47 +00:00
Mark Sze
3f63db32b9
Added ability to specify 'role' field for select speaker messages for Group Chats (Replaces PR #2167) (#2199)
* Re-commit of code from PR (#2167) addressing #1861, due to wrong basing

* Update website/docs/topics/non-openai-models/best-tips-for-nonopenai-models.md

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>

* Removed unnecessary notebook images

* Update conversation-patterns.ipynb

Updated to include note about being applicable when auto.

* Updated to include checks that the role is not blank/None. Added tests.

* Changed try-except to use pytest

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-03-31 22:54:17 +00:00
Jack Gerrits
f467f21ec9
Fix formatting of admonitions in udf docs (#2188) 2024-03-28 13:48:24 +00:00
Jack Gerrits
5ef2dfc104
Implement User Defined Functions for Local CLI Executor (#2102)
* Implement user defined functions feature for local cli exec, add docs

* add tests, update docs

* fixes

* fix test

* add pandas test dep

* install test

* provide template as func

* formatting

* undo change

* address comments

* add test deps

* formatting

* test only in 1 env

* formatting

* remove test for local only

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-03-27 23:45:17 +00:00
Eric Zhu
c8aca8dbf7
Native tool call support for Mistral AI API and topic notebook. (#2135)
* Support for Mistral AI API and topic notebook.

* formatting

* formatting
2024-03-25 14:35:29 +00:00
James
212722cd45
missing jupyter when import JupyterCodeExecutor (#2132) 2024-03-24 05:25:46 +00:00
Eric Zhu
3dfa305acb
Update docs for new executors (#2119)
* Update docs for new executors

* Update website/docs/FAQ.mdx

Co-authored-by: gagb <gagb@users.noreply.github.com>

* Update website/docs/FAQ.mdx

Co-authored-by: gagb <gagb@users.noreply.github.com>

* Update website/docs/installation/Installation.mdx

Co-authored-by: gagb <gagb@users.noreply.github.com>

* Update website/docs/installation/Installation.mdx

Co-authored-by: gagb <gagb@users.noreply.github.com>

---------

Co-authored-by: gagb <gagb@users.noreply.github.com>
2024-03-23 04:19:54 +00:00
Eric Zhu
a6a7409ac8
Fix link in non-openai model doc (#2106)
* Fix link in non-openai model doc

* Update about-using-nonopenai-models.md
2024-03-21 00:10:42 +00:00
Mark Sze
7739632ef2
[Documentation] Using non-OpenAI models (#2076)
* Addition of Non-OpenAI LLM section and main doc page

* Continued writing...

* Continued writing - cloud-based proxy servers

* Folder renamed

* Further writing

* together.ai example added

* Local proxy server added, diagram added, tidy up

* Added vLLM to local proxy servers documentation

* As per @ekzhu's feedback, individual pages and tidy up

* Added reference to LM Studio and renamed file

* Fixed incorrect huggingface.co link

* Run pre-commit checks, added LM Studio redirect

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-03-20 20:16:37 +00:00
Eric Zhu
ecc459f8c5
Add tool use chapter to tutorial (#2079)
* Add tool use chapter

* fix format

* typo

* Edits to tool-use chapter

* update

---------

Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
2024-03-20 19:31:58 +00:00
Jack Gerrits
6d2c923424
Consolidate separate caching docs (#2054)
* Consolidate separate caching docs

* add pointer for moved

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-03-20 03:40:59 +00:00
Eric Zhu
6745731612
Add LM Studio Example in Topics (#2044)
* add lm studio example

* format

* newline

* Update lm-studio.ipynb

* Update lm-studio.ipynb

* update

* update
2024-03-19 17:56:25 +00:00
Jack Gerrits
e342cfcdb7
Add docs about how to use docker for when autogen itself is run in docker (#2052) 2024-03-18 17:13:28 +00:00
Chi Wang
cc836de13d
adjust order of side bars (#2040)
* adjust order of side bars

* doc improvement

* limit max turns

* improve tests

* improve doc

* improve docstr
2024-03-17 22:57:54 +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
Qingyun Wu
99df2c5d5e
Examples by topics (#1967)
* add reasoning example

* title

* task decomposition

* update demo with custom speark function

* update

* Add metaprompt

* add notebook to topics

* remove

* remove endpoint setup and collab

* ignore words

* rename

* Update .pre-commit-config.yaml

* codespell

* Updates to formatting and content tweaks

---------

Co-authored-by: kevin666aa <yrwu000627@gmail.com>
Co-authored-by: LeoLjl <3110503618@qq.com>
Co-authored-by: Jack Gerrits <jack@jackgerrits.com>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
2024-03-12 20:57:32 +00:00
Jack Gerrits
f42021fb9b
Remove lint silencing comment (#1970)
No longer needed
2024-03-12 19:51:03 +00:00
Jack Gerrits
80233709e1
Move LLM Caching docs to topics (#1950)
* Move LLM Caching docs to topics

* Update llm-caching.md
2024-03-11 17:30:55 +00:00
Jack Gerrits
83e1789a50
Fix remove -> remote (#1930)
Fix issue reported from twitternhttps://twitter.com/attila_ibs/status/1766376180662329773
2024-03-09 17:47:26 +00:00
Griffin Bassman
f2465357cf
fix: minor fixes and formatting (#1919) 2024-03-08 17:50:49 +00:00
Jack Gerrits
11b8d25426
Add warning and reorder jupyter executor docs (#1908) 2024-03-07 22:03:15 +00:00
Jack Gerrits
f4f9e6c27e
Accept path for work_dir in LocalCommandLineCodeExecutor (#1909)
* Accept path in LocalCommandLineCodeExecutor

* formatting

* fixes
2024-03-07 21:58:40 +00:00
Jack Gerrits
e9219fefc0
Implement docker based command line code executor (#1856)
* implement docker based command line code executor

* undo import

* test skips

* format

* fix type issue

* skip docker tests

* fix paths

* add docs

* Update __init__.py

* class name

* precommit

* undo twoagent change

* use relative to directly

* Update, fixes, etc.

* update doc

* Update docstring

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-03-07 18:11:52 +00:00
Jack Gerrits
a54b733533
Rename to EmbeddedIPythonCodeExecutor (#1871) 2024-03-05 19:41:46 +00:00
Jack Gerrits
0a79512ebd
Add documentation for jupyter code executor (#1809)
* Add documentation for jupyter code executor

* formatting

* move to notebooks

* formatting

* update docs, fix badge bug

* fix lints

* pprint

* stop server
2024-03-04 23:44:20 +00:00
Jack Gerrits
799a24e04f
Create topics dir and move llm config (#1853)
* create topics dir and move llm config

* fix redirect

* fix link
2024-03-04 18:02:26 +00:00