@@ -35,7 +35,7 @@ async def generate_sql_pairs(
3535 has a "question" and a "sql" key.
3636 Example: '[{"question": "...", "sql": "..."}]'
3737 """
38- return await question_generator .generate_sql_pairs_from_schema (
38+ return await question_generator .generate_sql_pairs (
3939 db_schema , context , table_names , sql_dialect
4040 )
4141
@@ -45,20 +45,20 @@ async def generate_templates(
4545 template_inputs_json : str , sql_dialect : str = "postgresql"
4646) -> str :
4747 """
48- Generates final templates from a list of user-approved question, SQL statement, and optional intent.
48+ Generates final templates from a list of user-approved template question, template SQL statement, and optional template intent.
4949
5050 Args:
5151 template_inputs_json: A JSON string representing a list of dictionaries (template inputs),
5252 where each dictionary has "question", "sql", and optional "intent" keys.
5353 Example (with intent): '[{"question": "How many users?", "sql": "SELECT count(*) FROM users", "intent": "Count total users"}]'
5454 Example (default intent): '[{"question": "List all items", "sql": "SELECT * FROM items"}]'
5555 sql_dialect: The SQL dialect to use for parameterization. Accepted
56- values are 'postgresql', 'mysql', or 'googlesql'.
56+ values are 'postgresql' (default) , 'mysql', or 'googlesql'.
5757
5858 Returns:
5959 A JSON string representing a ContextSet object.
6060 """
61- return await template_generator .generate_templates_from_items (
61+ return await template_generator .generate_templates (
6262 template_inputs_json , sql_dialect
6363 )
6464
@@ -68,20 +68,19 @@ async def generate_facets(
6868 facet_inputs_json : str , sql_dialect : str = "postgresql"
6969) -> str :
7070 """
71- Generates final facets from a list of user-approved question, SQL snippet, and optional intent .
71+ Generates final facets from a list of user-approved facet intent and facet SQL snippet .
7272
7373 Args:
7474 facet_inputs_json: A JSON string representing a list of dictionaries (facet inputs),
75- where each dictionary has "question", "sql_snippet", and optional "intent".
76- Example (with intent): '[{"question": "expensive items", "sql_snippet": "price > 1000", "intent": "Filter by high price"}]'
77- Example (default intent): '[{"question": "active users", "sql_snippet": "status = 'active'"}]'
75+ where each dictionary has "intent" and "sql_snippet".
76+ Example: '[{"intent": "high price", "sql_snippet": "price > 1000"}]'
7877 sql_dialect: The SQL dialect to use for parameterization. Accepted
79- values are 'postgresql', 'mysql', or 'googlesql'.
78+ values are 'postgresql' (default) , 'mysql', or 'googlesql'.
8079
8180 Returns:
8281 A JSON string representing a ContextSet object.
8382 """
84- return await facet_generator .generate_facets_from_items (
83+ return await facet_generator .generate_facets (
8584 facet_inputs_json , sql_dialect
8685 )
8786
@@ -211,19 +210,19 @@ def generate_upload_url(
211210
212211@mcp .prompt
213212def generate_bulk_templates () -> str :
214- """Initiates a guided workflow to generate Question/SQL pair templates ."""
213+ """Initiates a guided workflow to automatically generate templates based on the database schema ."""
215214 return prompts .GENERATE_BULK_TEMPLATES_PROMPT
216215
217216
218217@mcp .prompt
219218def generate_targeted_templates () -> str :
220- """Initiates a guided workflow to generate specific Question/SQL pair templates ."""
219+ """Initiates a guided workflow to generate specific templates based on the user's input ."""
221220 return prompts .GENERATE_TARGETED_TEMPLATES_PROMPT
222221
223222
224223@mcp .prompt
225224def generate_targeted_facets () -> str :
226- """Initiates a guided workflow to generate specific Phrase/SQL facet pair templates ."""
225+ """Initiates a guided workflow to generate specific facets based on the user's input ."""
227226 return prompts .GENERATE_TARGETED_FACETS_PROMPT
228227
229228
0 commit comments