Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions agents/google/src/hyperforge_google/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

@driver(
id="google",
title="Google Driver",
description="Driver for interacting with the Google API.",
title="Google Source",
description="Source for interacting with the Google API.",
config_schema=GoogleDriverConfig,
)
class GoogleDriver(Driver):
Expand Down
2 changes: 1 addition & 1 deletion agents/mcp/src/hyperforge_mcp/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ async def _get_question_context(
try:
await self.initialize(manager, memory)
except KeyError:
raise Exception("No MCP driver found")
raise Exception("No MCP source found")

context = Context(
agent_id=self.agent_id,
Expand Down
4 changes: 2 additions & 2 deletions agents/mcp/src/hyperforge_mcp/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,8 @@ async def handle_callback(

@driver(
id="mcphttp",
title="MCP HTTP Driver",
description="Driver for interacting with the MCP HTTP API.",
title="MCP HTTP Source",
description="Source for interacting with the MCP HTTP API.",
config_schema=MCPHTTPDriverConfig,
)
class MCPHTTPDriver(Driver):
Expand Down
2 changes: 1 addition & 1 deletion agents/mcp/src/hyperforge_mcp/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ async def get_question_context(
try:
await agent.initialize(manager, memory)
except KeyError:
raise Exception("No MCP driver found")
raise Exception("No MCP source found")
response, input_tokens, output_tokens = await self.summarize_tools(
manager,
agent.tools,
Expand Down
6 changes: 3 additions & 3 deletions agents/mcp/src/hyperforge_mcp/stdio.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ class MCPStdioFullDriverConfig(MCPStdioInnerConfig):

@driver(
id="mcpstdio",
title="MCP Stdio Driver",
description="Driver for interacting with the MCP Stdio API.",
title="MCP Stdio Source",
description="Source for interacting with the MCP Stdio API.",
config_schema=MCPStdioDriverConfig,
)
class MCPStdioDriver(Driver):
Expand Down Expand Up @@ -163,7 +163,7 @@ async def init(cls, driver: MCPStdioDriverConfig) -> Self:
for env in validated_config.env:
if driver.config.env is None or env not in driver.config.env:
raise KeyError(
f"No environmental variable on MCP driver {driver.config.server}: {env}"
f"No environmental variable on MCP source {driver.config.server}: {env}"
)

combined_envs = {}
Expand Down
2 changes: 1 addition & 1 deletion agents/nucliadb/src/hyperforge_nucliadb/ask/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ async def choose_source(
async def load_source_information(source: str, manager: Manager) -> Source:
driver = manager.drivers.get(source)
if not isinstance(driver, NucliaDBDriver) and not isinstance(driver, SyncDriver):
raise ValueError("Source is not a NucliaDB driver")
raise ValueError("Source is not a KnowledgeBox source")
(
description,
labels,
Expand Down
4 changes: 2 additions & 2 deletions agents/nucliadb/src/hyperforge_nucliadb/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ async def manager_connect(conn: NucliaDBConnection):

@driver(
id="nucliadb",
title="NucliaDB Driver",
description="Driver for interacting with the NucliaDB API.",
title="KnowledgeBox Source",
description="Source for interacting with the KnowledgeBox API.",
config_schema=NucliaDBConfig,
)
class NucliaDBDriver(Driver):
Expand Down
2 changes: 1 addition & 1 deletion agents/nucliadb/src/hyperforge_nucliadb/sync/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async def post_filter_resources_by_connection(
or len(driver.sync_configs[sync_config_id]) == 0
):
raise Exception(
f"Connection ID {sync_config_id} not found in driver sync configs"
f"Connection ID {sync_config_id} not found in source sync configs"
)
inner_connection_id = driver.sync_configs[sync_config_id][0]
creds_providers[sync_config_id] = driver.information[
Expand Down
4 changes: 2 additions & 2 deletions agents/nucliadb/src/hyperforge_nucliadb/sync/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class ExternalConnectionOutput(BaseModel):

@driver(
id="sync",
title="Sync Driver",
description="Driver for interacting with the Sync API.",
title="Sync Source",
description="Source for interacting with the Sync API.",
config_schema=SyncDriverConfig,
)
class SyncDriver(NucliaDBDriver):
Expand Down
2 changes: 1 addition & 1 deletion agents/nucliadb/tests/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"kbid": "e103caf3-f8cb-4161-a57c-aad1192d0666",
"key": KB_E103CAF3_F8CB_4161_A57C_AAD1192D0666,
"filters": [],
"description": "Nuclia Sync driver for testing",
"description": "Nuclia Sync source for testing",
"connection_ids": ["019cade7-c177-77c5-99c2-c8771f85cf91"],
},
},
Expand Down
4 changes: 2 additions & 2 deletions agents/perplexity/src/hyperforge_perplexity/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

@driver(
id="perplexity",
title="Perplexity Driver",
description="Driver for interacting with the Perplexity API.",
title="Perplexity Source",
description="Source for interacting with the Perplexity API.",
config_schema=PerplexityDriverConfig,
)
class PerplexityDriver(Driver):
Expand Down
4 changes: 2 additions & 2 deletions agents/perplexity/src/hyperforge_perplexity/perplexity.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ async def internet_search(
Optional[PerplexityDriver], manager.drivers.get(self.config.source)
)
if self.driver is None:
raise Exception("Perplexity driver does not exist")
raise Exception("Perplexity source does not exist")

web_search_options = WebSearchOptions(
search_context_size=self.config.search_context_size,
Expand Down Expand Up @@ -178,7 +178,7 @@ async def _get_question_context(
)

if self.driver is None:
raise Exception("Perplexity driver does not exist")
raise Exception("Perplexity source does not exist")

context = await self.internet_search(
question,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def search(
Optional[PerplexityDriver], manager.drivers.get(self.config.source)
)
if self.driver is None:
raise Exception("Perplexity driver does not exist")
raise Exception("Perplexity source does not exist")

response = await self.driver.client.search.create(
query=question,
Expand Down Expand Up @@ -121,7 +121,7 @@ async def _get_question_context(
)

if self.driver is None:
raise Exception("Perplexity driver does not exist")
raise Exception("Perplexity source does not exist")

context = await self.search(
question,
Expand Down
2 changes: 1 addition & 1 deletion agents/rephrase/src/hyperforge_rephrase/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ async def inner_rephrase(
NucliaDBDriver, manager.drivers.get(self.config.kb)
)
if nucliadb_driver is None:
raise Exception(f"No NucliaDB Driver {self.config.kb} found")
raise Exception(f"No KnowledgeBox source {self.config.kb} found")

if self.config.synonyms:
question = await nucliadb_driver.synonyms(question)
Expand Down
10 changes: 5 additions & 5 deletions hyperforge/src/hyperforge/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def load_driver(
driver_id = registration.id
registration.klass = resolve_dotted_name(klass)
if driver_id is None:
raise Exception("Driver configuration must have an 'id' field")
raise Exception("Source configuration must have an 'id' field")
if driver_id in _context.drivers:
# Already registered
return
Expand Down Expand Up @@ -340,15 +340,15 @@ def get_agent_klass(module: str, _context: Registry = GLOBAL_REGISTRY) -> Type["

def validate_driver(item: Any, _context: Registry = GLOBAL_REGISTRY):
if not isinstance(item, dict):
raise ValueError("Driver configuration must be a dictionary")
raise ValueError("Source configuration must be a dictionary")

provider = item.get("provider")
if provider is None:
raise ValueError("Driver configuration must have a 'provider' field")
raise ValueError("Source configuration must have a 'provider' field")

if provider not in _context.drivers:
raise ValueError(
f"Driver module '{provider}' is not registered in the drivers registry"
f"Source module '{provider}' is not registered in the drivers registry"
)
return _context.drivers[provider].config_schema.model_validate(item)

Expand All @@ -358,7 +358,7 @@ def get_driver_config_klass(
) -> Type["DriverConfig"]:
driver = _context.drivers.get(provider)
if driver is None:
raise Exception(f"Driver module '{provider}' is not registered")
raise Exception(f"Source module '{provider}' is not registered")

return driver.config_schema

Expand Down
4 changes: 2 additions & 2 deletions hyperforge/src/hyperforge/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ class DriverConfig(BaseModel, Generic[T]):
identifier: str
name: str
provider: Any = Field(
..., description="The type of driver, e.g., 'google', 'marklogic', etc."
..., description="The type of source, e.g., 'google', 'marklogic', etc."
)
config: T = Field(..., description="The configuration specific to the driver.")
config: T = Field(..., description="The configuration specific to the source.")


class Driver(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion hyperforge/src/hyperforge/standalone/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ async def get_driver(self, account: str, agent_id: str, driver: str) -> Any:
if drv.identifier == driver:
return drv
raise exceptions.NotFoundError(
f"Driver '{driver}' not found in agent '{agent_id}'"
f"Source '{driver}' not found in agent '{agent_id}'"
)

async def get_drivers(self, account: str, agent_id: str) -> List[Any]:
Expand Down
2 changes: 1 addition & 1 deletion hyperforge/src/hyperforge/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class WidgetType(str, Enum):

# Driver and source selection widgets
DRIVER_SELECT = "driver_select"
"""Selector for data source drivers (databases, APIs, etc.)"""
"""Selector for data sources (databases, APIs, etc.)"""

FILTERED_SOURCE_SELECT = "filtered_source_select"
"""Source selector with filtering capabilities based on transport type"""
Expand Down
Loading