Project: datalens
81 entity types
Matrix/Integrations/backend/app/services/text_to_sql.py
IntegrationEndpointIntegrations

backend/app/services/text_to_sql.py

The file backend/app/services/text_to_sql.py is part of the TEXT-TO-SQL Service. The TextToSQLService class is defined within backend/app/services/text_to_sql.py. The streaming responses via the /ask-stream endpoint realize the Text-to-SQL analysis query endpoint by enabling streaming of query results to avoid client timeouts. The backend service text_to_sql.py uses SQLCoder-7B as the configured default model for Text-to-SQL queries after the code change. Coolify rebuilds the backend container to deploy updated Python code including changes in text_to_sql.py. backend/app/services/text_to_sql.py implements schema compression and SQL generation with error retry for the Multi-Stage Text-to-SQL Architecture. The text to SQL service depends on the DuckDB service to execute generated SQL queries against the extracted data. The code in backend/app/services/agent_skills.py depends on backend/app/services/text_to_sql.py for SQL extraction functionality within agent workflows. Text-to-SQL Service is defined in backend/app/services/text_to_sql.py.