hyperforge-google 1.0.0.post38__tar.gz → 1.0.0.post49__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.
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/PKG-INFO +1 -1
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/pyproject.toml +1 -1
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google/driver.py +18 -7
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google.egg-info/PKG-INFO +1 -1
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/README.md +0 -0
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/setup.cfg +0 -0
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google/__init__.py +0 -0
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google/agent.py +0 -0
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google/config.py +0 -0
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google/py.typed +0 -0
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google.egg-info/SOURCES.txt +0 -0
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google.egg-info/dependency_links.txt +0 -0
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google.egg-info/requires.txt +0 -0
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google.egg-info/top_level.txt +0 -0
- {hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/tests/test_google.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hyperforge_google"
|
|
7
|
-
version = "1.0.0.
|
|
7
|
+
version = "1.0.0.post49"
|
|
8
8
|
license = "Apache-2.0"
|
|
9
9
|
description = "Google Search Hyperforge agent"
|
|
10
10
|
authors = [{ name = "Nuclia", email = "nucliadb@nuclia.com" }]
|
{hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google/driver.py
RENAMED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
from google.auth import load_credentials_from_dict # type: ignore
|
|
1
4
|
from google.genai import Client
|
|
2
5
|
from hyperforge.configure import driver
|
|
3
6
|
from hyperforge.driver import Driver
|
|
@@ -17,17 +20,25 @@ class GoogleDriver(Driver):
|
|
|
17
20
|
|
|
18
21
|
@classmethod
|
|
19
22
|
async def init(cls, driver: GoogleDriverConfig) -> Self:
|
|
20
|
-
creds = None
|
|
21
|
-
if driver.config.vertexai:
|
|
22
|
-
from google.auth import load_credentials_from_file
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
credentials = None
|
|
25
|
+
location = None
|
|
26
|
+
if driver.config.vertexai:
|
|
27
|
+
if driver.config.credentials:
|
|
28
|
+
info = json.loads(driver.config.credentials)
|
|
29
|
+
credentials, project = load_credentials_from_dict(
|
|
30
|
+
info,
|
|
31
|
+
scopes=["https://www.googleapis.com/auth/cloud-platform"],
|
|
32
|
+
)
|
|
33
|
+
else:
|
|
34
|
+
project = driver.config.location
|
|
35
|
+
location = driver.config.location
|
|
25
36
|
client = Client(
|
|
26
37
|
vertexai=driver.config.vertexai,
|
|
27
|
-
credentials=
|
|
38
|
+
credentials=credentials,
|
|
28
39
|
api_key=driver.config.api_key,
|
|
29
|
-
project=
|
|
30
|
-
location=
|
|
40
|
+
project=project,
|
|
41
|
+
location=location,
|
|
31
42
|
)
|
|
32
43
|
return cls(
|
|
33
44
|
client=client,
|
|
File without changes
|
|
File without changes
|
{hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google/__init__.py
RENAMED
|
File without changes
|
{hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google/agent.py
RENAMED
|
File without changes
|
{hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google/config.py
RENAMED
|
File without changes
|
{hyperforge_google-1.0.0.post38 → hyperforge_google-1.0.0.post49}/src/hyperforge_google/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|