Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

Enable slow tests in examples, fix an uncaught bug (#230)

Dmitrii Khizbullin63a9444ff30c
diff --git a/.github/workflows/pytest_apps.yml b/.github/workflows/pytest_apps.yml
index 1187de325..53955d342 100644
--- a/.github/workflows/pytest_apps.yml
+++ b/.github/workflows/pytest_apps.yml
@@ -40,4 +40,32 @@ jobs:
env:
OPENAI_API_KEY: "${{ secrets.OPENAI_API_KEY }}"
run: |
- pytest -m "not slow" apps/ examples/
+ pytest apps/
+
+ pytest_examples:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v3
+ with:
+ python-version: "3.8"
+ - uses: actions/cache@v3
+ id: cache
+ with:
+ path: ~/.cache/pip
+ key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.*') }}
+ restore-keys: |
+ ${{ runner.os }}-pip-
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install flake8 pytest
+ pip install -e .
+ - name: Test with pytest
+ env:
+ OPENAI_API_KEY: "${{ secrets.OPENAI_API_KEY }}"
+ run: |
+ pytest examples/
diff --git a/examples/code/role_playing.py b/examples/code/role_playing.py
index 3152bac28..53df2693d 100644
--- a/examples/code/role_playing.py
+++ b/examples/code/role_playing.py
@@ -25,12 +25,12 @@ def main(model_type=None) -> None:
meta_dict = {"language": language, "domain": domain}
role_play_session = RolePlaying(
assistant_role_name=f"{language} Programmer",
- assistant_agent_kwargs=dict(mode=model_type),
+ assistant_agent_kwargs=dict(model=model_type),
user_role_name=f"Person working in {domain}",
- user_agent_kwargs=dict(mode=model_type),
+ user_agent_kwargs=dict(model=model_type),
task_prompt=task_prompt,
with_task_specify=True,
- task_specify_agent_kwargs=dict(mode=model_type),
+ task_specify_agent_kwargs=dict(model=model_type),
task_type=TaskType.CODE,
extend_sys_msg_meta_dicts=[meta_dict, meta_dict],
extend_task_specify_meta_dict=meta_dict,