livekit-plugins-anthropic 1.0.0rc2__py3-none-any.whl → 1.0.0rc4__py3-none-any.whl
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/utils.py +8 -2
- livekit/plugins/anthropic/version.py +1 -1
- {livekit_plugins_anthropic-1.0.0rc2.dist-info → livekit_plugins_anthropic-1.0.0rc4.dist-info}/METADATA +2 -2
- {livekit_plugins_anthropic-1.0.0rc2.dist-info → livekit_plugins_anthropic-1.0.0rc4.dist-info}/RECORD +5 -5
- {livekit_plugins_anthropic-1.0.0rc2.dist-info → livekit_plugins_anthropic-1.0.0rc4.dist-info}/WHEEL +0 -0
@@ -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
|
}
|
@@ -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
|
{livekit_plugins_anthropic-1.0.0rc2.dist-info → livekit_plugins_anthropic-1.0.0rc4.dist-info}/RECORD
RENAMED
@@ -3,8 +3,8 @@ livekit/plugins/anthropic/llm.py,sha256=Gj9oGm16kdeEHw1I4GB7EGSBLpgkzhv36f55Msby
|
|
3
3
|
livekit/plugins/anthropic/log.py,sha256=fG1pYSY88AnT738gZrmzF9FO4l4BdGENj3VKHMQB3Yo,72
|
4
4
|
livekit/plugins/anthropic/models.py,sha256=wyTr2nl6SL4ylN6s4mHJcqtmgV2mjJysZo89FknWdhI,213
|
5
5
|
livekit/plugins/anthropic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
livekit/plugins/anthropic/utils.py,sha256
|
7
|
-
livekit/plugins/anthropic/version.py,sha256=
|
8
|
-
livekit_plugins_anthropic-1.0.
|
9
|
-
livekit_plugins_anthropic-1.0.
|
10
|
-
livekit_plugins_anthropic-1.0.
|
6
|
+
livekit/plugins/anthropic/utils.py,sha256=-fYF1fzHLEkxi_E3SFtSKCSX8TcEunJi2IvDj9_yojM,5140
|
7
|
+
livekit/plugins/anthropic/version.py,sha256=j59nZMZZ8g3asKADdj9zt64g9i53Uq4ib4H0zY4FnPM,604
|
8
|
+
livekit_plugins_anthropic-1.0.0rc4.dist-info/METADATA,sha256=fi1RScVb-30l-v8M2rnw82vHiZa60cUDqg-sJ9nbDf0,1280
|
9
|
+
livekit_plugins_anthropic-1.0.0rc4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
10
|
+
livekit_plugins_anthropic-1.0.0rc4.dist-info/RECORD,,
|
{livekit_plugins_anthropic-1.0.0rc2.dist-info → livekit_plugins_anthropic-1.0.0rc4.dist-info}/WHEEL
RENAMED
File without changes
|