trustgraph-bedrock 0.20.7__tar.gz → 0.20.9__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.
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trustgraph-bedrock
3
- Version: 0.20.7
3
+ Version: 0.20.9
4
4
  Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
5
5
  Home-page: https://github.com/trustgraph-ai/trustgraph
6
- Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.20.7.tar.gz
6
+ Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.20.9.tar.gz
7
7
  Author: trustgraph.ai
8
8
  Author-email: security@trustgraph.ai
9
9
  Classifier: Programming Language :: Python :: 3
@@ -0,0 +1 @@
1
+ __version__ = "0.20.9"
@@ -5,7 +5,6 @@ Input is prompt, output is response. Mistral is default.
5
5
  """
6
6
 
7
7
  import boto3
8
- from botocore.errorfactory import ThrottlingException
9
8
  import json
10
9
  from prometheus_client import Histogram
11
10
  import os
@@ -259,27 +258,17 @@ class Processor(ConsumerProducer):
259
258
 
260
259
  print("Done.", flush=True)
261
260
 
262
- except ThrottlingException:
261
+ except self.bedrock.exceptions.ThrottlingException as e:
263
262
 
264
- print("Send rate limit response...", flush=True)
263
+ print("Hit rate limit:", e, flush=True)
265
264
 
266
- r = TextCompletionResponse(
267
- error=Error(
268
- type = "rate-limit",
269
- message = str(e),
270
- ),
271
- response=None,
272
- in_token=None,
273
- out_token=None,
274
- model=None,
275
- )
276
-
277
- self.producer.send(r, properties={"id": id})
278
-
279
- self.consumer.acknowledge(msg)
265
+ # Leave rate limit retries to the base handler
266
+ raise TooManyRequests()
280
267
 
281
268
  except Exception as e:
282
269
 
270
+ # Apart from rate limits, treat all exceptions as unrecoverable
271
+
283
272
  print(type(e))
284
273
  print(f"Exception: {e}")
285
274
 
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trustgraph-bedrock
3
- Version: 0.20.7
3
+ Version: 0.20.9
4
4
  Summary: TrustGraph provides a means to run a pipeline of flexible AI processing components in a flexible means to achieve a processing pipeline.
5
5
  Home-page: https://github.com/trustgraph-ai/trustgraph
6
- Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.20.7.tar.gz
6
+ Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.20.9.tar.gz
7
7
  Author: trustgraph.ai
8
8
  Author-email: security@trustgraph.ai
9
9
  Classifier: Programming Language :: Python :: 3
@@ -1 +0,0 @@
1
- __version__ = "0.20.7"