refactor(backend): Update references from document summary LLM to agent LLM across multiple files

This commit is contained in:
Anish Sarkar 2026-06-04 01:50:44 +05:30
parent ddfe60c2f0
commit e4d7b01b09
9 changed files with 10 additions and 12 deletions

View file

@ -546,7 +546,7 @@ def create_generate_report_tool(
Factory function to create the generate_report tool with injected dependencies. Factory function to create the generate_report tool with injected dependencies.
The tool generates a Markdown report inline using the search space's The tool generates a Markdown report inline using the search space's
document summary LLM, saves it to the database, and returns immediately. agent LLM, saves it to the database, and returns immediately.
Uses short-lived database sessions for each DB operation so no connection Uses short-lived database sessions for each DB operation so no connection
is held during the long LLM API call. is held during the long LLM API call.

View file

@ -565,7 +565,7 @@ def create_generate_report_tool(
Factory function to create the generate_report tool with injected dependencies. Factory function to create the generate_report tool with injected dependencies.
The tool generates a Markdown report inline using the search space's The tool generates a Markdown report inline using the search space's
document summary LLM, saves it to the database, and returns immediately. agent LLM, saves it to the database, and returns immediately.
Uses short-lived database sessions for each DB operation so no connection Uses short-lived database sessions for each DB operation so no connection
is held during the long LLM API call. is held during the long LLM API call.

View file

@ -31,12 +31,10 @@ async def create_podcast_transcript(
search_space_id = configuration.search_space_id search_space_id = configuration.search_space_id
user_prompt = configuration.user_prompt user_prompt = configuration.user_prompt
# Get search space's document summary LLM # Use the search space's agent LLM for podcast transcript generation.
llm = await get_agent_llm(state.db_session, search_space_id) llm = await get_agent_llm(state.db_session, search_space_id)
if not llm: if not llm:
error_message = ( error_message = f"No agent LLM configured for search space {search_space_id}"
f"No document summary LLM configured for search space {search_space_id}"
)
print(error_message) print(error_message)
raise RuntimeError(error_message) raise RuntimeError(error_message)

View file

@ -103,7 +103,7 @@ def init_worker(**kwargs):
"""Initialize the LLM Router and Image Gen Router when a Celery worker process starts. """Initialize the LLM Router and Image Gen Router when a Celery worker process starts.
This ensures the Auto mode (LiteLLM Router) is available for background tasks This ensures the Auto mode (LiteLLM Router) is available for background tasks
like document summarization and image generation. like agent workflows and image generation.
""" """
from app.observability.bootstrap import init_otel from app.observability.bootstrap import init_otel

View file

@ -2963,7 +2963,7 @@ async def shielded_async_session():
async def setup_indexes(): async def setup_indexes():
async with engine.begin() as conn: async with engine.begin() as conn:
# Create indexes # Create indexes
# Document Summary Indexes # Document embedding indexes
await conn.execute( await conn.execute(
text( text(
"CREATE INDEX IF NOT EXISTS document_vector_index ON documents USING hnsw (embedding public.vector_cosine_ops)" "CREATE INDEX IF NOT EXISTS document_vector_index ON documents USING hnsw (embedding public.vector_cosine_ops)"

View file

@ -2,7 +2,7 @@
Google Calendar connector indexer. Google Calendar connector indexer.
Uses the shared IndexingPipelineService for document deduplication, Uses the shared IndexingPipelineService for document deduplication,
summarization, chunking, and embedding. chunking, and embedding.
""" """
from collections.abc import Awaitable, Callable from collections.abc import Awaitable, Callable

View file

@ -2,7 +2,7 @@
Google Gmail connector indexer. Google Gmail connector indexer.
Uses the shared IndexingPipelineService for document deduplication, Uses the shared IndexingPipelineService for document deduplication,
summarization, chunking, and embedding. chunking, and embedding.
""" """
from collections.abc import Awaitable, Callable from collections.abc import Awaitable, Callable

View file

@ -2,7 +2,7 @@
Linear connector indexer. Linear connector indexer.
Uses the shared IndexingPipelineService for document deduplication, Uses the shared IndexingPipelineService for document deduplication,
summarization, chunking, and embedding with bounded parallel indexing. chunking, and embedding with bounded parallel indexing.
""" """
from collections.abc import Awaitable, Callable from collections.abc import Awaitable, Callable

View file

@ -2,7 +2,7 @@
Notion connector indexer. Notion connector indexer.
Uses the shared IndexingPipelineService for document deduplication, Uses the shared IndexingPipelineService for document deduplication,
summarization, chunking, and embedding with bounded parallel indexing. chunking, and embedding with bounded parallel indexing.
""" """
from collections.abc import Awaitable, Callable from collections.abc import Awaitable, Callable