trustgraph-vertexai 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.

Potentially problematic release.


This version of trustgraph-vertexai might be problematic. Click here for more details.

@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trustgraph-vertexai
3
- Version: 0.12.5
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.12.5.tar.gz
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.12,<0.13",
37
+ "trustgraph-base>=0.13,<0.14",
38
38
  "pulsar-client",
39
39
  "google-cloud-aiplatform",
40
40
  "prometheus-client",
@@ -7,6 +7,7 @@ Google Cloud. Input is prompt, output is response.
7
7
  import vertexai
8
8
  import time
9
9
  from prometheus_client import Histogram
10
+ import os
10
11
 
11
12
  from google.oauth2 import service_account
12
13
  import google
@@ -38,6 +39,7 @@ default_model = 'gemini-1.0-pro-001'
38
39
  default_region = 'us-central1'
39
40
  default_temperature = 0.0
40
41
  default_max_output = 8192
42
+ default_private_key = "private.json"
41
43
 
42
44
  class Processor(ConsumerProducer):
43
45
 
@@ -48,10 +50,13 @@ class Processor(ConsumerProducer):
48
50
  subscriber = params.get("subscriber", default_subscriber)
49
51
  region = params.get("region", default_region)
50
52
  model = params.get("model", default_model)
51
- private_key = params.get("private_key")
53
+ private_key = params.get("private_key", default_private_key)
52
54
  temperature = params.get("temperature", default_temperature)
53
55
  max_output = params.get("max_output", default_max_output)
54
56
 
57
+ if private_key is None:
58
+ raise RuntimeError("Private key file not specified")
59
+
55
60
  super(Processor, self).__init__(
56
61
  **params | {
57
62
  "input_queue": input_queue,
@@ -0,0 +1 @@
1
+ __version__ = "0.13.1"
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trustgraph-vertexai
3
- Version: 0.12.5
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.12.5.tar.gz
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,4 +1,4 @@
1
1
  google-cloud-aiplatform
2
2
  prometheus-client
3
3
  pulsar-client
4
- trustgraph-base<0.13,>=0.12
4
+ trustgraph-base<0.14,>=0.13
@@ -1 +0,0 @@
1
- __version__ = "0.12.5"