Query Completion
Generate completion using relevant chunks as context.
When graph_name is provided, the query will leverage the knowledge graph to enhance retrieval by finding relevant entities and their connected documents.
Args: request: CompletionQueryRequest containing: - query: Query text - filters: Optional metadata filters - k: Number of chunks to use as context (default: 4) - min_score: Minimum similarity threshold (default: 0.0) - max_tokens: Maximum tokens in completion - temperature: Model temperature - use_reranking: Whether to use reranking - use_colpali: Whether to use ColPali-style embedding model - graph_name: Optional name of the graph to use for knowledge graph-enhanced retrieval - hop_depth: Number of relationship hops to traverse in the graph (1-3) - include_paths: Whether to include relationship paths in the response - prompt_overrides: Optional customizations for entity extraction, resolution, and query prompts - folder_name: Optional folder to scope the operation to - end_user_id: Optional end-user ID to scope the operation to - schema: Optional schema for structured output - chat_id: Optional chat conversation identifier for maintaining history auth: Authentication context
Returns: CompletionResponse: Generated text completion or structured output
Headers
Request body
Response
Successful Response