hyperforge-google 1.0.0.post35__tar.gz → 1.0.0.post45__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.post35 → hyperforge_google-1.0.0.post45}/PKG-INFO +1 -1
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/pyproject.toml +1 -1
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google/driver.py +12 -5
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google.egg-info/PKG-INFO +1 -1
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/README.md +0 -0
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/setup.cfg +0 -0
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google/__init__.py +0 -0
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google/agent.py +0 -0
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google/config.py +0 -0
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google/py.typed +0 -0
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google.egg-info/SOURCES.txt +0 -0
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google.egg-info/dependency_links.txt +0 -0
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google.egg-info/requires.txt +0 -0
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google.egg-info/top_level.txt +0 -0
- {hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/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.post45"
|
|
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.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google/driver.py
RENAMED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
1
3
|
from google.genai import Client
|
|
4
|
+
from google.oauth2 import service_account
|
|
2
5
|
from hyperforge.configure import driver
|
|
3
6
|
from hyperforge.driver import Driver
|
|
4
7
|
from typing_extensions import Self
|
|
@@ -8,8 +11,8 @@ from hyperforge_google.config import GoogleDriverConfig
|
|
|
8
11
|
|
|
9
12
|
@driver(
|
|
10
13
|
id="google",
|
|
11
|
-
title="Google
|
|
12
|
-
description="
|
|
14
|
+
title="Google Source",
|
|
15
|
+
description="Source for interacting with the Google API.",
|
|
13
16
|
config_schema=GoogleDriverConfig,
|
|
14
17
|
)
|
|
15
18
|
class GoogleDriver(Driver):
|
|
@@ -17,11 +20,15 @@ class GoogleDriver(Driver):
|
|
|
17
20
|
|
|
18
21
|
@classmethod
|
|
19
22
|
async def init(cls, driver: GoogleDriverConfig) -> Self:
|
|
23
|
+
|
|
20
24
|
creds = None
|
|
21
25
|
if driver.config.vertexai:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
if driver.config.credentials:
|
|
27
|
+
info = json.loads(driver.config.credentials)
|
|
28
|
+
creds = service_account.Credentials.from_service_account_info(
|
|
29
|
+
info,
|
|
30
|
+
scopes=["https://www.googleapis.com/auth/cloud-platform"],
|
|
31
|
+
)
|
|
25
32
|
client = Client(
|
|
26
33
|
vertexai=driver.config.vertexai,
|
|
27
34
|
credentials=creds,
|
|
File without changes
|
|
File without changes
|
{hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google/__init__.py
RENAMED
|
File without changes
|
{hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google/agent.py
RENAMED
|
File without changes
|
{hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google/config.py
RENAMED
|
File without changes
|
{hyperforge_google-1.0.0.post35 → hyperforge_google-1.0.0.post45}/src/hyperforge_google/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|