Skip to content

armgit / dspy

Public Imported from GitHub
0

DSPy: The framework for programming—not prompting—language models

Python

Add tenacity as a dependency to support LM retries with LiteLLM (#1731)

Corey Zumar1bab822b3667
diff --git a/poetry.lock b/poetry.lock
index dae353270..739977126 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -6519,7 +6519,7 @@ widechars = ["wcwidth"]
name = "tenacity"
version = "8.5.0"
description = "Retry code until it succeeds"
-optional = true
+optional = false
python-versions = ">=3.8"
files = [
{file = "tenacity-8.5.0-py3-none-any.whl", hash = "sha256:b594c2a5945830c267ce6b79a166228323ed52718f30302c1359836112346687"},
@@ -7842,4 +7842,4 @@ weaviate = ["weaviate-client"]
[metadata]
lock-version = "2.0"
python-versions = ">=3.9,<3.13"
-content-hash = "409f61989a12fc841674338b7b05c296feb08291c1b8e0ba0e7bf9bb3d86b073"
+content-hash = "9b75dbe98c1d0a4e7a9801f3ab5759799c2bfacf8bfc10faadf625435eb43c99"
diff --git a/pyproject.toml b/pyproject.toml
index 0170fce95..4a5a73efd 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -43,7 +43,8 @@ dependencies = [
"magicattr~=0.1.6",
"litellm",
"diskcache",
- "json-repair"
+ "json-repair",
+ "tenacity>=8.2.3",
]
[project.optional-dependencies]
@@ -137,6 +138,7 @@ magicattr = "^0.1.6"
litellm = "1.49.1"
diskcache = "^5.6.0"
json-repair = "^0.30.0"
+tenacity = ">=8.2.3"
[tool.poetry.group.dev.dependencies]
pytest = "^6.2.5"
diff --git a/requirements.txt b/requirements.txt
index 3e0f4501d..1cdb62951 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,11 @@
backoff
datasets
+diskcache
+httpx
joblib~=1.3
+json-repair
litellm<=1.49.1
+magicattr~=0.1.6
openai
optuna
pandas
@@ -9,9 +13,6 @@ pydantic~=2.0
regex
requests
structlog
+tenacity>=8.2.3
tqdm
ujson
-httpx
-magicattr~=0.1.6
-diskcache
-json-repair
\ No newline at end of file