livekit-plugins-aws 1.2.11__tar.gz → 1.2.12__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 livekit-plugins-aws might be problematic. Click here for more details.

Files changed (18) hide show
  1. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/PKG-INFO +2 -2
  2. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/experimental/realtime/realtime_model.py +12 -5
  3. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/llm.py +4 -0
  4. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/stt.py +12 -0
  5. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/tts.py +8 -0
  6. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/version.py +1 -1
  7. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/pyproject.toml +1 -1
  8. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/.gitignore +0 -0
  9. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/README.md +0 -0
  10. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/__init__.py +0 -0
  11. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/experimental/realtime/__init__.py +0 -0
  12. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/experimental/realtime/events.py +0 -0
  13. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/experimental/realtime/pretty_printer.py +0 -0
  14. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/experimental/realtime/turn_tracker.py +0 -0
  15. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/log.py +0 -0
  16. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/models.py +0 -0
  17. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/py.typed +0 -0
  18. {livekit_plugins_aws-1.2.11 → livekit_plugins_aws-1.2.12}/livekit/plugins/aws/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: livekit-plugins-aws
3
- Version: 1.2.11
3
+ Version: 1.2.12
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.4
23
- Requires-Dist: livekit-agents>=1.2.11
23
+ Requires-Dist: livekit-agents>=1.2.12
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'
@@ -40,6 +40,7 @@ from livekit.agents import (
40
40
  utils,
41
41
  )
42
42
  from livekit.agents.metrics import RealtimeModelMetrics
43
+ from livekit.agents.metrics.base import Metadata
43
44
  from livekit.agents.types import NOT_GIVEN, NotGivenOr
44
45
  from livekit.agents.utils import is_given
45
46
  from livekit.plugins.aws.experimental.realtime.turn_tracker import _TurnTracker
@@ -259,6 +260,14 @@ class RealtimeModel(llm.RealtimeModel):
259
260
  )
260
261
  self._sessions = weakref.WeakSet[RealtimeSession]()
261
262
 
263
+ @property
264
+ def model(self) -> str:
265
+ return self.model_id
266
+
267
+ @property
268
+ def provider(self) -> str:
269
+ return "Amazon"
270
+
262
271
  def session(self) -> RealtimeSession:
263
272
  """Return a new RealtimeSession bound to this model instance."""
264
273
  sess = RealtimeSession(self)
@@ -273,10 +282,6 @@ class RealtimeModel(llm.RealtimeModel):
273
282
  async def aclose(self) -> None:
274
283
  pass
275
284
 
276
- @property
277
- def model(self) -> str:
278
- return self.model_id
279
-
280
285
 
281
286
  class RealtimeSession( # noqa: F811
282
287
  llm.RealtimeSession[Literal["bedrock_server_event_received", "bedrock_client_event_queued"]]
@@ -871,7 +876,6 @@ class RealtimeSession( # noqa: F811
871
876
  # Q: should we be counting per turn or utterance?
872
877
  metrics = RealtimeModelMetrics(
873
878
  label=self._realtime_model.label,
874
- model=self._realtime_model.model,
875
879
  # TODO: pass in the correct request_id
876
880
  request_id=event_data["event"]["usageEvent"]["completionId"],
877
881
  timestamp=time.monotonic(),
@@ -898,6 +902,9 @@ class RealtimeSession( # noqa: F811
898
902
  audio_tokens=output_tokens["speechTokens"],
899
903
  image_tokens=0,
900
904
  ),
905
+ metadata=Metadata(
906
+ model_name=self._realtime_model.model, model_provider=self._realtime_model.provider
907
+ ),
901
908
  )
902
909
  self.emit("metrics_collected", metrics)
903
910
 
@@ -125,6 +125,10 @@ class LLM(llm.LLM):
125
125
  def model(self) -> str:
126
126
  return self._opts.model
127
127
 
128
+ @property
129
+ def provider(self) -> str:
130
+ return "AWS Bedrock"
131
+
128
132
  def chat(
129
133
  self,
130
134
  *,
@@ -94,6 +94,18 @@ class STT(stt.STT):
94
94
  region=region,
95
95
  )
96
96
 
97
+ @property
98
+ def model(self) -> str:
99
+ return (
100
+ self._config.language_model_name
101
+ if is_given(self._config.language_model_name)
102
+ else "unknown"
103
+ )
104
+
105
+ @property
106
+ def provider(self) -> str:
107
+ return "Amazon Transcribe"
108
+
97
109
  async def aclose(self) -> None:
98
110
  await super().aclose()
99
111
 
@@ -107,6 +107,14 @@ class TTS(tts.TTS):
107
107
  sample_rate=sample_rate,
108
108
  )
109
109
 
110
+ @property
111
+ def model(self) -> str:
112
+ return self._opts.speech_engine
113
+
114
+ @property
115
+ def provider(self) -> str:
116
+ return "Amazon Polly"
117
+
110
118
  def synthesize(
111
119
  self, text: str, *, conn_options: APIConnectOptions = DEFAULT_API_CONNECT_OPTIONS
112
120
  ) -> ChunkedStream:
@@ -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__ = "1.2.11"
15
+ __version__ = "1.2.12"
@@ -23,7 +23,7 @@ classifiers = [
23
23
  "Programming Language :: Python :: 3 :: Only",
24
24
  ]
25
25
  dependencies = [
26
- "livekit-agents>=1.2.11",
26
+ "livekit-agents>=1.2.12",
27
27
  "aioboto3>=14.1.0",
28
28
  "amazon-transcribe>=0.6.4",
29
29
  ]