🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
Docs with GH actions (#111)
Dmitrii Khizbullin759506343fe1
diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yamlnew file mode 100644index 000000000..62503eeb2--- /dev/null+++ b/.github/workflows/documentation.yaml@@ -0,0 +1,24 @@+name: Docs+on: [push, pull_request, workflow_dispatch]+permissions:+ contents: write+jobs:+ docs:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v3+ - uses: actions/setup-python@v3+ - name: Install dependencies+ run: |+ pip install sphinx sphinx_rtd_theme numpy openai tenacity tiktoken colorama+ - name: Sphinx build+ run: |+ sphinx-build docs docs/_build+ - name: Deploy+ uses: peaceiris/actions-gh-pages@v3+ if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}+ with:+ publish_branch: gh-pages+ github_token: ${{ secrets.GITHUB_TOKEN }}+ publish_dir: docs/_build/+ force_orphan: truediff --git a/README.md b/README.mdindex 03d22a283..0ca1a6b13 100644--- a/README.md+++ b/README.md@@ -18,6 +18,10 @@ We provide a [+## Environment SetupInstall `CAMEL` from source with conda:```diff --git a/docs/Makefile b/docs/Makefilenew file mode 100644index 000000000..d4bb2cbb9--- /dev/null+++ b/docs/Makefile@@ -0,0 +1,20 @@+# Minimal makefile for Sphinx documentation+#++# You can set these variables from the command line, and also+# from the environment for the first two.+SPHINXOPTS ?=+SPHINXBUILD ?= sphinx-build+SOURCEDIR = .+BUILDDIR = _build++# Put it first so that "make" without argument is like "make help".+help:+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)++.PHONY: help Makefile++# Catch-all target: route all unknown targets to Sphinx using the new+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).+%: Makefile+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)diff --git a/docs/README.md b/docs/README.mdnew file mode 100644index 000000000..2cf7c270f--- /dev/null+++ b/docs/README.md@@ -0,0 +1,8 @@+# How to update the documentation++To update the RST files:+```bash+sphinx-apidoc -o docs camel/+```++Helpful article [here](https://towardsdatascience.com/documenting-python-code-with-sphinx-554e1d6c4f6d).diff --git a/docs/camel.agents.rst b/docs/camel.agents.rstnew file mode 100644index 000000000..81796955f--- /dev/null+++ b/docs/camel.agents.rst@@ -0,0 +1,37 @@+camel.agents package+====================++Submodules+----------++camel.agents.chat\_agent module+-------------------------------++.. automodule:: camel.agents.chat_agent+ :members:+ :undoc-members:+ :show-inheritance:++camel.agents.role\_playing module+---------------------------------++.. automodule:: camel.agents.role_playing+ :members:+ :undoc-members:+ :show-inheritance:++camel.agents.task\_agent module+-------------------------------++.. automodule:: camel.agents.task_agent+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: camel.agents+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/docs/camel.prompts.rst b/docs/camel.prompts.rstnew file mode 100644index 000000000..5c350c8d2--- /dev/null+++ b/docs/camel.prompts.rst@@ -0,0 +1,69 @@+camel.prompts package+=====================++Submodules+----------++camel.prompts.ai\_society module+--------------------------------++.. automodule:: camel.prompts.ai_society+ :members:+ :undoc-members:+ :show-inheritance:++camel.prompts.base module+-------------------------++.. automodule:: camel.prompts.base+ :members:+ :undoc-members:+ :show-inheritance:++camel.prompts.code module+-------------------------++.. automodule:: camel.prompts.code+ :members:+ :undoc-members:+ :show-inheritance:++camel.prompts.misalignment module+---------------------------------++.. automodule:: camel.prompts.misalignment+ :members:+ :undoc-members:+ :show-inheritance:++camel.prompts.prompt\_templates module+--------------------------------------++.. automodule:: camel.prompts.prompt_templates+ :members:+ :undoc-members:+ :show-inheritance:++camel.prompts.task\_prompt\_template module+-------------------------------------------++.. automodule:: camel.prompts.task_prompt_template+ :members:+ :undoc-members:+ :show-inheritance:++camel.prompts.translation module+--------------------------------++.. automodule:: camel.prompts.translation+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: camel.prompts+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/docs/camel.rst b/docs/camel.rstnew file mode 100644index 000000000..72818d446--- /dev/null+++ b/docs/camel.rst@@ -0,0 +1,70 @@+camel package+=============++Subpackages+-----------++.. toctree::+ :maxdepth: 4++ camel.agents+ camel.prompts++Submodules+----------++camel.configs module+--------------------++.. automodule:: camel.configs+ :members:+ :undoc-members:+ :show-inheritance:++camel.generators module+-----------------------++.. automodule:: camel.generators+ :members:+ :undoc-members:+ :show-inheritance:++camel.human module+------------------++.. automodule:: camel.human+ :members:+ :undoc-members:+ :show-inheritance:++camel.messages module+---------------------++.. automodule:: camel.messages+ :members:+ :undoc-members:+ :show-inheritance:++camel.typing module+-------------------++.. automodule:: camel.typing+ :members:+ :undoc-members:+ :show-inheritance:++camel.utils module+------------------++.. automodule:: camel.utils+ :members:+ :undoc-members:+ :show-inheritance:++Module contents+---------------++.. automodule:: camel+ :members:+ :undoc-members:+ :show-inheritance:diff --git a/docs/conf.py b/docs/conf.pynew file mode 100644index 000000000..f390da13d--- /dev/null+++ b/docs/conf.py@@ -0,0 +1,34 @@+# Configuration file for the Sphinx documentation builder.+#+# For the full list of built-in configuration values, see the documentation:+# https://www.sphinx-doc.org/en/master/usage/configuration.html++# -- Project information -----------------------------------------------------+# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information++import os+import sys++sys.path.insert(0, os.path.abspath('..'))++project = 'Camel'+copyright = '2023, Camel AI team'+author = ('Guohao Li, Hasan Abed Al Kader Hammoud, Hani Itani, '+ 'Dmitrii Khizbullin, Bernard Ghanem')+release = '00.00.01'++# -- General configuration ---------------------------------------------------+# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration++extensions = [+ 'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon'+]++templates_path = ['_templates']+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']++# -- Options for HTML output -------------------------------------------------+# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output++html_theme = 'sphinx_rtd_theme'+html_static_path = ['_static']diff --git a/docs/index.rst b/docs/index.rstnew file mode 100644index 000000000..6c0a5bcfa--- /dev/null+++ b/docs/index.rst@@ -0,0 +1,20 @@+.. Camel documentation master file, created by+ sphinx-quickstart on Sun May 14 13:51:36 2023.+ You can adapt this file completely to your liking, but it should at least+ contain the root `toctree` directive.++Welcome to Camel's documentation!+=================================++.. toctree::+ :maxdepth: 2+ :caption: Contents:++ modules++Indices and tables+==================++* :ref:`genindex`+* :ref:`modindex`+* :ref:`search`diff --git a/docs/make.bat b/docs/make.batnew file mode 100644index 000000000..954237b9b--- /dev/null+++ b/docs/make.bat@@ -0,0 +1,35 @@+@ECHO OFF++pushd %~dp0++REM Command file for Sphinx documentation++if "%SPHINXBUILD%" == "" (+ set SPHINXBUILD=sphinx-build+)+set SOURCEDIR=.+set BUILDDIR=_build++%SPHINXBUILD% >NUL 2>NUL+if errorlevel 9009 (+ echo.+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx+ echo.installed, then set the SPHINXBUILD environment variable to point+ echo.to the full path of the 'sphinx-build' executable. Alternatively you+ echo.may add the Sphinx directory to PATH.+ echo.+ echo.If you don't have Sphinx installed, grab it from+ echo.https://www.sphinx-doc.org/+ exit /b 1+)++if "%1" == "" goto help++%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%+goto end++:help+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%++:end+popddiff --git a/docs/modules.rst b/docs/modules.rstnew file mode 100644index 000000000..0e048dd5b--- /dev/null+++ b/docs/modules.rst@@ -0,0 +1,7 @@+camel+=====++.. toctree::+ :maxdepth: 4++ camel