mirror of
https://github.com/discourse/discourse.git
synced 2026-08-14 13:58:53 +08:00
Previously, Data Explorer AI query generation used structured output for the final query payload, which conflicted with tool usage and could return SQL that had not been validated. This commit gets the required `name`, `description`, and `sql` through a final `submit_query` tool, requiring the exact SQL to pass `run_sql` before it is returned. It also gives `run_sql` representative values for declared params, including `current_user_id`, and returns a targeted error when SQL uses params that were not declared in a `-- [params]` block.
66 lines
2.5 KiB
YAML
Vendored
66 lines
2.5 KiB
YAML
Vendored
en:
|
|
site_settings:
|
|
data_explorer_enabled: "Enable data explorer"
|
|
data_explorer_ai_queries_enabled: "Enable AI query generation in Data Explorer"
|
|
discourse_ai:
|
|
ai_bot:
|
|
agents:
|
|
ai_query_generator:
|
|
name: "Data Explorer Query Generator"
|
|
description: "Generates SQL queries for Data Explorer from natural language"
|
|
tool_help:
|
|
run_sql: "Runs a SQL query and returns results"
|
|
submit_query: "Submits the final generated query"
|
|
tool_summary:
|
|
run_sql: "Running SQL query"
|
|
submit_query: "Submitting generated query"
|
|
tool_description:
|
|
run_sql: "Ran SQL query"
|
|
submit_query: "Submitted generated query %{name}"
|
|
discourse_data_explorer:
|
|
ai:
|
|
error_agent_not_configured: "AI agent is not configured. Please check the AI features settings."
|
|
error_no_sql_returned: "AI did not return a valid SQL query. Please try again or write the query manually."
|
|
errors:
|
|
tool_not_allowed: "You are not allowed to use this tool"
|
|
discourse_workflows:
|
|
sql_action:
|
|
no_query_selected: "No query selected."
|
|
no_sql_provided: "No SQL query provided."
|
|
discourse_automation:
|
|
scriptables:
|
|
recurring_data_explorer_result_pm:
|
|
title: Schedule a PM with Data Explorer results
|
|
description: Get scheduled reports sent to your messages
|
|
no_csv_allowed: "When using `attach_csv` field, `csv` must be added to the list of authorized extensions in the site settings."
|
|
recurring_data_explorer_result_topic:
|
|
title: Schedule a post in a topic with Data Explorer results
|
|
description: Get scheduled reports posted to a specific topic
|
|
data_explorer:
|
|
admin_dashboard_label: "Data Explorer"
|
|
report_generator:
|
|
private_message:
|
|
title: "Scheduled report for %{query_name}"
|
|
body: |
|
|
Hi %{recipient_name}, your Data Explorer report is ready.
|
|
|
|
Query name:
|
|
%{query_name}
|
|
|
|
Here are the results:
|
|
%{table}
|
|
|
|
<a href='%{base_url}/admin/plugins/discourse-data-explorer/queries/%{query_id}'>View query in Data Explorer</a>
|
|
|
|
Report created at %{created_at} (%{timezone})
|
|
post:
|
|
body: |
|
|
### Scheduled report for %{query_name}
|
|
|
|
Here are the results:
|
|
%{table}
|
|
|
|
<a href='%{base_url}/admin/plugins/discourse-data-explorer/queries/%{query_id}'>View query in Data Explorer</a>
|
|
|
|
Report created at %{created_at} (%{timezone})
|
|
upload_appendix: "Appendix: [%{filename}|attachment](%{short_url})"
|