generation package

generate_response

This is generate_response.py file

async generation.generate_response.generate_query_response(original_query, user_name, context_chunks, rephrased_query)[source]

Generate final response for a rephrased user query with the retrieved chunks.

async generation.generate_response.setup_prompt(user_name, context_chunks, rephrased_query)[source]

Setup generation response prompt for a rephrased user query with retrieved chunks. Note : The actual function call is, async def setup_prompt(user_name, context_chunks, rephrased_query, system_prompt=Config.GENERATION_PROMPT#):

utils

generation.utils.insert_generation_data(generation_data_logs: dict, message_id: str | None = None)[source]

Save the generation metric logs associated with a specific message.