mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
feat(agent): update import paths for gns3_copilot modules
Updated import statements across multiple agent files to use absolute paths starting with `gns3server.agent.gns3_copilot` instead of relative `gns3_copilot` imports. This ensures proper module resolution within the gns3-server package structure and prevents import errors when the agent is executed from different contexts.
This commit is contained in:
1 parent
73de248381
commit
dde2a00c5b
17 files changed
+36
-28
No files matched your search
@@ -34,7 +34,7 @@ def get_device_ports_from_topology(
|
||||
|
||||
try:
|
||||
# Lazy import to avoid circular dependency
|
||||
from gns3_copilot.gns3_client import GNS3TopologyTool
|
||||
from gns3server.agent.gns3_copilot.gns3_client import GNS3TopologyTool
|
||||
|
||||
# Get topology information
|
||||
topo = GNS3TopologyTool()
|
||||
|
||||
@@ -11,7 +11,7 @@ This allows the copilot module to access API keys that are hidden from API respo
|
||||
while leveraging the API's default_config selection logic.
|
||||
|
||||
Usage:
|
||||
from gns3_copilot.utils.llm_config_helper import get_user_llm_config
|
||||
from gns3server.agent.gns3_copilot.utils.llm_config_helper import get_user_llm_config
|
||||
|
||||
# Get user's default LLM config (with API key)
|
||||
config = get_user_llm_config(user_id, jwt_token, gns3_url)
|
||||
@@ -232,7 +232,7 @@ def _detect_gns3_url() -> Optional[str]:
|
||||
GNS3 server URL, or None if detection failed
|
||||
"""
|
||||
try:
|
||||
from gns3_copilot.gns3_client.connector_factory import (
|
||||
from gns3server.agent.gns3_copilot.gns3_client.connector_factory import (
|
||||
_get_url_from_controller,
|
||||
_get_url_from_config,
|
||||
DEFAULT_GNS3_URL
|
||||
|
||||
Reference in new issue
Block a user