trustgraph-bedrock 0.12.5__tar.gz → 0.13.1__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.
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/PKG-INFO +2 -2
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/setup.py +1 -1
- trustgraph-bedrock-0.13.1/trustgraph/bedrock_version.py +1 -0
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph/model/text_completion/bedrock/llm.py +21 -8
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph_bedrock.egg-info/PKG-INFO +2 -2
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph_bedrock.egg-info/requires.txt +1 -1
- trustgraph-bedrock-0.12.5/trustgraph/bedrock_version.py +0 -1
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/README.md +0 -0
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/scripts/text-completion-bedrock +0 -0
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/setup.cfg +0 -0
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph/model/text_completion/bedrock/__init__.py +0 -0
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph/model/text_completion/bedrock/__main__.py +0 -0
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph_bedrock.egg-info/SOURCES.txt +0 -0
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph_bedrock.egg-info/dependency_links.txt +0 -0
- {trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph_bedrock.egg-info/top_level.txt +0 -0
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-bedrock
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.13.1
|
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
6
|
Author: trustgraph.ai
|
7
7
|
Author-email: security@trustgraph.ai
|
8
8
|
License: UNKNOWN
|
9
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.
|
9
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.13.1.tar.gz
|
10
10
|
Platform: UNKNOWN
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
@@ -34,7 +34,7 @@ setuptools.setup(
|
|
34
34
|
python_requires='>=3.8',
|
35
35
|
download_url = "https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v" + version + ".tar.gz",
|
36
36
|
install_requires=[
|
37
|
-
"trustgraph-base>=0.
|
37
|
+
"trustgraph-base>=0.13,<0.14",
|
38
38
|
"pulsar-client",
|
39
39
|
"prometheus-client",
|
40
40
|
"boto3",
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.13.1"
|
@@ -7,6 +7,7 @@ Input is prompt, output is response. Mistral is default.
|
|
7
7
|
import boto3
|
8
8
|
import json
|
9
9
|
from prometheus_client import Histogram
|
10
|
+
import os
|
10
11
|
|
11
12
|
from .... schema import TextCompletionRequest, TextCompletionResponse, Error
|
12
13
|
from .... schema import text_completion_request_queue
|
@@ -21,10 +22,11 @@ default_input_queue = text_completion_request_queue
|
|
21
22
|
default_output_queue = text_completion_response_queue
|
22
23
|
default_subscriber = module
|
23
24
|
default_model = 'mistral.mistral-large-2407-v1:0'
|
24
|
-
default_region = 'us-west-2'
|
25
25
|
default_temperature = 0.0
|
26
26
|
default_max_output = 2048
|
27
|
-
|
27
|
+
default_aws_id_key = os.getenv("AWS_ID_KEY", None)
|
28
|
+
default_aws_secret = os.getenv("AWS_SECRET", None)
|
29
|
+
default_aws_region = os.getenv("AWS_REGION", 'us-west-2')
|
28
30
|
|
29
31
|
class Processor(ConsumerProducer):
|
30
32
|
|
@@ -34,12 +36,21 @@ class Processor(ConsumerProducer):
|
|
34
36
|
output_queue = params.get("output_queue", default_output_queue)
|
35
37
|
subscriber = params.get("subscriber", default_subscriber)
|
36
38
|
model = params.get("model", default_model)
|
37
|
-
|
38
|
-
aws_secret = params.get("aws_secret")
|
39
|
-
aws_region = params.get("aws_region",
|
39
|
+
aws_id_key = params.get("aws_id_key", default_aws_id_key)
|
40
|
+
aws_secret = params.get("aws_secret", default_aws_secret)
|
41
|
+
aws_region = params.get("aws_region", default_aws_region)
|
40
42
|
temperature = params.get("temperature", default_temperature)
|
41
43
|
max_output = params.get("max_output", default_max_output)
|
42
44
|
|
45
|
+
if aws_id_key is None:
|
46
|
+
raise RuntimeError("AWS ID not specified")
|
47
|
+
|
48
|
+
if aws_secret is None:
|
49
|
+
raise RuntimeError("AWS secret not specified")
|
50
|
+
|
51
|
+
if aws_region is None:
|
52
|
+
raise RuntimeError("AWS region not specified")
|
53
|
+
|
43
54
|
super(Processor, self).__init__(
|
44
55
|
**params | {
|
45
56
|
"input_queue": input_queue,
|
@@ -71,7 +82,7 @@ class Processor(ConsumerProducer):
|
|
71
82
|
self.max_output = max_output
|
72
83
|
|
73
84
|
self.session = boto3.Session(
|
74
|
-
aws_access_key_id=
|
85
|
+
aws_access_key_id=aws_id_key,
|
75
86
|
aws_secret_access_key=aws_secret,
|
76
87
|
region_name=aws_region
|
77
88
|
)
|
@@ -289,17 +300,20 @@ class Processor(ConsumerProducer):
|
|
289
300
|
|
290
301
|
parser.add_argument(
|
291
302
|
'-z', '--aws-id-key',
|
303
|
+
default=default_aws_id_key,
|
292
304
|
help=f'AWS ID Key'
|
293
305
|
)
|
294
306
|
|
295
307
|
parser.add_argument(
|
296
308
|
'-k', '--aws-secret',
|
309
|
+
default=default_aws_secret,
|
297
310
|
help=f'AWS Secret Key'
|
298
311
|
)
|
299
312
|
|
300
313
|
parser.add_argument(
|
301
314
|
'-r', '--aws-region',
|
302
|
-
|
315
|
+
default=default_aws_region,
|
316
|
+
help=f'AWS Region'
|
303
317
|
)
|
304
318
|
|
305
319
|
parser.add_argument(
|
@@ -320,4 +334,3 @@ def run():
|
|
320
334
|
|
321
335
|
Processor.start(module, __doc__)
|
322
336
|
|
323
|
-
|
{trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph_bedrock.egg-info/PKG-INFO
RENAMED
@@ -1,12 +1,12 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: trustgraph-bedrock
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.13.1
|
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
6
|
Author: trustgraph.ai
|
7
7
|
Author-email: security@trustgraph.ai
|
8
8
|
License: UNKNOWN
|
9
|
-
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.
|
9
|
+
Download-URL: https://github.com/trustgraph-ai/trustgraph/archive/refs/tags/v0.13.1.tar.gz
|
10
10
|
Platform: UNKNOWN
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.12.5"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph_bedrock.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{trustgraph-bedrock-0.12.5 → trustgraph-bedrock-0.13.1}/trustgraph_bedrock.egg-info/top_level.txt
RENAMED
File without changes
|