livekit-plugins-aws 0.1.1__py3-none-any.whl → 0.1.2__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.

Potentially problematic release.


This version of livekit-plugins-aws might be problematic. Click here for more details.

@@ -258,12 +258,14 @@ class LLMStream(llm.LLMStream):
258
258
  self._tool_call_id = tool_use["toolUseId"]
259
259
  self._fnc_name = tool_use["name"]
260
260
  self._fnc_raw_arguments = ""
261
+
261
262
  elif "contentBlockDelta" in chunk:
262
263
  delta = chunk["contentBlockDelta"]["delta"]
263
264
  if "toolUse" in delta:
264
265
  self._fnc_raw_arguments += delta["toolUse"]["input"]
265
266
  elif "text" in delta:
266
267
  self._text += delta["text"]
268
+
267
269
  elif "contentBlockStop" in chunk:
268
270
  if self._text:
269
271
  chat_chunk = llm.ChatChunk(
@@ -280,6 +282,17 @@ class LLMStream(llm.LLMStream):
280
282
  elif self._tool_call_id:
281
283
  return self._try_build_function(request_id, chunk)
282
284
 
285
+ elif "metadata" in chunk:
286
+ metadata = chunk["metadata"]
287
+ return llm.ChatChunk(
288
+ request_id=request_id,
289
+ usage=llm.CompletionUsage(
290
+ completion_tokens=metadata["usage"]["outputTokens"],
291
+ prompt_tokens=metadata["usage"]["inputTokens"],
292
+ total_tokens=metadata["usage"]["totalTokens"],
293
+ ),
294
+ )
295
+
283
296
  return None
284
297
 
285
298
  def _try_build_function(self, request_id: str, chunk: dict) -> llm.ChatChunk | None:
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = "0.1.1"
15
+ __version__ = "0.1.2"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: livekit-plugins-aws
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: LiveKit Agents Plugin for services from AWS
5
5
  Home-page: https://github.com/livekit/agents
6
6
  License: Apache-2.0
@@ -19,7 +19,7 @@ Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
20
  Requires-Python: >=3.9.0
21
21
  Description-Content-Type: text/markdown
22
- Requires-Dist: livekit-agents[codecs]<1.0.0,>=0.12.16
22
+ Requires-Dist: livekit-agents[codecs]<1.0.0,>=0.12.20
23
23
  Requires-Dist: aiobotocore==2.19.0
24
24
  Requires-Dist: boto3==1.36.3
25
25
  Requires-Dist: amazon-transcribe>=0.6.2
@@ -1,13 +1,13 @@
1
1
  livekit/plugins/aws/__init__.py,sha256=Ea-hK7QdutnwdZvvs9K2fiR8RWJqz2JcONxXnV1kXF0,977
2
2
  livekit/plugins/aws/_utils.py,sha256=iuDuQpPta4wLtgW1Wc2rHspZWoa7KZI76tujQIPY898,7411
3
- livekit/plugins/aws/llm.py,sha256=yUAiBCtb2jRB1_S9BNrILTMmDffvKOpDod802kYnPVM,13527
3
+ livekit/plugins/aws/llm.py,sha256=Xx16HlpSJ9BBeuTQ5VIMHv-topRR6BSMh2bTykN9WVw,13962
4
4
  livekit/plugins/aws/log.py,sha256=jFief0Xhv0n_F6sp6UFu9VKxs2bXNVGAfYGmEYfR_2Q,66
5
5
  livekit/plugins/aws/models.py,sha256=Nf8RFmDulW7h03dG2lERTog3mgDK0TbLvW0eGOncuEE,704
6
6
  livekit/plugins/aws/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  livekit/plugins/aws/stt.py,sha256=eH7gKtdCjwki20Th6PrCsjjtH-zjXa8ZWu-cu_KaT80,7935
8
8
  livekit/plugins/aws/tts.py,sha256=m2Z6VXyWsJebqzGTDqE39KvgkBgdQkZ731fuIjbszAY,7243
9
- livekit/plugins/aws/version.py,sha256=3-nEcobvIJfZdV4yNIRuYpAGQ3svREnYIv2ivxoIZcQ,600
10
- livekit_plugins_aws-0.1.1.dist-info/METADATA,sha256=9rnNMyDhecj1fQIbGcxvGo_I0cg7d_lI2xEf-tBMQfc,1702
11
- livekit_plugins_aws-0.1.1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
12
- livekit_plugins_aws-0.1.1.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
13
- livekit_plugins_aws-0.1.1.dist-info/RECORD,,
9
+ livekit/plugins/aws/version.py,sha256=S3xxF-H96nScSv_7l7IUvROJ0avu9oz5Gm6j673md_Y,600
10
+ livekit_plugins_aws-0.1.2.dist-info/METADATA,sha256=0Il2HwdV6mP_6XQCL0UWaTF05ZwdfimaQqnL38Mkf3k,1702
11
+ livekit_plugins_aws-0.1.2.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
12
+ livekit_plugins_aws-0.1.2.dist-info/top_level.txt,sha256=OoDok3xUmXbZRvOrfvvXB-Juu4DX79dlq188E19YHoo,8
13
+ livekit_plugins_aws-0.1.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (80.7.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5