Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/joaomdmoura/crewAI
Browse files Browse the repository at this point in the history
  • Loading branch information
HowieG committed May 21, 2024
2 parents 54237c9 + a336381 commit 2d88109
Show file tree
Hide file tree
Showing 70 changed files with 209,309 additions and 2,886 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/black.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Lint

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Requirements
run: |
pip install ruff
- name: Run Ruff Linter
run: ruff check --exclude "templates","__init__.py"
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"

- name: Install Requirements
run: |
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/type-checker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Run Type Checks

on: [pull_request]
Expand All @@ -12,19 +11,16 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: "3.10"

- name: Install Requirements
run: |
sudo apt-get update &&
pip install poetry &&
poetry lock &&
poetry install
pip install mypy
- name: Run type checks
run: poetry run pyright
run: mypy src
24 changes: 5 additions & 19 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
repos:
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.12.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: black
language_version: python3.11
files: \.(py)$
exclude: 'src/crewai/cli/templates/(crew|main)\.py'

- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black", "--filter-files"]

- repo: https://github.com/PyCQA/autoflake
rev: v2.2.1
hooks:
- id: autoflake
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variables', '--ignore-init-module-imports']
# Run the linter.
- id: ruff
args: [--fix]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ poetry run pytest
### Running static type checks

```bash
poetry run pyright
poetry run mypy
```

### Packaging
Expand Down
3 changes: 2 additions & 1 deletion docs/how-to/LLM-Connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ general_agent = Agent(role = "Math Professor",
verbose = True,
llm = llm)
task = Task (description="""what is 3 + 5""",
agent = general_agent)
agent = general_agent,
expected_output="A numerical answer.")
crew = Crew(
agents=[general_agent],
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/CSVSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tool = CSVSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/CodeDocsSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ tool = CodeDocsSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/DOCXSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tool = DOCXSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/DirectorySearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ tool = DirectorySearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/GitHubSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ tool = GithubSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/JSONSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tool = JSONSearchTool(
},
},
"embedder": {
"provider": "google",
"provider": "google", # or openai, ollama, ...
"config": {
"model": "models/embedding-001",
"task_type": "retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/MDXSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ tool = MDXSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/PDFSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tool = PDFSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/PGSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tool = PGSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/TXTSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tool = TXTSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/WebsiteSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tool = WebsiteSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/XMLSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tool = XMLSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/YoutubeChannelSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tool = YoutubeChannelSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
2 changes: 1 addition & 1 deletion docs/tools/YoutubeVideoSearchTool.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ tool = YoutubeVideoSearchTool(
),
),
embedder=dict(
provider="google",
provider="google", # or openai, ollama, ...
config=dict(
model="models/embedding-001",
task_type="retrieval_document",
Expand Down
Loading

0 comments on commit 2d88109

Please sign in to comment.