trustgraph-vertexai 1.4.11__tar.gz → 1.4.13__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.
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/PKG-INFO +1 -1
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph/model/text_completion/vertexai/llm.py +19 -13
- trustgraph_vertexai-1.4.13/trustgraph/vertexai_version.py +1 -0
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph_vertexai.egg-info/PKG-INFO +1 -1
- trustgraph_vertexai-1.4.11/trustgraph/vertexai_version.py +0 -1
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/README.md +0 -0
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/pyproject.toml +0 -0
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/setup.cfg +0 -0
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph/model/text_completion/vertexai/__init__.py +0 -0
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph/model/text_completion/vertexai/__main__.py +0 -0
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph_vertexai.egg-info/SOURCES.txt +0 -0
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph_vertexai.egg-info/dependency_links.txt +0 -0
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph_vertexai.egg-info/entry_points.txt +0 -0
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph_vertexai.egg-info/requires.txt +0 -0
- {trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph_vertexai.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-vertexai
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.13
|
|
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
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -152,29 +152,35 @@ class Processor(LlmService):
|
|
|
152
152
|
|
|
153
153
|
return self.anthropic_client
|
|
154
154
|
|
|
155
|
-
def _get_gemini_model(self, model_name):
|
|
155
|
+
def _get_gemini_model(self, model_name, temperature=None):
|
|
156
156
|
"""Get or create a Gemini model instance"""
|
|
157
157
|
if model_name not in self.model_clients:
|
|
158
158
|
logger.info(f"Creating GenerativeModel instance for '{model_name}'")
|
|
159
159
|
self.model_clients[model_name] = GenerativeModel(model_name)
|
|
160
160
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
161
|
+
# Use provided temperature or fall back to default
|
|
162
|
+
effective_temperature = temperature if temperature is not None else self.temperature
|
|
163
|
+
|
|
164
|
+
# Create generation config with the effective temperature
|
|
165
|
+
generation_config = GenerationConfig(
|
|
166
|
+
temperature=effective_temperature,
|
|
167
|
+
top_p=1.0,
|
|
168
|
+
top_k=10,
|
|
169
|
+
candidate_count=1,
|
|
170
|
+
max_output_tokens=self.max_output,
|
|
171
|
+
)
|
|
169
172
|
|
|
170
|
-
return self.model_clients[model_name],
|
|
173
|
+
return self.model_clients[model_name], generation_config
|
|
171
174
|
|
|
172
|
-
async def generate_content(self, system, prompt, model=None):
|
|
175
|
+
async def generate_content(self, system, prompt, model=None, temperature=None):
|
|
173
176
|
|
|
174
177
|
# Use provided model or fall back to default
|
|
175
178
|
model_name = model or self.default_model
|
|
179
|
+
# Use provided temperature or fall back to default
|
|
180
|
+
effective_temperature = temperature if temperature is not None else self.temperature
|
|
176
181
|
|
|
177
182
|
logger.debug(f"Using model: {model_name}")
|
|
183
|
+
logger.debug(f"Using temperature: {effective_temperature}")
|
|
178
184
|
|
|
179
185
|
try:
|
|
180
186
|
if 'claude' in model_name.lower():
|
|
@@ -187,7 +193,7 @@ class Processor(LlmService):
|
|
|
187
193
|
system=system,
|
|
188
194
|
messages=[{"role": "user", "content": prompt}],
|
|
189
195
|
max_tokens=self.api_params['max_output_tokens'],
|
|
190
|
-
temperature=
|
|
196
|
+
temperature=effective_temperature,
|
|
191
197
|
top_p=self.api_params['top_p'],
|
|
192
198
|
top_k=self.api_params['top_k'],
|
|
193
199
|
)
|
|
@@ -203,7 +209,7 @@ class Processor(LlmService):
|
|
|
203
209
|
logger.debug(f"Sending request to Gemini model '{model_name}'...")
|
|
204
210
|
full_prompt = system + "\n\n" + prompt
|
|
205
211
|
|
|
206
|
-
llm, generation_config = self._get_gemini_model(model_name)
|
|
212
|
+
llm, generation_config = self._get_gemini_model(model_name, effective_temperature)
|
|
207
213
|
|
|
208
214
|
response = llm.generate_content(
|
|
209
215
|
full_prompt, generation_config = generation_config,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.4.13"
|
{trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph_vertexai.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: trustgraph-vertexai
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.13
|
|
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
|
Author-email: "trustgraph.ai" <security@trustgraph.ai>
|
|
6
6
|
Project-URL: Homepage, https://github.com/trustgraph-ai/trustgraph
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.4.11"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph_vertexai.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph_vertexai.egg-info/requires.txt
RENAMED
|
File without changes
|
{trustgraph_vertexai-1.4.11 → trustgraph_vertexai-1.4.13}/trustgraph_vertexai.egg-info/top_level.txt
RENAMED
|
File without changes
|