Files
AutoGPT/forge/pyproject.toml
Reinier van der Leer f107ff8cf0 Set up unified pre-commit + CI w/ linting + type checking & FIX EVERYTHING (#7171)
- **FIX ALL LINT/TYPE ERRORS IN AUTOGPT, FORGE, AND BENCHMARK**

### Linting
- Clean up linter configs for `autogpt`, `forge`, and `benchmark`
- Add type checking with Pyright
- Create unified pre-commit config
- Create unified linting and type checking CI workflow

### Testing
- Synchronize CI test setups for `autogpt`, `forge`, and `benchmark`
   - Add missing pytest-cov to benchmark dependencies
- Mark GCS tests as slow to speed up pre-commit test runs
- Repair `forge` test suite
  - Add `AgentDB.close()` method for test DB teardown in db_test.py
  - Use actual temporary dir instead of forge/test_workspace/
- Move left-behind dependencies for moved `forge`-code to from autogpt to forge

### Notable type changes
- Replace uses of `ChatModelProvider` by `MultiProvider`
- Removed unnecessary exports from various __init__.py
- Simplify `FileStorage.open_file` signature by removing `IOBase` from return type union
  - Implement `S3BinaryIOWrapper(BinaryIO)` type interposer for `S3FileStorage`

- Expand overloads of `GCSFileStorage.open_file` for improved typing of read and write modes

  Had to silence type checking for the extra overloads, because (I think) Pyright is reporting a false-positive:
  https://github.com/microsoft/pyright/issues/8007

- Change `count_tokens`, `get_tokenizer`, `count_message_tokens` methods on `ModelProvider`s from class methods to instance methods

- Move `CompletionModelFunction.schema` method -> helper function `format_function_def_for_openai` in `forge.llm.providers.openai`

- Rename `ModelProvider` -> `BaseModelProvider`
- Rename `ChatModelProvider` -> `BaseChatModelProvider`
- Add type `ChatModelProvider` which is a union of all subclasses of `BaseChatModelProvider`

### Removed rather than fixed
- Remove deprecated and broken autogpt/agbenchmark_config/benchmarks.py
- Various base classes and properties on base classes in `forge.llm.providers.schema` and `forge.models.providers`

### Fixes for other issues that came to light
- Clean up `forge.agent_protocol.api_router`, `forge.agent_protocol.database`, and `forge.agent.agent`

- Add fallback behavior to `ImageGeneratorComponent`
   - Remove test for deprecated failure behavior

- Fix `agbenchmark.challenges.builtin` challenge exclusion mechanism on Windows

- Fix `_tool_calls_compat_extract_calls` in `forge.llm.providers.openai`

- Add support for `any` (= no type specified) in `JSONSchema.typescript_type`
2024-05-28 05:04:21 +02:00

98 lines
2.0 KiB
TOML

[tool.poetry]
name = "AutoGPT-Forge"
version = "0.1.0"
description = ""
authors = ["AutoGPT <support@agpt.co>"]
license = "MIT"
readme = "README.md"
packages = [{ include = "forge" }]
[tool.poetry.dependencies]
python = "^3.10"
agbenchmark = { path = "../benchmark", optional = true }
# agbenchmark = {git = "https://github.com/Significant-Gravitas/AutoGPT.git", subdirectory = "benchmark", optional = true}
aiohttp = "^3.8.5"
anthropic = "^0.25.1"
beautifulsoup4 = "^4.12.2"
boto3 = "^1.33.6"
bs4 = "^0.0.1"
charset-normalizer = "^3.1.0"
chromadb = "^0.4.10"
click = "*"
colorama = "^0.4.6"
demjson3 = "^3.0.0"
docker = "*"
duckduckgo-search = "^5.0.0"
fastapi = "^0.109.1"
gitpython = "^3.1.32"
google-api-python-client = "*"
google-cloud-logging = "^3.8.0"
google-cloud-storage = "^2.13.0"
groq = "^0.8.0"
gTTS = "^2.3.1"
jinja2 = "^3.1.2"
jsonschema = "*"
litellm = "^1.17.9"
openai = "^1.7.2"
Pillow = "*"
playsound = "~1.2.2"
pydantic = "*"
python-docx = "*"
python-dotenv = "^1.0.0"
python-multipart = "^0.0.7"
pylatexenc = "*"
pypdf = "^3.1.0"
pyyaml = "^6.0"
requests = "*"
selenium = "^4.13.0"
sqlalchemy = "^2.0.19"
sentry-sdk = "^1.40.4"
spacy = "^3.0.0"
tenacity = "^8.2.2"
tiktoken = ">=0.7.0,<1.0.0"
toml = "^0.10.2"
uvicorn = "^0.23.2"
watchdog = "4.0.0"
webdriver-manager = "^4.0.1"
[tool.poetry.extras]
benchmark = ["agbenchmark"]
[tool.poetry.group.dev.dependencies]
black = "^23.12.1"
flake8 = "^7.0.0"
isort = "^5.13.1"
pyright = "^1.1.364"
pre-commit = "^3.3.3"
boto3-stubs = { extras = ["s3"], version = "^1.33.6" }
types-requests = "^2.31.0.2"
pytest = "^7.4.0"
pytest-asyncio = "^0.21.1"
pytest-cov = "^5.0.0"
mock = "^5.1.0"
pydevd-pycharm = "^233.6745.319"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
[tool.isort]
profile = "black"
[tool.pyright]
pythonVersion = "3.10"
[tool.pytest.ini_options]
pythonpath = ["forge"]
testpaths = ["forge", "tests"]