You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

setup.py 2.7 kB

5 years ago
5 years ago
5 years ago
2 years ago
5 years ago
2 years ago
2 years ago
5 years ago
5 years ago
2 years ago
5 years ago
2 years ago
2 years ago
2 years ago
5 years ago
2 years ago
2 years ago
5 years ago
2 years ago
2 years ago
[AutoBuild] Supporting build agents from library; supporting generating agent descriptions (#1039) * try to fix blog * modify blog * fix test error in #717; fix blog typo in installation; update blogs with output examples. * pre-commit * pre-commit * Update website/blog/2023-11-26-Agent-AutoBuild/index.mdx Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu> * add future work * fix grammar * update agent_builder * solve #941; add detailed debug info; support json string config * pre-commit * solve #954 * pre-commit * [new feature] build group chat agents from library. * pre-commit * add authors' info in notebook; add a new notebook for build_from_library; reduce prompt effort * update test and example for build_from_library * pre-commit * add notebook; update docs * change notebook name * change description for notebook and doc * remove default value for default_llm_config * add embedding similarity agent selection * pre-commit * update test * add dependency installation in github workflow * update test * pre-commit * update notebook * support directly json as library; support customize embedding model * update test * pre-commit * update github test workflow * Update autobuild_agent_library.ipynb * add agent description * refine prompt; update notebook * pre-commit * update test example * update test * update test * update test * change `config_path` to `config_path_or_env`; update test * pre-commit * update test * update test * update test: add config_file_location * change `config_path_or_env` to `config_file_or_env` * update test * solve noqa * fix import error for conftest * fix test error * pre-commit * * update error message in `_create_agent`. * replace `gpt-4-1106-preview` to `gpt-4` in test file. * add comment on local server creation; modify notebook; update contrib-openai.yml for test; add autobuild option in setup.py; add autotest model name statement * move import huggingface_hub to _create_agent * pre-commit * add uncover comment in the endpoint creation code block * recover contrib-openai.yml for merge --------- Co-authored-by: Jieyu Zhang <jieyuz2@cs.washington.edu> Co-authored-by: Qingyun Wu <qingyun.wu@psu.edu>
2 years ago
TeachableAgent (#278) * Initial commit. * Disable LLM response caching. * Add teachability option to setup.py * Modify test to use OAI_CONFIG_LIST as suggested in the docs. * Expand unit test. * Complete unit test. * Add filter_dict * details * AnalysisAgent * details * More documentation and debug output. * Support retrieval of any number of relevant memos, including zero. * More robust analysis separator. * cleanup * teach_config * refactoring * For robustness, allow more flexibility on memo storage and retrieval. * de-dupe the retrieved memos. * Simplify AnalysisAgent. The unit tests now pass with gpt-3.5 * comments * Add a verbosity level to control analyzer messages. * refactoring * comments * Persist memory on disk. * cleanup * Use markdown to format retrieved memos. * Use markdown in TextAnalyzerAgent * Add another verbosity level. * clean up logging * notebook * minor edits * cleanup * linter fixes * Skip tests that fail to import openai * Address reviewer feedback. * lint * refactoring * Improve wording * Improve code coverage. * lint * Use llm_config to control caching. * lowercase notebook name * Sort out the parameters passed through to ConversableAgent, and supply full docstrings for the others. * lint * Allow TextAnalyzerAgent to be given a different llm_config than TeachableAgent. * documentation * Modifications to run openai workflow. * Test on just python 3.10. Replace agent with agent teachable_agent as recommended. * Test on python 3.9 instead of 3.10. * Remove space from name -> teachableagent --------- Co-authored-by: Li Jiang <bnujli@gmail.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com>
2 years ago
Graph group chat (#857) * Move contrib-openai.yml * Moved groupgroupchat * From #753 * Removed local test references * Added ignore=test/agentchat/contrib * Trying to pass contrib-openai tests * More specific in unit testing. * Update .github/workflows/contrib-tests.yml Co-authored-by: Li Jiang <lijiang1@microsoft.com> * Remove coverage as it is included in test dependencies * Improved docstring with overview of GraphGroupChat * Iterate on feedback * Precommit pass * user just use pip install pyautogen[graphs] * Pass precommit * Pas precommit * Graph utils an test completed * Added inversion tests * Added inversion util * allow_repeat_speaker can be a list of Agents * Remove unnessary imports * Expect ValueError with 1 and 0 agents * Check that main passes all tests * Check main * Pytest all in main * All done * pre-commit changes * noqa E402 * precommit pass * Removed bin * Removed old unit test * Test test_graph_utils * minor cleanup * restore tests * Correct documentation * Special case of only one agent remaining. * Improved pytest * precommit pass * Delete OAI_CONFIG_LIST_sample copy * Returns a filtered list for auto to work * Rename var speaker_order_dict * To write test cases * Added check for a list of Agents to repeat * precommit pass * Update documentation * Extract names in allow_repeat_speaker * Post review changes * hange "pull_request_target" into "pull_request" temporarily. * 3 return values from main * pre-commit changes * PC edits * docstr changes * PC edits * Rest of changes from main * Update autogen/agentchat/groupchat.py Co-authored-by: Chi Wang <wang.chi@microsoft.com> * Remove unnecessary script files from tracking * Non empty scripts files from main * Revert changes in script files to match main branch * Removed link from website as notebook is removed. * test/test_graph_utils.py is tested as part of L52 of build.yml * GroupChat ValueError check * docstr update * More clarification in docstr * Update autogen/agentchat/groupchat.py Co-authored-by: Chi Wang <wang.chi@microsoft.com> * Update autogen/agentchat/groupchat.py Co-authored-by: Chi Wang <wang.chi@microsoft.com> * Update autogen/agentchat/groupchat.py Co-authored-by: Chi Wang <wang.chi@microsoft.com> * Update autogen/agentchat/groupchat.py Co-authored-by: Chi Wang <wang.chi@microsoft.com> * 1.add commit to line138 in groupchat.py;2.fix bug if random choice [];3.return selected_agent if len(graph_eligible_agents) is 1;4.replace all speaker_order to speaker_transitions;5.format * fix graph_modelling notebook in the last cell * fix failure in test_groupchat.py * fix agent out of group to initiate a chat like SocietyOfMind * add a warning rule in graph_utils to check duplicates in any lists * refactor allowed_or_disallowed_speaker_transitions to Dict[Agent, List[Agent]] and modify the tests and notebook * delete Rule 4 in graph_utils and related test case. Add a test to resolve https://github.com/microsoft/autogen/pull/857/files/993fd006e922c8efe5e50bd0700e355994c6d337#r1460726831 * fix as the final comments * modify setup option from graphs to graph and add texts in optional-dependencies.md * Update autogen/graph_utils.py --------- Co-authored-by: Li Jiang <lijiang1@microsoft.com> Co-authored-by: Beibin Li <BeibinLi@users.noreply.github.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com> Co-authored-by: Qingyun Wu <qingyun0327@gmail.com> Co-authored-by: Yishen Sun <freedeaths@FREEDEATHS-XPS> Co-authored-by: freedeaths <register917@gmail.com>
2 years ago
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>
2 years ago
5 years ago
5 years ago
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. import os
  2. import setuptools
  3. here = os.path.abspath(os.path.dirname(__file__))
  4. with open("README.md", "r", encoding="UTF-8") as fh:
  5. long_description = fh.read()
  6. # Get the code version
  7. version = {}
  8. with open(os.path.join(here, "autogen/version.py")) as fp:
  9. exec(fp.read(), version)
  10. __version__ = version["__version__"]
  11. install_requires = [
  12. "openai>=1.3",
  13. "diskcache",
  14. "termcolor",
  15. "flaml",
  16. # numpy is installed by flaml, but we want to pin the version to below 2.x (see https://github.com/microsoft/autogen/issues/1960)
  17. "numpy>=1.17.0,<2",
  18. "python-dotenv",
  19. "tiktoken",
  20. # Disallowing 2.6.0 can be removed when this is fixed https://github.com/pydantic/pydantic/issues/8705
  21. "pydantic>=1.10,<3,!=2.6.0", # could be both V1 and V2
  22. "docker",
  23. ]
  24. jupyter_executor = [
  25. "jupyter-kernel-gateway",
  26. "websocket-client",
  27. "requests",
  28. "jupyter-client>=8.6.0",
  29. "ipykernel>=6.29.0",
  30. ]
  31. setuptools.setup(
  32. name="pyautogen",
  33. version=__version__,
  34. author="AutoGen",
  35. author_email="auto-gen@outlook.com",
  36. description="Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework",
  37. long_description=long_description,
  38. long_description_content_type="text/markdown",
  39. url="https://github.com/microsoft/autogen",
  40. packages=setuptools.find_packages(include=["autogen*"], exclude=["test"]),
  41. install_requires=install_requires,
  42. extras_require={
  43. "test": [
  44. "coverage>=5.3",
  45. "ipykernel",
  46. "nbconvert",
  47. "nbformat",
  48. "pre-commit",
  49. "pytest-asyncio",
  50. "pytest>=6.1.1,<8",
  51. "pandas",
  52. ],
  53. "blendsearch": ["flaml[blendsearch]"],
  54. "mathchat": ["sympy", "pydantic==1.10.9", "wolframalpha"],
  55. "retrievechat": ["chromadb", "sentence_transformers", "pypdf", "ipython", "beautifulsoup4", "markdownify"],
  56. "autobuild": ["chromadb", "sentence-transformers", "huggingface-hub"],
  57. "teachable": ["chromadb"],
  58. "lmm": ["replicate", "pillow"],
  59. "graph": ["networkx", "matplotlib"],
  60. "gemini": ["google-generativeai>=0.5,<1", "pillow", "pydantic"],
  61. "websurfer": ["beautifulsoup4", "markdownify", "pdfminer.six", "pathvalidate"],
  62. "redis": ["redis"],
  63. "cosmosdb": ["azure-cosmos>=4.2.0"],
  64. "websockets": ["websockets>=12.0,<13"],
  65. "jupyter-executor": jupyter_executor,
  66. "types": ["mypy==1.9.0", "pytest>=6.1.1,<8"] + jupyter_executor,
  67. },
  68. classifiers=[
  69. "Programming Language :: Python :: 3",
  70. "License :: OSI Approved :: MIT License",
  71. "Operating System :: OS Independent",
  72. ],
  73. python_requires=">=3.8,<3.13",
  74. )