autogen/setup.py

115 lines
3.4 KiB
Python
Raw Normal View History

2020-12-05 01:40:27 +08:00
import os
import platform
2020-12-05 01:40:27 +08:00
import setuptools
2020-12-05 01:40:27 +08:00
here = os.path.abspath(os.path.dirname(__file__))
with open("README.md", "r", encoding="UTF-8") as fh:
2020-12-05 01:40:27 +08:00
long_description = fh.read()
# Get the code version
version = {}
2023-09-16 18:57:57 +08:00
with open(os.path.join(here, "autogen/version.py")) as fp:
2020-12-05 01:40:27 +08:00
exec(fp.read(), version)
__version__ = version["__version__"]
current_os = platform.system()
2020-12-05 01:40:27 +08:00
install_requires = [
"openai>=1.3",
2023-09-16 18:57:57 +08:00
"diskcache",
"termcolor",
2023-09-16 23:30:28 +08:00
"flaml",
2024-03-12 23:05:53 +08:00
# numpy is installed by flaml, but we want to pin the version to below 2.x (see https://github.com/microsoft/autogen/issues/1960)
"numpy>=1.17.0,<2",
"python-dotenv",
"tiktoken",
# Disallowing 2.6.0 can be removed when this is fixed https://github.com/pydantic/pydantic/issues/8705
"pydantic>=1.10,<3,!=2.6.0", # could be both V1 and V2
"docker",
2024-05-24 22:52:56 +08:00
"packaging",
]
2020-12-05 01:40:27 +08:00
jupyter_executor = [
"jupyter-kernel-gateway",
"websocket-client",
"requests",
"jupyter-client>=8.6.0",
"ipykernel>=6.29.0",
]
retrieve_chat = [
"protobuf==4.25.3",
"chromadb",
"sentence_transformers",
"pypdf",
"ipython",
"beautifulsoup4",
"markdownify",
]
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 21:43:02 +08:00
retrieve_chat_pgvector = [*retrieve_chat, "pgvector>=0.2.5"]
if current_os in ["Windows", "Darwin"]:
retrieve_chat_pgvector.extend(["psycopg[binary]>=3.1.18"])
elif current_os == "Linux":
retrieve_chat_pgvector.extend(["psycopg>=3.1.18"])
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 21:43:02 +08:00
extra_require = {
"test": [
"ipykernel",
"nbconvert",
"nbformat",
"pre-commit",
"pytest-cov>=5",
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 21:43:02 +08:00
"pytest-asyncio",
"pytest>=6.1.1,<8",
"pandas",
],
"blendsearch": ["flaml[blendsearch]"],
"mathchat": ["sympy", "pydantic==1.10.9", "wolframalpha"],
"retrievechat": retrieve_chat,
"retrievechat-pgvector": retrieve_chat_pgvector,
+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-26 07:11:19 +08:00
"retrievechat-mongodb": [*retrieve_chat, "pymongo>=4.0.0"],
"retrievechat-qdrant": [*retrieve_chat, "qdrant_client", "fastembed>=0.3.1"],
"autobuild": ["chromadb", "sentence-transformers", "huggingface-hub", "pysqlite3"],
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 21:43:02 +08:00
"teachable": ["chromadb"],
"lmm": ["replicate", "pillow"],
"graph": ["networkx", "matplotlib"],
"gemini": ["google-generativeai>=0.5,<1", "google-cloud-aiplatform", "google-auth", "pillow", "pydantic"],
"together": ["together>=1.2"],
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 21:43:02 +08:00
"websurfer": ["beautifulsoup4", "markdownify", "pdfminer.six", "pathvalidate"],
"redis": ["redis"],
"cosmosdb": ["azure-cosmos>=4.2.0"],
"websockets": ["websockets>=12.0,<13"],
"jupyter-executor": jupyter_executor,
"types": ["mypy==1.9.0", "pytest>=6.1.1,<8"] + jupyter_executor,
"long-context": ["llmlingua<0.3"],
"anthropic": ["anthropic>=0.23.1"],
"mistral": ["mistralai>=1.0.1"],
"groq": ["groq>=0.9.0"],
"cohere": ["cohere>=5.5.8"],
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 21:43:02 +08:00
}
2020-12-05 01:40:27 +08:00
setuptools.setup(
2023-09-20 01:50:43 +08:00
name="pyautogen",
2020-12-05 01:40:27 +08:00
version=__version__,
2023-09-16 18:57:57 +08:00
author="AutoGen",
2023-09-17 00:41:15 +08:00
author_email="auto-gen@outlook.com",
2023-09-16 18:57:57 +08:00
description="Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework",
2020-12-05 01:40:27 +08:00
long_description=long_description,
long_description_content_type="text/markdown",
2023-09-16 18:57:57 +08:00
url="https://github.com/microsoft/autogen",
2023-09-20 02:26:50 +08:00
packages=setuptools.find_packages(include=["autogen*"], exclude=["test"]),
2020-12-05 01:40:27 +08:00
install_requires=install_requires,
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 21:43:02 +08:00
extras_require=extra_require,
2020-12-05 01:40:27 +08:00
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
2020-12-05 01:40:27 +08:00
],
python_requires=">=3.8,<3.13",
2020-12-05 01:40:27 +08:00
)