lm-deluge 0.0.50__tar.gz → 0.0.51__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.50/src/lm_deluge.egg-info → lm_deluge-0.0.51}/PKG-INFO +1 -1
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/pyproject.toml +1 -1
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/tool.py +14 -6
- {lm_deluge-0.0.50 → lm_deluge-0.0.51/src/lm_deluge.egg-info}/PKG-INFO +1 -1
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/LICENSE +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/README.md +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/setup.cfg +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/__init__.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/agent.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/__init__.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/anthropic.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/base.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/bedrock.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/common.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/deprecated/bedrock.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/deprecated/cohere.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/deprecated/deepseek.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/deprecated/mistral.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/deprecated/vertex.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/gemini.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/mistral.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/openai.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/api_requests/response.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/batches.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/built_in_tools/anthropic/__init__.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/built_in_tools/anthropic/bash.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/built_in_tools/anthropic/computer_use.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/built_in_tools/anthropic/editor.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/built_in_tools/base.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/built_in_tools/openai.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/cache.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/cli.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/client.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/config.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/embed.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/errors.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/file.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/gemini_limits.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/image.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/llm_tools/__init__.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/llm_tools/classify.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/llm_tools/extract.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/llm_tools/locate.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/llm_tools/ocr.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/llm_tools/score.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/llm_tools/translate.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/__init__.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/anthropic.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/bedrock.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/cerebras.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/cohere.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/deepseek.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/fireworks.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/google.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/grok.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/groq.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/meta.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/mistral.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/openai.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/openrouter.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/models/together.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/presets/cerebras.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/presets/meta.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/prompt.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/request_context.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/rerank.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/tracker.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/usage.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/util/harmony.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/util/json.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/util/logprobs.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/util/spatial.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/util/validation.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge/util/xml.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge.egg-info/SOURCES.txt +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge.egg-info/dependency_links.txt +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge.egg-info/requires.txt +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/src/lm_deluge.egg-info/top_level.txt +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/tests/test_builtin_tools.py +0 -0
- {lm_deluge-0.0.50 → lm_deluge-0.0.51}/tests/test_native_mcp_server.py +0 -0
|
@@ -58,14 +58,14 @@ class Tool(BaseModel):
|
|
|
58
58
|
"""
|
|
59
59
|
|
|
60
60
|
name: str
|
|
61
|
-
description: str | None
|
|
62
|
-
parameters: dict[str, Any] | None
|
|
61
|
+
description: str | None = None
|
|
62
|
+
parameters: dict[str, Any] | None = None
|
|
63
63
|
required: list[str] = Field(default_factory=list)
|
|
64
64
|
additionalProperties: bool | None = None # only
|
|
65
65
|
# if desired, can provide a callable to run the tool
|
|
66
66
|
run: Callable | None = None
|
|
67
67
|
# for built-in tools that don't require schema
|
|
68
|
-
|
|
68
|
+
is_built_in: bool = False
|
|
69
69
|
type: str | None = None
|
|
70
70
|
built_in_args: dict[str, Any] = Field(default_factory=dict)
|
|
71
71
|
|
|
@@ -309,7 +309,7 @@ class Tool(BaseModel):
|
|
|
309
309
|
def for_openai_completions(
|
|
310
310
|
self, *, strict: bool = True, **kwargs
|
|
311
311
|
) -> dict[str, Any]:
|
|
312
|
-
if self.
|
|
312
|
+
if self.is_built_in:
|
|
313
313
|
return {"type": self.type, **self.built_in_args, **kwargs}
|
|
314
314
|
if strict:
|
|
315
315
|
# For strict mode, remove defaults and make all parameters required
|
|
@@ -338,7 +338,7 @@ class Tool(BaseModel):
|
|
|
338
338
|
return self.for_openai_completions(strict=strict, **kwargs)
|
|
339
339
|
|
|
340
340
|
def for_openai_responses(self, **kwargs) -> dict[str, Any]:
|
|
341
|
-
if self.
|
|
341
|
+
if self.is_built_in:
|
|
342
342
|
return {"type": self.type, **self.built_in_args, **kwargs}
|
|
343
343
|
return {
|
|
344
344
|
"type": "function",
|
|
@@ -349,7 +349,7 @@ class Tool(BaseModel):
|
|
|
349
349
|
|
|
350
350
|
def for_anthropic(self, **kwargs) -> dict[str, Any]:
|
|
351
351
|
# built-in tools have "name", "type", maybe metadata
|
|
352
|
-
if self.
|
|
352
|
+
if self.is_built_in:
|
|
353
353
|
return {
|
|
354
354
|
"name": self.name,
|
|
355
355
|
"type": self.type,
|
|
@@ -392,6 +392,14 @@ class Tool(BaseModel):
|
|
|
392
392
|
return self.for_google()
|
|
393
393
|
raise ValueError(provider)
|
|
394
394
|
|
|
395
|
+
@classmethod
|
|
396
|
+
def built_in(cls, name: str, **kwargs):
|
|
397
|
+
if "type" in kwargs:
|
|
398
|
+
type = kwargs.pop("type")
|
|
399
|
+
else:
|
|
400
|
+
type = name
|
|
401
|
+
return cls(name=name, type=type, is_built_in=True, built_in_args=kwargs)
|
|
402
|
+
|
|
395
403
|
|
|
396
404
|
class OpenAIMCPSpec(TypedDict):
|
|
397
405
|
type: str
|
|
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
|
{lm_deluge-0.0.50 → lm_deluge-0.0.51}/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
|
|
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
|