Skip to content

Commit

Permalink
Merge pull request #224 from emcie-co/feature/mc-508-split-provider-d…
Browse files Browse the repository at this point in the history
…ependencies-via-extras_require-to-reduce

Feature/mc 508 split provider dependencies via extras require to reduce
  • Loading branch information
mc-dorzo authored Jan 13, 2025
2 parents b002e27 + e5fc308 commit 8f70759
Show file tree
Hide file tree
Showing 6 changed files with 160 additions and 287 deletions.
109 changes: 61 additions & 48 deletions poetry.lock

Large diffs are not rendered by default.

66 changes: 52 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@ version = "1.6.0-rc.1"
license = "Apache-2.0"
description = ""
authors = ["Yam Marcovitz <yam@emcie.co>", "Dor Zohar <dor@emcie.co>"]
packages = [{include = "parlant", from = "src"}]
readme = "README.md"
packages = [{ include = "parlant", from = "src" }]

[tool.poetry.scripts]
parlant-server = "parlant.bin.server:main"
parlant = "parlant.bin.client:main"
parlant-server = "parlant.bin.server:main"

[tool.poetry.dependencies]
aiofiles = "^24.1.0"
aiopenapi3 = "^0.6.0"
aiorwlock = "^1.5.0"
anthropic = "^0.37.1"
boto3 = "^1.35.70"
cerebras-cloud-sdk = "^1.12.1"
chromadb = "0.5.17"
click = "^8.1.7"
click-completion = "^0.5.2"
Expand All @@ -26,16 +24,14 @@ coloredlogs = "^15.0.1"
contextvars = "^2.4"
croniter = "^5.0.1"
fastapi = "^0.115.5"
google-cloud-aiplatform = { extras = ["tokenization"], version = "^1.71.1" }
google-generativeai = "^0.8.3"
httpx = "^0.27.0"
jsonfinder = "^0.4.2"
jsonschema = "^4.23.0"
lagom = "^2.6.0"
more-itertools = "^10.3.0"
nano-vectordb = "^0.0.4.3"
nanoid = "^2.0.0"
networkx = { extras = ["default"], version = "^3.3" }
networkx = {extras = ["default"], version = "^3.3"}
openai = "^1.45.0"
openapi3-parser = "^1.1.17"
opentelemetry-exporter-otlp-proto-grpc = "1.27.0"
Expand All @@ -50,33 +46,75 @@ structlog = "^24.4.0"
tabulate = "^0.9.0"
tenacity = "^8.4.2"
tiktoken = "^0.8"
together = "^1.2.12"
tokenizers = "^0.20"
toml = "^0.10.2"
torch = "^2.5.1"
transformers = "^4.46.2"
types-aiofiles = "^24.1.0.20240626"
types-croniter = "^4.0.0.20241030"
types-jsonschema = "^4.22.0.20240610"
uvicorn = "^0.32.1"

# --- optional packages ---
anthropic = {version = "^0.37.1", optional = true}
cerebras-cloud-sdk = {version = "^1.12.1", optional = true}
google-cloud-aiplatform = {version = "^1.71.1", extras = ["tokenization"], optional = true}
google-generativeai = {version = "^0.8.3", optional = true}
together = {version = "^1.2.12", optional = true}
torch = {version = "^2.5.1", optional = true}
transformers = {version = "^4.46.2", optional = true}

[tool.poetry.group.dev.dependencies]
ipython = "^8.26.0"
mypy = "^1.11.1"
parlant-client = { git = "https://github.com/emcie-co/parlant-client-python.git", tag = "v0.9.3" }
parlant-client = {git = "https://github.com/emcie-co/parlant-client-python.git", tag = "v0.9.3"}
pep8-naming = "^0.13.3"
pytest = "^8.0.0"
pytest-asyncio = "^0.23.5"
pytest-bdd = "^7.1.2"
pytest-cov = "^5.0.0"
pytest-stochastics = { git = "https://github.com/emcie-co/pytest-stochastics.git", tag = "v0.5.2" }
pytest-stochastics = {git = "https://github.com/emcie-co/pytest-stochastics.git", tag = "v0.5.2"}
pytest-tap = "^3.4"
pytest-timing = { git = "https://github.com/emcie-co/mc-spitfyre.git", subdirectory = "pytest-timing", tag = "timing_v0.1.4" }
pytest-timing = {git = "https://github.com/emcie-co/mc-spitfyre.git", subdirectory = "pytest-timing", tag = "timing_v0.1.4"}
python-dotenv = "^1.0.1"
ruff = "^0.5.6"
types-python-dateutil = "^2.8.19.20240106"
types-requests = "^2.32.0.20240712"

[tool.poetry.extras]
anthropic = [
"anthropic",
"torch",
"transformers",
]

aws = [
"anthropic",
"transformers",
"torch",
]

together = [
"torch",
"together",
"transformers",
]

cerebras = [
"cerebras-cloud-sdk",
"torch",
"transformers",
]

deepseek = [
"torch",
"transformers",
]

gemini = [
"google-cloud-aiplatform",
"google-generativeai",
"torch",
]

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
2 changes: 1 addition & 1 deletion src/parlant/adapters/nlp/deepseek.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

from __future__ import annotations
import time
from anthropic import RateLimitError
from openai import (
APIConnectionError,
APIResponseValidationError,
APITimeoutError,
AsyncClient,
ConflictError,
InternalServerError,
RateLimitError,
)
from typing import Any, Mapping
from typing_extensions import override
Expand Down
2 changes: 1 addition & 1 deletion src/parlant/adapters/nlp/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
from __future__ import annotations
from itertools import chain
import time
from anthropic import RateLimitError
from openai import (
APIConnectionError,
APIResponseValidationError,
APITimeoutError,
AsyncClient,
ConflictError,
InternalServerError,
RateLimitError,
)
from typing import Any, Mapping
from typing_extensions import override
Expand Down
189 changes: 0 additions & 189 deletions src/parlant/api/style_guidelines.py

This file was deleted.

Loading

0 comments on commit 8f70759

Please sign in to comment.