feat: wire DSH model environment configuration
This commit is contained in:
1 parent
0933766dcf
commit
b84afbfa8a
1 file changed
+8
-1
@@ -1,6 +1,7 @@
|
||||
"""Single-project task presentation; persistence and CAD remain in the service."""
|
||||
from __future__ import annotations
|
||||
from threading import Event
|
||||
import os
|
||||
from ..stop_control import StopControl
|
||||
from shiboken6 import isValid
|
||||
import time
|
||||
@@ -27,6 +28,7 @@ from .operation_state import ContextReadPhase, OperationPhase, OperationState
|
||||
from ...dsh.service_adapter import DshServiceAdapter
|
||||
from ...dsh.snapshot import TaskSnapshot
|
||||
from ...dsh.supervisor import DshSupervisor
|
||||
from ...dsh.client import DshConfig, OpenAICompatibleClient
|
||||
from .dsh_panel import DshPanel
|
||||
|
||||
class TrialTaskCenterWindow(QMainWindow):
|
||||
@@ -828,7 +830,12 @@ class TrialTaskCenterWindow(QMainWindow):
|
||||
status = getattr(getattr(self, '_context', None), 'task', None)
|
||||
status_value = getattr(getattr(status, 'status', None), 'value', 'observe')
|
||||
panel = DshPanel(self.service, task_id=task_id,
|
||||
snapshot=TaskSnapshot(task_id, str(status_value)), parent=self)
|
||||
snapshot=TaskSnapshot(task_id, str(status_value)),
|
||||
client=OpenAICompatibleClient(DshConfig(
|
||||
base_url=os.getenv('DSH_API_BASE', ''),
|
||||
model=os.getenv('DSH_MODEL', ''),
|
||||
api_key=os.getenv('DSH_API_KEY', ''),
|
||||
)), parent=self)
|
||||
panel.exec()
|
||||
|
||||
def _cancel_ui_operation(self):
|
||||
|
||||
Reference in new issue
Block a user