30 Commits

Author SHA1 Message Date
Henry Tu
3fdf8dea22
Add Cerebras Integration (#3585)
* Cerebras Integration

* Address feedback

* Fix typo

* Run formatter
2024-09-30 21:14:55 +00:00
Lala Sabathil
16396b6154
docs: fix autogen install url (#3459)
/docs/installation redirects for some reason to /docs/docs/installation.
Using the full url is more reliable
2024-09-04 15:49:35 +00:00
Anirudh31415926535
5861bd92a6
fix: tool calling cohere (#3355)
* Add support for tool calling cohere

* update tool calling code

* make client name configurable with default

* formatting nits

* update docs

---------

Co-authored-by: Mark Sze <66362098+marklysze@users.noreply.github.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
2024-08-28 18:47:39 +00:00
Mark Sze
ed47ec9d4b
Transform to add an agent's name into the message content (#3334)
* Initial commit with ability to add name into content with a transform

* Transforms documentation

* Fix transform links in documentation

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2024-08-26 07:35:27 +00:00
HRUSHIKESH DOKALA
34b34d0203
Amazon Bedrock Client for AutoGen (#3232)
* intial commit for aws-bedrock

* format

* converse setup for model req-response

* Renamed to bedrock.py, updated parameter parsing, system message extraction, client class incorporation

* Established Bedrock class based on @astroalek and @ChristianT's code, added ability to disable system prompt separation

* Image parsing and removing access credential checks

* Added tests, added additional parameter support

* Amazon Bedrock documentation

* Moved client parameters to init, align parameter names with Anthropic, spelling fix, remove unnecessary imports, use base and additional parameters, update documentation

* Tidy up comments

* Minor typo fix

* Correct comment re aws_region

---------

Co-authored-by: Mark Sze <mark@sze.family>
Co-authored-by: Mark Sze <66362098+marklysze@users.noreply.github.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
2024-08-26 07:28:53 +00:00
Zoltan Lux
780523f10f
Add OpenAI Gemini Example for VertexAI Notebook (#3290)
* add openai-gemini example

* fix exec numbering

* improve isntructions

* fix br  tag

* mention roles/aiplatform.user and fix markdown reference

* remove mentioning the editor role, and only use the Vertex AI User role

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-08-17 22:17:38 +00:00
Li Jiang
08fa1b6d08
Remove dependency on RetrieveAssistantAgent for RetrieveChat (#3320)
* Remove deps on RetrieveAssistantAgent for getting human input

* Terminate when no more context

* Add deprecation warning message

* Clean up RetrieveAssistantAgent, part 1

* Update version

* Clean up docs and notebooks
2024-08-15 16:03:06 +00:00
Mark Sze
cf29a2fac1
Recreated doc for Local LLMs - LiteLLM and Ollama - native function calling in Ollama (#3197)
* Recreated documentation for Local LLMs - LiteLLM and Ollama

* Added Docker = False for code execution example

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-07-29 15:04:44 +00:00
Zoltan Lux
a5e5be73b5
Enhance vertexai integration (#3086)
* switch to officially supported Vertex AI message sending + safety setting converion for vertexai

* add system instructions

* switch to officially supported Vertex AI message sending + safety setting converion for vertexai

* fix bug in safety settings conversion

* add missing system instructions

* add safety settings to send message

* add support for credentials objects

* add type checkingchange project_id to project arg

* add more tests

* fix mock creation in test

* extend docstring

* fix errors with gemini message format in chats

* add option for vertexai response validation setting & improve docstring

* readding empty message handling

* add more tests

* extend and improve gemini vertexai jupyter notebook

* rename project arg to project_id and GOOGLE_API_KEY env var to GOOGLE_GEMINI_API_KEY

* adjust docstring formatting
2024-07-23 16:37:48 +00:00
Zoltan Lux
f55a98f32b
Demo Notebook for Using Gemini with VertexAI (#3032)
* add notebook for using Gemini with VertexAI

* add missing image

* remove part with workload identity federation

* Spelling

* Capitalisation and tweak on config note.

* autogen gemini gcp image

* fix formatting

* move gemini vertexai notebook to website/docs/topics/non-openai-models

* Adjust license

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

* remove auto-generated cell

---------

Co-authored-by: Mark Sze <66362098+marklysze@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-07-07 22:11:35 +00:00
HRUSHIKESH DOKALA
b4a3f263b0
Cohere Client (#3004)
* initial setup for cohere client

* client update

* changes: ClintType added to the utils

* Revert "changes: ClintType added to the utils"

This reverts commit 80d61552287f2d2eff50b4c0f1a4adfd97233aa3.

* Message conversion to Cohere, Parameter handling, cost calculation, streaming, tool calling

* Changed Groq references.

* minor fix

* tests added

* ref fix

* added in the workflows

* Fixed bug on non-streaming text generation

* fix: formatting

* Support Cohere rule for last message not USER when tool_results exist

* Added Cohere to documentation

* fixed client.py merge, removed unnecessary comments in groq.py, updated Cohere documentation, added Groq documentation

* log: ignored params

* update: custom exception added

---------

Co-authored-by: Mark Sze <mark@sze.family>
Co-authored-by: Mark Sze <66362098+marklysze@users.noreply.github.com>
2024-07-03 14:33:03 +00:00
Qingyun Wu
b4837215db
update notebook wording and format (#2991) 2024-06-21 19:58:35 +00:00
Mark Sze
b1ec3ae545
Together AI Client (#2919)
* First pass together.ai client class

* Config handling, models and cost

* Added tests, moved param management to create function

* Tests, parameter, validation, logging updates

* Added use of client_utils PR 2949

* Updated to return OAI response

* Notebook example

* Improved function calling, updated tests, updated notebook with Chess example

* Tidied up together client class, better parameter handling, simpler exception capture, warning for no cost, reuse in tests, cleaner tests

* Update of documentation notebook, replacement of old version

* Fix of messages parameter for hide_tools function call

* Update autogen/oai/together.py

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>

* Update together.py to fix text

---------

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: Yiran Wu <32823396+yiranwu0@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-06-21 17:14:44 +00:00
Garner Fox McCloud
843c343383
Anthropic client fixes (#2981)
* add claude 3.5 sonnet to pricing

* Fix import error for client_utils

* fix import order for ruff formatter

* name key is not supported in anthropic message so let's remove it

* Improved tool use message conversion, changed create to return standard response

* Converted tools to messages for speaker selection, moved message conversion to function, corrected bugs

* Minor bracket typo.

* Renaming function

* add groupchat and run notebook

---------

Co-authored-by: Mark Sze <mark@sze.family>
Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
2024-06-21 16:40:55 +00:00
Mark Sze
27e3690378
Mistral Client (#2892)
* Initial commit of Mistral client class

* Updated to manage final system message for reflection_with_llm

* Add Mistral support to client class

* Add Mistral support across the board (based on Gemini changes)

* Test file for Mistral client

* Updated handling of config, added notebook for documentation

* Added support for additional API parameters

* Remove unneeded code, updated exception raising

* Updated handling of keywords, including type checks, defaults, warnings. Updated notebook example to remove logging warnings.

* Added class description.

* Updated tests to support new config handling.

* Moved parameter parsing to create function, minimised init, added parameter tests

* Refined parameter validation

* Correct spacing

* Fixed string concat in parameter validation

* Corrected upper/lower bound warning

* Use client_tools, tidy up Mistral create, better handle tool call response, tidy tests

* Update of documentation notebook, replacement of old version

* Update to handle multiple tool_call recommendations in a message

* Updated tests to accommodate multiple tool_calls as well as content in message

* Update autogen/oai/mistral.py comment

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>

* cleanup, rewrite mock

* update

---------

Co-authored-by: Qingyun Wu <qingyun0327@gmail.com>
Co-authored-by: kevin666aa <yrwu000627@gmail.com>
2024-06-21 05:42:16 +00:00
HRUSHIKESH DOKALA
32fa709e13
Anthropic Client (#2931)
* intial setup for the anthropic client with cost config

* update: other methods added

* fix: formatting

* fix: config unused

* update: changes made in the client

* update: test added to the workflow

* update: added tests to the anthropic client

* fix: errors in workflows and client

* fix

* fix: anthropic tools type

* update: notebook anthropic

* Nonetype fixed

* fix-tests config

* update: tests and client issues

* logger support

* remove sys path

* updated the functioning of the client

* update: type hints and stream

* skip tests- importerror

* fix: anthropic client and tests

* none fix

* Alternating roles, parameter keywords, cost on response,

* update: anthropic notebook

* update: notebook with more details

* devcontainer

* update: added validate_params from the client_utils

* fix: formatting

* fix: minor comment

---------

Co-authored-by: Mark Sze <mark@sze.family>
2024-06-19 06:15:12 +00:00
Zoltan Lux
a959deeac6
Use Gemini without API key (#2805)
* google default auth and svc keyfile for Gemini

* [.Net] Release note for 0.0.14 (#2815)

* update release note

* update trigger

* [.Net] Update website for AutoGen.SemanticKernel and AutoGen.Ollama (#2814)
support vertex ai compute region

* [CAP] User supplied threads for agents (#2812)

* First pass:  message loop in main thread

* pypi version bump

* Fix readme

* Better example

* Fixed docs

* pre-commit fixes

* refactoring, minor fixes, update gemini demo ipynb

* add new deps again and reset line endings

* Docstring for the init function. Use private methods

* improve docstring

---------

Co-authored-by: Xiaoyun Zhang <bigmiao.zhang@gmail.com>
Co-authored-by: Rajan <rajan.chari@yahoo.com>
Co-authored-by: Zoltan Lux <z.lux@campus.tu-berlin.de>
2024-06-03 21:00:00 +00:00
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
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
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
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
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
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