livekit-plugins-aws 1.1.6__py3-none-any.whl → 1.1.7__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.
- livekit/plugins/aws/experimental/realtime/realtime_model.py +11 -8
- livekit/plugins/aws/llm.py +3 -1
- livekit/plugins/aws/version.py +1 -1
- {livekit_plugins_aws-1.1.6.dist-info → livekit_plugins_aws-1.1.7.dist-info}/METADATA +2 -2
- {livekit_plugins_aws-1.1.6.dist-info → livekit_plugins_aws-1.1.7.dist-info}/RECORD +6 -6
- {livekit_plugins_aws-1.1.6.dist-info → livekit_plugins_aws-1.1.7.dist-info}/WHEEL +0 -0
|
@@ -355,6 +355,7 @@ class RealtimeSession( # noqa: F811
|
|
|
355
355
|
aws_credentials_identity_resolver=Boto3CredentialsResolver(),
|
|
356
356
|
http_auth_scheme_resolver=HTTPAuthSchemeResolver(),
|
|
357
357
|
http_auth_schemes={"aws.auth#sigv4": SigV4AuthScheme()},
|
|
358
|
+
user_agent_extra="x-client-framework:livekit-plugins-aws[realtime]",
|
|
358
359
|
)
|
|
359
360
|
self._bedrock_client = BedrockRuntimeClient(config=config)
|
|
360
361
|
|
|
@@ -516,7 +517,7 @@ class RealtimeSession( # noqa: F811
|
|
|
516
517
|
self._chat_ctx.truncate(max_items=MAX_MESSAGES)
|
|
517
518
|
init_events = self._event_builder.create_prompt_start_block(
|
|
518
519
|
voice_id=self._realtime_model._opts.voice,
|
|
519
|
-
sample_rate=DEFAULT_OUTPUT_SAMPLE_RATE,
|
|
520
|
+
sample_rate=DEFAULT_OUTPUT_SAMPLE_RATE, # type: ignore
|
|
520
521
|
system_content=self._instructions,
|
|
521
522
|
chat_ctx=self.chat_ctx,
|
|
522
523
|
tool_configuration=self._serialize_tool_config(),
|
|
@@ -823,12 +824,14 @@ class RealtimeSession( # noqa: F811
|
|
|
823
824
|
curr_gen.audio_ch.close()
|
|
824
825
|
if not curr_gen.text_ch.closed:
|
|
825
826
|
curr_gen.text_ch.close()
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
827
|
+
|
|
828
|
+
# TODO: seems not needed, tool_messages[id] is a str, function_ch is closed below?
|
|
829
|
+
# if self._current_generation.response_id in self._current_generation.tool_messages:
|
|
830
|
+
# curr_gen = self._current_generation.tool_messages[
|
|
831
|
+
# self._current_generation.response_id
|
|
832
|
+
# ]
|
|
833
|
+
# if not curr_gen.function_ch.closed:
|
|
834
|
+
# curr_gen.function_ch.close()
|
|
832
835
|
|
|
833
836
|
if not self._current_generation.message_ch.closed:
|
|
834
837
|
self._current_generation.message_ch.close()
|
|
@@ -1055,7 +1058,7 @@ class RealtimeSession( # noqa: F811
|
|
|
1055
1058
|
"tool_use_id": item.call_id,
|
|
1056
1059
|
"tool_result": item.output
|
|
1057
1060
|
if not item.is_error
|
|
1058
|
-
else f"{{'error': '{item.
|
|
1061
|
+
else f"{{'error': '{item.output}'}}",
|
|
1059
1062
|
}
|
|
1060
1063
|
)
|
|
1061
1064
|
|
livekit/plugins/aws/llm.py
CHANGED
|
@@ -19,6 +19,7 @@ from dataclasses import dataclass
|
|
|
19
19
|
from typing import Any, cast
|
|
20
20
|
|
|
21
21
|
import aioboto3 # type: ignore
|
|
22
|
+
from botocore.config import Config
|
|
22
23
|
|
|
23
24
|
from livekit.agents import APIConnectionError, APIStatusError, llm
|
|
24
25
|
from livekit.agents.llm import (
|
|
@@ -205,7 +206,8 @@ class LLMStream(llm.LLMStream):
|
|
|
205
206
|
async def _run(self) -> None:
|
|
206
207
|
retryable = True
|
|
207
208
|
try:
|
|
208
|
-
|
|
209
|
+
config = Config(user_agent_extra="x-client-framework:livekit-plugins-aws")
|
|
210
|
+
async with self._session.client("bedrock-runtime", config=config) as client:
|
|
209
211
|
response = await client.converse_stream(**self._opts)
|
|
210
212
|
request_id = response["ResponseMetadata"]["RequestId"]
|
|
211
213
|
if response["ResponseMetadata"]["HTTPStatusCode"] != 200:
|
livekit/plugins/aws/version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: livekit-plugins-aws
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.7
|
|
4
4
|
Summary: LiveKit Agents Plugin for services from AWS
|
|
5
5
|
Project-URL: Documentation, https://docs.livekit.io
|
|
6
6
|
Project-URL: Website, https://livekit.io/
|
|
@@ -20,7 +20,7 @@ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
|
20
20
|
Requires-Python: >=3.9.0
|
|
21
21
|
Requires-Dist: aioboto3>=14.1.0
|
|
22
22
|
Requires-Dist: amazon-transcribe>=0.6.2
|
|
23
|
-
Requires-Dist: livekit-agents>=1.1.
|
|
23
|
+
Requires-Dist: livekit-agents>=1.1.7
|
|
24
24
|
Provides-Extra: realtime
|
|
25
25
|
Requires-Dist: aws-sdk-bedrock-runtime==0.0.2; (python_version >= '3.12') and extra == 'realtime'
|
|
26
26
|
Requires-Dist: boto3>1.35.10; extra == 'realtime'
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
livekit/plugins/aws/__init__.py,sha256=dCZISj1yZG0WZTojk3sU-Ub4PK1ThCVhamrl9k_NbBw,2047
|
|
2
|
-
livekit/plugins/aws/llm.py,sha256=
|
|
2
|
+
livekit/plugins/aws/llm.py,sha256=CVbOASZhd0QiUcZ_p6cL97fx4Dr1VSj25GwJPnfX2-s,12059
|
|
3
3
|
livekit/plugins/aws/log.py,sha256=S5ICcsnwshZhMG0HPmc_lI3mtHmcY4oQMJBsnnho-bM,289
|
|
4
4
|
livekit/plugins/aws/models.py,sha256=ztI9n3r8OHGlQewWXiyQP3SaavFKHkw-VVuK9Xz4K1I,696
|
|
5
5
|
livekit/plugins/aws/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
livekit/plugins/aws/stt.py,sha256=PSR89aN28wm4i83yEdhkDJ9xzM0CsNIKrc3v3EbPndQ,9018
|
|
7
7
|
livekit/plugins/aws/tts.py,sha256=T5dVpTuIuzQimYNnkfXi5dRLmRldWySL4IcbkXjmJLM,6083
|
|
8
8
|
livekit/plugins/aws/utils.py,sha256=nA5Ua1f4T-25Loar6EvlrKTXI9N-zpTIH7cdQkwGyGI,1518
|
|
9
|
-
livekit/plugins/aws/version.py,sha256
|
|
9
|
+
livekit/plugins/aws/version.py,sha256=EcBB23XE8aEiF7xHMivcb9wptFeYkGB1WNGSn1bIV3A,600
|
|
10
10
|
livekit/plugins/aws/experimental/realtime/__init__.py,sha256=mm_TGZc9QAWSO-VOO3PdE8Y5R6xlWckXRZuiFUIHa-Q,287
|
|
11
11
|
livekit/plugins/aws/experimental/realtime/events.py,sha256=-pJrwVrH5AZFxa1eDbX5nDdnJMz4BNucNZlYUYLsP-Y,15853
|
|
12
12
|
livekit/plugins/aws/experimental/realtime/pretty_printer.py,sha256=KN7KPrfQu8cU7ff34vFAtfrd1umUSTVNKXQU7D8AMiM,1442
|
|
13
|
-
livekit/plugins/aws/experimental/realtime/realtime_model.py,sha256=
|
|
13
|
+
livekit/plugins/aws/experimental/realtime/realtime_model.py,sha256=qLrZdCxx4_JEk4-Z39nSfbqMcETMCmXm12Xhg9Sg1aQ,59670
|
|
14
14
|
livekit/plugins/aws/experimental/realtime/turn_tracker.py,sha256=bcufaap-coeIYuK3ct1Is9W_UoefGYRmnJu7Mn5DCYU,6002
|
|
15
|
-
livekit_plugins_aws-1.1.
|
|
16
|
-
livekit_plugins_aws-1.1.
|
|
17
|
-
livekit_plugins_aws-1.1.
|
|
15
|
+
livekit_plugins_aws-1.1.7.dist-info/METADATA,sha256=Ct7BINBZCzj9FfLmvJA7IIrrZIm1LZ9Zd0boYSu-atQ,1989
|
|
16
|
+
livekit_plugins_aws-1.1.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
17
|
+
livekit_plugins_aws-1.1.7.dist-info/RECORD,,
|
|
File without changes
|