Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions server/src/handlers/http/llm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ fn build_prompt(stream: &str, prompt: &str, schema_json: &str) -> String {
format!(
r#"I have a table called {}.
It has the columns:\n{}
Based on this, generate valid SQL for the query: "{}"
Generate only SQL as output. Also add comments in SQL syntax to explain your actions.
Don't output anything else.
If it is not possible to generate valid SQL, output an SQL comment saying so."#,
Based on this schema, generate valid SQL for the query: "{}"
Generate only simple SQL as output. Also add comments in SQL syntax to explain your actions. Don't output anything else. If it is not possible to generate valid SQL, output an SQL comment saying so."#,
stream, schema_json, prompt
)
}
Expand All @@ -84,7 +82,7 @@ fn build_request_body(ai_prompt: String) -> impl serde::Serialize {
json!({
"model": "gpt-3.5-turbo",
"messages": [{ "role": "user", "content": ai_prompt}],
"temperature": 0.6,
"temperature": 0.7,
})
}

Expand Down