livekit-plugins-anthropic 1.0.0rc3__tar.gz → 1.0.0rc4__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.
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/PKG-INFO +2 -2
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/livekit/plugins/anthropic/utils.py +8 -2
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/livekit/plugins/anthropic/version.py +1 -1
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/pyproject.toml +1 -1
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/.gitignore +0 -0
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/README.md +0 -0
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/livekit/plugins/anthropic/__init__.py +0 -0
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/livekit/plugins/anthropic/llm.py +0 -0
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/livekit/plugins/anthropic/log.py +0 -0
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/livekit/plugins/anthropic/models.py +0 -0
- {livekit_plugins_anthropic-1.0.0rc3 → livekit_plugins_anthropic-1.0.0rc4}/livekit/plugins/anthropic/py.typed +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: livekit-plugins-anthropic
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.0rc4
|
4
4
|
Summary: Agent Framework plugin for services from Anthropic
|
5
5
|
Project-URL: Documentation, https://docs.livekit.io
|
6
6
|
Project-URL: Website, https://livekit.io/
|
@@ -19,7 +19,7 @@ Classifier: Topic :: Multimedia :: Video
|
|
19
19
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
20
20
|
Requires-Python: >=3.9.0
|
21
21
|
Requires-Dist: anthropic>=0.34
|
22
|
-
Requires-Dist: livekit-agents>=1.0.0.
|
22
|
+
Requires-Dist: livekit-agents>=1.0.0.rc4
|
23
23
|
Description-Content-Type: text/markdown
|
24
24
|
|
25
25
|
# LiveKit Plugins Anthropic
|
@@ -114,6 +114,12 @@ def _to_image_content(
|
|
114
114
|
cache_ctrl: anthropic.types.CacheControlEphemeralParam | None,
|
115
115
|
) -> anthropic.types.ImageBlockParam:
|
116
116
|
img = llm.utils.serialize_image(image)
|
117
|
+
if img.external_url:
|
118
|
+
return {
|
119
|
+
"type": "image",
|
120
|
+
"source": {"type": "url", "url": img.external_url},
|
121
|
+
"cache_control": cache_ctrl,
|
122
|
+
}
|
117
123
|
if cache_key not in image._cache:
|
118
124
|
image._cache[cache_key] = img.data_bytes
|
119
125
|
b64_data = base64.b64encode(image._cache[cache_key]).decode("utf-8")
|
@@ -121,8 +127,8 @@ def _to_image_content(
|
|
121
127
|
"type": "image",
|
122
128
|
"source": {
|
123
129
|
"type": "base64",
|
124
|
-
"data": f"data:{img.
|
125
|
-
"media_type": img.
|
130
|
+
"data": f"data:{img.mime_type};base64,{b64_data}",
|
131
|
+
"media_type": img.mime_type,
|
126
132
|
},
|
127
133
|
"cache_control": cache_ctrl,
|
128
134
|
}
|
@@ -22,7 +22,7 @@ classifiers = [
|
|
22
22
|
"Programming Language :: Python :: 3.10",
|
23
23
|
"Programming Language :: Python :: 3 :: Only",
|
24
24
|
]
|
25
|
-
dependencies = ["livekit-agents>=1.0.0.
|
25
|
+
dependencies = ["livekit-agents>=1.0.0.rc4", "anthropic>=0.34"]
|
26
26
|
|
27
27
|
[project.urls]
|
28
28
|
Documentation = "https://docs.livekit.io"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|