Рефакторинг
This commit is contained in:
@@ -3,9 +3,9 @@ from __future__ import annotations
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
from app.modules.agent.code_qa_runtime import CodeQaRuntimeExecutor
|
||||
from app.modules.agent.runtime import AgentRuntimeExecutor
|
||||
from app.modules.agent.llm import AgentLlmService
|
||||
from app.modules.agent.prompt_loader import PromptLoader
|
||||
from app.modules.agent.llm.prompt_loader import PromptLoader
|
||||
from app.modules.shared.gigachat.client import GigaChatClient
|
||||
from app.modules.shared.gigachat.settings import GigaChatSettings
|
||||
from app.modules.shared.gigachat.token_provider import GigaChatTokenProvider
|
||||
@@ -29,7 +29,7 @@ class RuntimeAdapter:
|
||||
PipelineEnvLoader(self._test_root).load()
|
||||
self._started_at = datetime.now()
|
||||
self._rag_adapter = None
|
||||
self._executor: CodeQaRuntimeExecutor | None = None
|
||||
self._executor: AgentRuntimeExecutor | None = None
|
||||
|
||||
def execute(self, case: V2Case, rag_session_id: str | None) -> ExecutionPayload:
|
||||
phrase = PhraseCase(
|
||||
@@ -100,9 +100,9 @@ class RuntimeAdapter:
|
||||
)
|
||||
return self._rag_adapter
|
||||
|
||||
def _executor_instance(self) -> CodeQaRuntimeExecutor:
|
||||
def _executor_instance(self) -> AgentRuntimeExecutor:
|
||||
if self._executor is None:
|
||||
self._executor = CodeQaRuntimeExecutor(_build_llm())
|
||||
self._executor = AgentRuntimeExecutor(_build_llm())
|
||||
return self._executor
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user