{"context_str_format":{"description":"context_str must be a JSON array of conversation messages","empty_conversation":"Use empty string \"\" for the first query with no history","example":"[{\"role\": \"user\", \"content\": \"What is brensocatib?\"}, {\"role\": \"assistant\", \"content\": \"Brensocatib is a drug...\"}]","required_structure":"[{\"role\": \"user\", \"content\": \"...\"}, {\"role\": \"assistant\", \"content\": \"...\"}]","role_values":["user","assistant"]},"endpoints":{"GET /":"This information","GET /health":"Health check","POST /query":"Submit a research query (stateless)","POST /query-stream":"Submit a streaming research query (stateless)","POST /query-stream-with-context":"Submit a streaming research query with context management and summarization","POST /query-with-context":"Submit a research query with context management and summarization"},"features":{"context_management":"The /query-with-context endpoint manages conversation history with automatic summarization","token_threshold":"4000 tokens - context is automatically summarized when this limit is exceeded"},"response_formats":{"query_endpoint":{"action_input":"The SQL query or action input used","answer":"The clean answer extracted from the response","detailed_sources":{"compsit":"Curated competitive situation insights and implications.","consensus":"Consensus forecast data on sales/revenue.","keycat":"Key catalysts data for drugs and companies.","patprescriber":"Reported data on number of patient and prescribers for drugs.","sales":"Reported Sales data for drugs.","structured":"Detailed SQL query information including tables_used, sql_query, and status","unstructured":"Detailed RAG response including citation_chunks, final_citations, chunks, and retrieval_method"},"query":"The original query","status":"success/error/timeout"},"query_with_context_endpoint":{"action_input":"The SQL query or action input used","answer":"The clean answer extracted from the response","context_str":"Updated conversation context as JSON array (automatically summarized while maintaining JSON format if exceeds 4000 tokens)","detailed_sources":{"compsit":"Curated competitive situation insights and implications.","consensus":"Consensus forecast data on sales/revenue.","keycat":"Key catalysts data for drugs and companies.","patprescriber":"Reported data on number of patient and prescribers for drugs.","sales":"Reported Sales data for drugs.","structured":"Detailed SQL query information","unstructured":"Detailed RAG response"},"query":"The original query","status":"success/error/timeout"}},"service":"Intellia BI - Pharmaceutical Research Assistant","usage":{"query":"Send a POST request to /query with JSON body: {\"query\": \"your question here\"}","query_stream":"Send a POST request to /query-stream with JSON body: {\"query\": \"your question here\"}","query_stream_with_context":"Send a POST request to /query-stream-with-context with JSON body: {\"query\": \"your question\",  \"context_str\": \"JSON array of conversation history or empty string\"}","query_with_context":"Send a POST request to /query-with-context with JSON body: {\"query\": \"your question\",  \"context_str\": \"JSON array of conversation history or empty string\"}"}}
