Fix double summarization, cleanup
This commit is contained in:
parent
b64d9721bb
commit
f5c562db9b
2 changed files with 13 additions and 52 deletions
|
|
@ -12,11 +12,7 @@ from haiku.rag.config.models import AppConfig
|
|||
from haiku.rag.tools.context import ToolContext, prepare_context
|
||||
from haiku.rag.tools.deps import AgentDeps
|
||||
from haiku.rag.tools.document import create_document_toolset
|
||||
from haiku.rag.tools.qa import (
|
||||
QA_SESSION_NAMESPACE,
|
||||
QASessionState,
|
||||
create_qa_toolset,
|
||||
)
|
||||
from haiku.rag.tools.qa import QA_SESSION_NAMESPACE, QASessionState, create_qa_toolset
|
||||
from haiku.rag.tools.search import create_search_toolset
|
||||
from haiku.rag.tools.session import SessionContext
|
||||
from haiku.rag.utils import get_model
|
||||
|
|
@ -167,9 +163,7 @@ async def run_chat_agent(
|
|||
deps: ChatDeps,
|
||||
message: str,
|
||||
) -> str:
|
||||
"""Run the chat agent and trigger background summarization.
|
||||
|
||||
This wrapper handles post-processing like background summarization.
|
||||
"""Run the chat agent.
|
||||
|
||||
Args:
|
||||
agent: The chat agent.
|
||||
|
|
@ -180,7 +174,6 @@ async def run_chat_agent(
|
|||
Agent response.
|
||||
"""
|
||||
result = await agent.run(message, deps=deps)
|
||||
trigger_background_summarization(deps)
|
||||
return result.output
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,12 +6,7 @@ from haiku.rag.tools.context import (
|
|||
prepare_context,
|
||||
)
|
||||
from haiku.rag.tools.deps import AgentDeps
|
||||
from haiku.rag.tools.document import (
|
||||
DocumentInfo,
|
||||
DocumentListResponse,
|
||||
create_document_toolset,
|
||||
find_document,
|
||||
)
|
||||
from haiku.rag.tools.document import create_document_toolset
|
||||
from haiku.rag.tools.filters import (
|
||||
build_document_filter,
|
||||
build_multi_document_filter,
|
||||
|
|
@ -20,51 +15,24 @@ from haiku.rag.tools.filters import (
|
|||
)
|
||||
from haiku.rag.tools.models import AnalysisResult, QAResult
|
||||
from haiku.rag.tools.prompts import build_tools_prompt
|
||||
from haiku.rag.tools.qa import (
|
||||
QA_SESSION_NAMESPACE,
|
||||
QAHistoryEntry,
|
||||
QASessionState,
|
||||
create_qa_toolset,
|
||||
run_qa_core,
|
||||
)
|
||||
from haiku.rag.tools.search import SEARCH_NAMESPACE, SearchState, create_search_toolset
|
||||
from haiku.rag.tools.session import (
|
||||
SESSION_NAMESPACE,
|
||||
SessionContext,
|
||||
SessionState,
|
||||
compute_combined_state_delta,
|
||||
compute_state_delta,
|
||||
)
|
||||
from haiku.rag.tools.qa import create_qa_toolset
|
||||
from haiku.rag.tools.search import create_search_toolset
|
||||
|
||||
__all__ = [
|
||||
"AgentDeps",
|
||||
"build_tools_prompt",
|
||||
"AnalysisResult",
|
||||
"QAResult",
|
||||
"RAGDeps",
|
||||
"ToolContext",
|
||||
"ToolContextCache",
|
||||
"prepare_context",
|
||||
"QAResult",
|
||||
"AnalysisResult",
|
||||
"build_document_filter",
|
||||
"build_multi_document_filter",
|
||||
"build_tools_prompt",
|
||||
"combine_filters",
|
||||
"get_session_filter",
|
||||
"SEARCH_NAMESPACE",
|
||||
"SearchState",
|
||||
"create_search_toolset",
|
||||
"DocumentInfo",
|
||||
"DocumentListResponse",
|
||||
"create_document_toolset",
|
||||
"find_document",
|
||||
"QA_SESSION_NAMESPACE",
|
||||
"QASessionState",
|
||||
"QAHistoryEntry",
|
||||
"create_qa_toolset",
|
||||
"run_qa_core",
|
||||
"create_analysis_toolset",
|
||||
"SESSION_NAMESPACE",
|
||||
"SessionContext",
|
||||
"SessionState",
|
||||
"compute_state_delta",
|
||||
"compute_combined_state_delta",
|
||||
"create_document_toolset",
|
||||
"create_qa_toolset",
|
||||
"create_search_toolset",
|
||||
"get_session_filter",
|
||||
"prepare_context",
|
||||
]
|
||||
|
|
|
|||
Loading…
Reference in a new issue