query_lens 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/services/query_lens/sql_generator.rb +3 -2
- data/app/views/query_lens/queries/show.html.erb +1 -1
- data/lib/query_lens/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8483ac3f8d86dbaa16242e87fec870d20161b25ccb1e68c6781c77f5043475fb
|
|
4
|
+
data.tar.gz: 0f36bbc48b10e5b9fa933d4b57bd05c846947f67dfc906fbc1e06e09e6152c95
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 45eb9530141266e8de24ee0f6fa437e62eb48887f0d9603ad20451046e860f533697ceab831a474200143b1f6ca103b033fbc95080e527e5cb6e9be0cad46ec3
|
|
7
|
+
data.tar.gz: 1375571e833d3244d091c4b16b70a363c58289a5b522290679b936bcc376befbbe81363a70092399f56c3e23a8a29befe1755058e63101e0e8f9563fea4ebac5
|
data/README.md
CHANGED
|
@@ -4,9 +4,9 @@ A mountable Rails engine that lets users write natural language questions and ge
|
|
|
4
4
|
|
|
5
5
|
Powered by [RubyLLM](https://rubyllm.com), QueryLens works with any major AI provider: OpenAI, Anthropic (Claude), Google Gemini, DeepSeek, Mistral, Ollama (local models), and more.
|
|
6
6
|
|
|
7
|
-
[
|
|
7
|
+

|
|
8
8
|
|
|
9
|
-
[
|
|
9
|
+
[Watch the demo (90 seconds)](https://www.loom.com/share/595ed0ea3c1f42b28152a345db586c85)
|
|
10
10
|
|
|
11
11
|
**Want to try it without touching your own database?** The [QueryLens Testbed](https://github.com/bryanbeshore/query_lens_testbed) is a ready-to-go Rails app with sample data — clone, run, and start querying in under 2 minutes.
|
|
12
12
|
|
|
@@ -14,8 +14,9 @@ module QueryLens
|
|
|
14
14
|
- Always include an ORDER BY clause when it makes sense (e.g., by date descending, by amount descending).
|
|
15
15
|
|
|
16
16
|
RESPONSE FORMAT:
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
- When the user asks for data or wants a new/modified query: respond with a brief explanation (1-2 sentences), then the SQL query wrapped in ```sql code fences.
|
|
18
|
+
- When the user asks about the results, asks what a column means, wants clarification, or is discussing the data: respond conversationally WITHOUT SQL code fences. The existing query and results will remain visible.
|
|
19
|
+
- Only include ```sql code fences when you are providing a new or modified query.
|
|
19
20
|
|
|
20
21
|
DATABASE SCHEMA:
|
|
21
22
|
%{schema}
|
|
@@ -253,9 +253,9 @@
|
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
if (data.explanation) addMessage('ai', data.explanation, genTime);
|
|
256
|
+
conversation.push({ role: 'assistant', content: data.raw || data.explanation });
|
|
256
257
|
if (data.sql) {
|
|
257
258
|
el.sql.value = data.sql;
|
|
258
|
-
conversation.push({ role: 'assistant', content: data.raw || data.explanation });
|
|
259
259
|
await runQueryWithTrace(trace);
|
|
260
260
|
} else {
|
|
261
261
|
addTrace(trace);
|
data/lib/query_lens/version.rb
CHANGED