lm-deluge 0.0.18__tar.gz → 0.0.20__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lm-deluge might be problematic. Click here for more details.
- {lm_deluge-0.0.18/src/lm_deluge.egg-info → lm_deluge-0.0.20}/PKG-INFO +1 -1
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/pyproject.toml +1 -1
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/anthropic.py +3 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/openai.py +3 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/client.py +2 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20/src/lm_deluge.egg-info}/PKG-INFO +1 -1
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/LICENSE +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/README.md +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/setup.cfg +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/__init__.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/agent.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/__init__.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/base.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/bedrock.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/common.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/deprecated/bedrock.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/deprecated/cohere.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/deprecated/deepseek.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/deprecated/mistral.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/deprecated/vertex.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/gemini.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/mistral.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/api_requests/response.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/batches.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/built_in_tools/anthropic/__init__.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/built_in_tools/anthropic/bash.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/built_in_tools/anthropic/computer_use.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/built_in_tools/anthropic/editor.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/built_in_tools/base.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/built_in_tools/openai.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/cache.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/config.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/embed.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/errors.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/file.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/gemini_limits.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/image.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/llm_tools/__init__.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/llm_tools/classify.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/llm_tools/extract.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/llm_tools/locate.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/llm_tools/ocr.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/llm_tools/score.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/llm_tools/translate.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/models.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/prompt.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/request_context.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/rerank.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/tool.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/tracker.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/usage.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/util/json.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/util/logprobs.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/util/spatial.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/util/validation.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/util/xml.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge.egg-info/SOURCES.txt +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge.egg-info/dependency_links.txt +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge.egg-info/requires.txt +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge.egg-info/top_level.txt +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/tests/test_builtin_tools.py +0 -0
- {lm_deluge-0.0.18 → lm_deluge-0.0.20}/tests/test_native_mcp_server.py +0 -0
|
@@ -185,6 +185,7 @@ class AnthropicRequest(APIRequestBase):
|
|
|
185
185
|
error_message = text
|
|
186
186
|
|
|
187
187
|
# handle special kinds of errors. TODO: make sure these are correct for anthropic
|
|
188
|
+
retry_with_different_model = status_code in [529, 429, 400, 401, 403, 413]
|
|
188
189
|
if is_error and error_message is not None:
|
|
189
190
|
if (
|
|
190
191
|
"rate limit" in error_message.lower()
|
|
@@ -195,6 +196,7 @@ class AnthropicRequest(APIRequestBase):
|
|
|
195
196
|
if "context length" in error_message:
|
|
196
197
|
error_message += " (Context length exceeded, set retries to 0.)"
|
|
197
198
|
self.context.attempts_left = 0
|
|
199
|
+
retry_with_different_model = True
|
|
198
200
|
|
|
199
201
|
return APIResponse(
|
|
200
202
|
id=self.context.task_id,
|
|
@@ -208,4 +210,5 @@ class AnthropicRequest(APIRequestBase):
|
|
|
208
210
|
sampling_params=self.context.sampling_params,
|
|
209
211
|
usage=usage,
|
|
210
212
|
raw_response=data,
|
|
213
|
+
retry_with_different_model=retry_with_different_model,
|
|
211
214
|
)
|
|
@@ -159,6 +159,7 @@ class OpenAIRequest(APIRequestBase):
|
|
|
159
159
|
error_message = text
|
|
160
160
|
|
|
161
161
|
# handle special kinds of errors
|
|
162
|
+
retry_with_different_model = status_code in [529, 429, 400, 401, 403, 413]
|
|
162
163
|
if is_error and error_message is not None:
|
|
163
164
|
if "rate limit" in error_message.lower() or status_code == 429:
|
|
164
165
|
error_message += " (Rate limit error, triggering cooldown.)"
|
|
@@ -166,6 +167,7 @@ class OpenAIRequest(APIRequestBase):
|
|
|
166
167
|
if "context length" in error_message:
|
|
167
168
|
error_message += " (Context length exceeded, set retries to 0.)"
|
|
168
169
|
self.context.attempts_left = 0
|
|
170
|
+
retry_with_different_model = True
|
|
169
171
|
|
|
170
172
|
return APIResponse(
|
|
171
173
|
id=self.context.task_id,
|
|
@@ -181,6 +183,7 @@ class OpenAIRequest(APIRequestBase):
|
|
|
181
183
|
usage=usage,
|
|
182
184
|
raw_response=data,
|
|
183
185
|
finish_reason=finish_reason,
|
|
186
|
+
retry_with_different_model=retry_with_different_model,
|
|
184
187
|
)
|
|
185
188
|
|
|
186
189
|
|
|
@@ -104,6 +104,8 @@ class LLMClient(BaseModel):
|
|
|
104
104
|
top_logprobs=data.get("top_logprobs", None),
|
|
105
105
|
)
|
|
106
106
|
]
|
|
107
|
+
if len(data["model_names"]) > 1 and len(data["sampling_params"]) == 1:
|
|
108
|
+
data["sampling_params"] = data["sampling_params"] * len(data["model_names"])
|
|
107
109
|
return data
|
|
108
110
|
|
|
109
111
|
@model_validator(mode="after")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lm_deluge-0.0.18 → lm_deluge-0.0.20}/src/lm_deluge/built_in_tools/anthropic/computer_use.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|