Commit Graph

369 Commits

Author SHA1 Message Date
Dev Khant 1ff477fefb
Integrate Mem0 for providing long-term memory for AI Agents (#3389)
* Add Mem0 docs

* add notebook link

* add notebook

* formatting

* formatting fix

* resolve comments

* writeup for mem0

---------

Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Aristo <6344553+randombet@users.noreply.github.com>
Co-authored-by: gagb <gagb@users.noreply.github.com>
2024-09-06 00:07:06 +00:00
Li Jiang 40cfe07a95
Update usage of built-in LLMs (#3474) 2024-09-05 20:51:39 +00:00
Aristo e579a4609d
[Graph RAG] Init Commit with GraphRag interfaces (#3388)
* [Graph RAG] Init Commit with GraphRag interfaces

* Add Document class for graph rag input document

* Add Graph RAG Capability

* Add unit test for graph rag interfaces

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: gagb <gagb@users.noreply.github.com>
2024-09-04 16:11:02 +00:00
Andy Zhou 740df28260
Add Language Agent Tree Search (LATS) notebook (#3376)
* Add Language Agent Tree Search (LATS) notebook

* removed outputs

---------

Co-authored-by: Andy Zhou <andyzhou@4bd094a2-01.cloud.together.ai>
Co-authored-by: Shaokun Zhang <shaokunzhang529@gmail.com>
2024-08-21 17:58:53 +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
Wael Karkoub 6682b6d2d0
Removes Support For `TransformChatHistory` and `CompressibleAgent` (#3313)
* remove old files

* removes ci

* removes faq

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2024-08-13 03:28:02 +00:00
Li Jiang b370170faf
Stop retrieve more docs if all docs have been returned (#3282) 2024-08-06 04:02:12 +00:00
Li Jiang f8663e3581
Update Microsoft Fabric notebook (#3243)
Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
2024-07-29 10:02:19 +00:00
Jib 56979a1105
[Typo] Update MongoDB Notebook to acknlowedge >=M10 support (#3220)
* [Typo] Update MongoDB Notebook to acknlowedge >=M10 support

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

* Add link!

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2024-07-29 08:20:41 +00:00
Fabian Valle f9295c4c39
+mdb atlas vectordb [clean_final] (#3000)
* +mdb atlas

* Update test/agentchat/contrib/vectordb/test_mongodb.py

Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>

* update test_mongodb.py; we dont need to do the assert .collection_name vs .name

* Try fix mongodb service

* Try fix mongodb service

* Update username and password

* Update autogen/agentchat/contrib/vectordb/mongodb.py

* closer --- but im not super thrilled about the solution...

* PYTHON-4506 Expanded tests and simplified vector search pipelines

* Update mongodb.py

* Update mongodb.py - Casey

* search_index_magic

index_name change; keeping track of lucene indexes is tricky

* Fix format

* Fix tests

* hacking trying to figure this out

* Streamline checks for indexes in construction and restructure tests

* Add tests for score_threshold, embedding inclusion, and multiple query tests

* refactored create_collection to meet base object requirements

* lint

* change the localhost port to 27017

* add test to check that no embedding is there unless explicitly provided

* Update logger

* Add test get docs with ids=None

* Rename and update notebook

* have index management include waiting behaviors

* Adds further optional waits or users and tests. Cleans up upsert.

* ensure the embedding size for multiple embedding inputs is equal to dimensions

* fix up tests and add configuration to ensure documents and indexes are READY for querying

* fix import failure

* adjust typing for 3.9

* fix up the notebook output

* changed language to communicate time taken on first init_chat call

* replace environment variable usage

---------

Co-authored-by: Fabian Valle <fabian.valle-simmons@mongodb.com>
Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Casey Clements <casey.clements@mongodb.com>
Co-authored-by: Jib <jib.adegunloye@mongodb.com>
Co-authored-by: Jib <Jibzade@gmail.com>
Co-authored-by: Cozypet <yanhan860711@gmail.com>
2024-07-25 23:11:19 +00:00
Adil Khalil e08fd68cdb
Fix typo in agentchat_society_of_mind.ipynb (#3180)
Co-authored-by: Mark Sze <66362098+marklysze@users.noreply.github.com>
2024-07-25 18:23:41 +00:00
Umer Mansoor 0cdbc345c5
Update JSON_mode_example.ipynb (#3130)
Improve minor mistakes in documentation
2024-07-18 02:07:40 +00:00
Nikita Fedyashev 0beb0a7f61
Fix typo in agentchat_nestedchat.ipynb (#3139) 2024-07-18 01:27:01 +00:00
Li Jiang 6ef5c3027d
Update qdrant notebook for new qdrant vectordb (#3140)
* Add qdrant notebook, rename notebooks

* Revert changes of pgvector notebook

* Fix assertion error
2024-07-16 06:44:48 +00:00
Chi Wang ff311eec6c
fix notebook (#3093) 2024-07-11 23:45:05 +00:00
Mark Sze fbf24a5f6f
Blog post for enhanced non-OpenAI model support (#2965)
* Blogpost for enhanced non-OpenAI model support

* update: quickstart with simple conversation

* update: authors details

* Added upfront text

* Added function calling, refined text. Added chess for alt-models notebook, updated examples listing.

* Added Groq to blog

* Removed acknowledgements

---------

Co-authored-by: Hk669 <hrushi669@gmail.com>
Co-authored-by: HRUSHIKESH DOKALA <96101829+Hk669@users.noreply.github.com>
2024-07-02 19:28:24 +00:00
Alex Reibman 9b92093b00
LLM Observability documentation fixes: Broken links, grammar, and spelling (#2995)
* update markdown hyperlinks to stable urls

* update notebook images and text

* re-write observability section

* Updated section

* update wording

* added newline

* update styling in image tags to be jsx compatible

* added text

* update link

* simplified text

---------

Co-authored-by: Braelyn Boynton <bboynton97@gmail.com>
2024-06-22 03:05:11 +00:00
Yiran Wu 84f82dc5ec
Uniform Interface for calling different LLMs (#2916)
* update

* update

* Minor tweaks on text

---------

Co-authored-by: Mark Sze <66362098+marklysze@users.noreply.github.com>
2024-06-21 17:30:59 +00:00
Ikko Eltociear Ashimine 54190bbacd
Update agentchat_function_call_currency_calculator.ipynb (#2952)
minor fix
2024-06-18 05:38:35 +00:00
LeoLjl c54e8a5db1
[Autobuild] improve robustness and reduce cost (#2907)
* Update Autobuild.

* merge main into autobuild

* update test for new autobuild

* update author info

* fix pre-commit

* Update autobuild notebook

* Update autobuild_agent_library.ipynb

* Update autobuild_agent_library.ipynb

* Fix pre-commit failures.

---------

Co-authored-by: Linxin Song <rm.social.song1@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-06-14 14:14:08 +00:00
Yiran Wu 39f688778e
Allow passing in custom pricing in config_list (#2902)
* update

* update

* TODO comment removed

* update

---------

Co-authored-by: Yiran Wu <32823396+kevin666aa@users.noreply.github.com>
Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-06-13 20:10:47 +00:00
Wael Karkoub 004ba22637
human input mode annotations fixed (#2864)
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-06-13 04:53:55 +00:00
Davor Runje a0787aced3
pre-commit version update and a few spelling fixes (#2913) 2024-06-12 06:26:22 +00:00
Li Jiang 067fa88b67
Update notebook (#2886) 2024-06-11 13:04:37 +00:00
Audel Rouhi bf7e4d619c
Bugfix: PGVector/RAG - Calculate the Vector Size based on Model Dimensions (#2865)
* Calculate the dimension size based off model chosen.

* Added example docstring.

* Validated working notebook with sentence models of different dimensions.

* Validated removal of model_name working.

* Second example uses conn object.

* embedding_function no longer directly references .encode

* Fixed pre-commit issue.

* Use try/except to raise error when shape is not found in embedding function.

* Re-ran notebook.

* Update autogen/agentchat/contrib/vectordb/pgvectordb.py

Co-authored-by: Li Jiang <bnujli@gmail.com>

* Update autogen/agentchat/contrib/vectordb/pgvectordb.py

Co-authored-by: Li Jiang <bnujli@gmail.com>

* Added .encode

* Removed example comment.

* Fix overwrite doesn't work with existing collection when custom embedding function has different dimension from default one

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
2024-06-11 12:16:56 +00:00
Chi Wang 2d6c8c012b
version update (#2908)
* version update

* version update
2024-06-10 18:23:51 +00:00
Braelyn Boynton 85ad929f34
AgentOps Runtime Logging Implementation (#2682)
* add agentops req

* track conversable agents with agentops

* track tool usage

* track message sending

* remove record from parent

* remove record

* simple example

* notebook example

* remove spacing change

* optional dependency

* documentation

* remove extra import

* optional import

* record if agentops

* if agentops

* wrap function auto name

* install agentops before notebook test

* documentation fixes

* notebook metadata

* notebook metadata

* pre-commit hook changes

* doc link fixes

* git lfs

* autogen tag

* bump agentops version

* log tool events

* notebook fixes

* docs

* formatting

* Updated ecosystem manual

* Update notebook for clarity

* cleaned up notebook

* updated precommit recommendations

* Fixed links to screenshots and examples

* removed unused files

* changed notebook hyperlink

* update docusaurus link path

* reverted setup.py

* change setup again

* undo changes

* revert conversable agent

* removed file not in branch

* Updated notebook to look nicer

* change letter

* revert setup

* revert setup again

* change ref link

* change reflink

* remove optional dependency

* removed duplicated section

* Addressed clarity commetns from howard

* minor updates to wording

* formatting and pr fixes

* added info markdown cell

* better docs

* notebook

* observability docs

* pre-commit fixes

* example images in notebook

* example images in docs

* example images in docs

* delete agentops ong

* doc updates

* docs updates

* docs updates

* use agent as extra_kwarg

* add logging tests

* pass function properly

* create table

* dummy function name

* log chat completion source name

* safe serialize

* test fixes

* formatting

* type checks

---------

Co-authored-by: reibs <areibman@gmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Howard Gil <howardbgil@gmail.com>
Co-authored-by: Alex Reibman <meta.alex.r@gmail.com>
2024-06-07 06:01:03 +00:00
Krishna Shedbalkar de99564a6e
Broken links fix (#2843)
* Update Examples.md

* Update agent_chat.md

* Update agent_chat.md

* Update Optional-Dependencies.md

* Update JSON_mode_example.ipynb

* Update JSON_mode_example.ipynb

* Update JSON_mode_example.ipynb

* Update JSON_mode_example.ipynb

* Update agentchat_agentoptimizer.ipynb

* Update agentchat_nested_chats_chess.ipynb
2024-06-02 18:58:10 +00:00
Diego Colombo 6e8331b754
Add llamaindex agent integration (#2831)
* white spaces

* add llamaindex agent wrapper for autogen

* formatting

* formatting fixes

* add support for llamaindex agents

* fix style

* fix style

* delete file

* re-add file

* fixes pre-commit errors

* feat: Add agentchat_group_chat_with_llamaindex_agents notebook

This commit adds the notebook "agentchat_group_chat_with_llamaindex_agents.ipynb" which demonstrates how to integrate Llamaindex agents into Autogen. The notebook includes code for setting up the API endpoint, creating Llamaindex agents, and setting up a group chat.

* Refactor code

* feat: Add test for LLamaIndexConversableAgent

This commit adds a new test file `test_llamaindex_conversable_agent.py` that contains a test case for the `LLamaIndexConversableAgent` class. The test verifies the functionality of group chat with two MultimodalConversable Agents, limiting the chat by the `max_round` parameter. It also checks if the number of rounds does not exceed the maximum specified rounds.

The purpose of this change is to ensure that the `LLamaIndexConversableAgent` behaves as expected and correctly handles group chats with limited rounds.

Note: This commit includes import statements and setup code necessary for running the test case.

* fix formatting

* feat: Add LlamaIndexAgent job to GitHub Actions workflow

This commit adds a new job called "LlamaIndexAgent" to the GitHub Actions workflow. The job runs on multiple operating systems (ubuntu-latest, macos-latest, windows-2019) and uses Python version 3.11. It sets up the Python environment, installs necessary packages and dependencies for LMM, performs coverage testing using pytest, and uploads the coverage report to Codecov.

The commit also includes changes to the test_llamaindex_conversable_agent.py file. It imports os and sys modules, appends a path to sys.path, and adds skip conditions for tests based on certain conditions.

These changes improve the CI/CD pipeline by adding a new job for LlamaIndexAgent and enhancing test conditions in test_llamaindex_conversable_agent.py.

* fix test yaml

* cleanup tests

* fix test run

* formatting

* add test

* fix yaml

* pr feedback

* add documentation to website

* fixed style

* edit to document page

* newline

* make skip reason easier to see

* compose skip reasons

* fix env variable name

* refactor: Update package installation in contrib workflows

- Replaced specific package installations with more general ones
- Updated the installation of llama-index packages and dependencies
- Added new packages for llama-index and Wikipedia tools

* Update dependencies and add new agents for group chat

- Update dependencies to specific versions
- Add new agent `entertainent_specialist` for discovering entertainment opportunities in a location
- Modify the `test_group_chat_with_llama_index_conversable_agent` function to include the new agent in the group chat

* Update pydantic version requirement in setup.py

- Update pydantic version requirement from "pydantic>=1.10,<3,!=2.6.0" to "pydantic>=1.10,<3"
- Remove comment about issue with pydantic 2.6.0

* Refactor ChatMessage instantiation in _extract_message_and_history()

- Refactored the instantiation of ChatMessage in the _extract_message_and_history() function.
- Added an empty dictionary as additional_kwargs to the ChatMessage constructor.

* Refactor test_llamaindex_conversable_agent.py

- Removed unused import and variable
- Updated OpenAI model to gpt-4
- Reduced max_iterations for location_specialist and entertainment_specialist from 30 to 5
- Changed human_input_mode for user_proxy to "NEVER"
- Added assertion for max_rounds in entertainent_assistant

These changes improve code efficiency and ensure proper functionality.

* Remove entertainment_specialist agent and update user_proxy settings in test_llamaindex_conversable_agent.py

- Remove the creation of entertainent_specialist agent
- Update the max_consecutive_auto_reply setting for user_proxy to 10
- Update the default_auto_reply setting for user_proxy to "Thank you. TERMINATE"

* Refactor installation of LlamaIndex packages and dependencies

- Simplify installation commands for LlamaIndex packages
- Remove specific version numbers from pip install commands

* Update test_llamaindex_conversable_agent.py to include verbose output during pytest.

- Add the -v flag to the pytest command in contrib-openai.yml.
- Print a message when skipping the test due to missing dependencies or key.

* Refactor OpenAI workflow, remove LlamaIndexAgent

This commit removes the LlamaIndexAgent from the OpenAI workflow in order to streamline and simplify the code. The LlamaIndexAgent was no longer necessary and its removal improves overall code organization and maintainability.

* feat: Add test for group chat functionality with LLamaIndexConversableAgent

use mock reactagent in test

* Update Dockerfile for devcontainer

- Updated the Dockerfile for the devcontainer environment.
- Added installation of build-essential, npm, git-lfs, and other packages.
- Upgraded pip and installed pydoc-markdown, pyyaml, and colored libraries.

* Update devcontainer.json with new VS Code extensions and terminal settings

- Updated the list of VS Code extensions in devcontainer.json to include "GitHub.copilot"
- Added a new terminal profile for Linux with the path set to "/bin/bash"
- Set the default Linux terminal profile to "bash"

* removeall

* feat: Add Dockerfiles and devcontainer configurations

This commit adds Dockerfiles and devcontainer configurations for different use cases in the `.devcontainer` directory. The following changes were made:

- Added `Dockerfile` for basic setups (`base`)
- Added `Dockerfile` for advanced features (`full`)
- Added `Dockerfile` for AutoGen project developers (`dev`)
- Added `Dockerfile` for AutoGen project developers using Studio (`studio`)
- Updated existing files with necessary dependencies and configurations
- Modified README.md to provide instructions on customizing Dockerfiles and managing the Docker environment

These changes allow users to easily set up their AutoGen development environment using Docker containers.

* delete

* Add authors.yml file with author information

This commit adds the authors.yml file, which contains information about various authors contributing to the project. Each author entry includes their name, title, URL, and image URL. This file will be used to display author information on the website.

* delete

* Add test cases for agent chat functionality

This commit adds new test cases for the agent chat functionality. The test cases include scenarios such as auto feedback from code execution, function calls, currency calculator, async function calls, group chat finite state machine, cost token tracking, and group chat state flow. These test cases cover different versions of Python (3.10, 3.11, and 3.12) and are skipped if OpenAI is not installed or the Python version does not match.

* delete

* feat: Add LLM configuration documentation

This commit adds documentation for configuring an agent's access to LLMs. It includes information on the `llm_config` argument, `config_list`, and other configuration parameters. The commit also provides examples of filtering the `config_list` based on model names and tags. Additionally, it demonstrates how to add an HTTP client in `llm_config` for proxy usage. Finally, it mentions helper functions for loading a config list from API keys, environment variables, files, or `.env` files.

Closes #1234

* delete

* feat: Add LLM configuration documentation

This commit adds documentation for configuring an agent's access to LLMs. It includes information on the `llm_config` argument, `config_list`, and other configuration parameters. The commit also provides examples of filtering the `config_list` based on model names and tags. Additionally, it demonstrates how to add an HTTP client in `llm_config` for proxy usage. Finally, it mentions helper functions for loading a config list from various sources.

Closes #1234

* delete

* adding back notebooks

* reset

* feat: Add setup.py for package installation

This commit adds a new file, `setup.py`, which is used for installing the package. The `setup.py` file includes information such as the author, description, and dependencies of the package. This allows users to easily install and use the package in their projects.

The `setup.py` file also includes different extra requirements for specific functionalities, such as retrieving chat data or running Jupyter notebooks. These extra requirements are installed when specified during installation.

Overall, this addition improves the usability and installation process of the package.
2024-05-31 20:58:15 +00:00
Chi Wang 2abdbfbbcf
fix links and tags from databricks notebook (#2795) 2024-05-26 16:31:18 +00:00
TJ 5a2900124b
DBRX (Databricks LLM) example notebook (#2434)
* Resolving test failures locally

* Resolving test failures locally

* Updates to website resources and docs, author

* Adding image

* Fixes to precommit and doc files for lfd

* Fixing ruff exclusion of new notebook

* Updates to support notebook rendering

* Updates to support notebook rendering

* Removing some results to try to fix docs render issue

* pre-commit to standardize formatting

---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-05-25 16:28:46 +00:00
Audel Rouhi 6604ca511b
PGVector Support for Custom Connection Object (#2566)
* Added fixes and tests for basic auth format

* User can provide their own connection object. Added test for it.

* Updated instructions on how to use. Fully tested all 3 authentication methods successfully.

* Get password from gitlab secrets.

* Hide passwords.

* Update notebook/agentchat_pgvector_RetrieveChat.ipynb

Co-authored-by: Li Jiang <bnujli@gmail.com>

* Hide passwords.

* Added connection_string test. 3 tests total for auth.

* Fixed quotes on db config params. No other changes found.

* Ran notebook

* Ran pre-commits and updated setup to include psycopg[binary] for windows and mac.

* Corrected list extension.

* Separate connection establishment function. Testing pending.

* Fixed pgvectordb auth

* Update agentchat_pgvector_RetrieveChat.ipynb

Added autocommit=True in example

* Rerun notebook

---------

Co-authored-by: Li Jiang <bnujli@gmail.com>
Co-authored-by: Li Jiang <lijiang1@microsoft.com>
2024-05-24 17:58:56 +00:00
Aretai-Leah e87a6a424d
Create JSON_mode_example.ipynb (#2554)
* Create JSON_mode_example.ipynb

* updated json example

* added metadata to JSON notebook

* fixed details in wrong metadata

* Update JSON_mode_example.ipynb

removed colab cell

* fixed error

* removed cell output

* whitespace fixed

I think its fixed?

* finally fixed whitespace
2024-05-24 13:12:36 +00:00
Wael Karkoub 2bad145738
Update Deprecation Warning for `CompressibleAgent` and `TransformChatHistory` (#2685)
* improved deprecation warnings

* compressible_agent test fix

* fix retrieve chat history test

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
2024-05-22 19:58:35 +00:00
HRUSHIKESH DOKALA d461100bfa
Custom Runtime Logger <> FileLogger (#2596)
* added logger param for custom logger support

* added FileLogger

* bump: spell check

* bump: import error

* added more log functionalites

* bump: builtin logger for FileLogger

* type check and instance level logger

* tests added for the fileLogger

* formatting bump

* updated tests and removed time formatting

* separate module for the filelogger

* update file logger test

* added the FileLogger into the notebook

* bump json decode error

* updated requested changes

* Updated tests with AutoGen agents

* bump file

* bump: logger accessed before intializedsolved

* Updated notebook to guide with a filename

* added thread_id to the FileLogger

* bump type check in tests

* Updated thread_id for each log event

* Updated thread_id for each log event

* Updated with tempfile

* bump: str cleanup

* skipping-windows tests

---------

Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2024-05-16 05:54:05 +00:00
James Woffinden-Luey dad9c66104
Agenteval integration (#2672)
* first pass at offline agent eval integration

* Integrating AgentEval for offline scenarios

* removing old changes

* fixing notebook, updating docs

* fixing subcriteria bug

* updating class comment

* cleaning up agent constructors

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

* fixing build breaks

* fixing formatting break

* fixing comments

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

* fixing import ordering

* adding basic agenteval tests and fixing criteria parsing bug

* first try at adding openai agenteval tests to build process

* adding non-openai agenteval tests to build process

* updating test settings

* updating openai test

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

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

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

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

* test commit

* updating typing and converting to pydantic objects

* fixing test file

---------

Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Wael Karkoub <wael.karkoub96@gmail.com>
2024-05-14 07:14:37 +00:00
Adam Hultman 8276ad3db6
fix agent optimizer nb typo (#2642) 2024-05-10 23:06:27 +00:00
Thong Q. Nguyen 648dad5c40
Fix chess example (#2631) 2024-05-09 17:35:00 +00:00
zbram101 498aa7f367
notebook showing assistant agents connecting azure ai search and azur… (#2594)
* notebook showing assistant agents connecting azure ai search and azure identity

* formatting fix for notebook azr_ai_search

---------

Co-authored-by: Bharadwaj Ramachandran <bharadwajramachandran@Bharadwajs-MacBook-Pro.local>
2024-05-06 16:12:00 +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
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