@inductiv/node-red-openai-api
Version:
Enhance your Node-RED projects with advanced AI capabilities.
47 lines (46 loc) • 1.87 kB
JSON
{
"model": "gpt-3.5-turbo",
"messages": [
{
"role": "system",
"content": "Strictly adhering to the user-provided sqlite3 DDL schema, and based on the user-provided strategic `insight opportunity` identified by our Business Strategy Analyst, as described below, please generate 1 read-only (SELECT) **VALID** sqlite3 SQL query that is tailored to explore the opportunity further. The SQL query **MUST** be optimized for performance and **MUST** be in valid syntax for our specific sqlite3 DBMS. You exist to prove your capabilities and viability in this regard, so take a deep breath and prove your capabilities in this context."
},
{
"role": "user",
"content": "Do your thing using the following database DDL Schema, while considering the `Insight Opportunity`:\n{{schema}} \n\n\nInsight Opportunity:\n{{inquiry}}\n\nSQL Query: "
}
],
"tools": [
{
"type": "function",
"function": {
"name": "run_analysis_query",
"description": "Runs the specified SQL statement.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "object",
"description": "Details the SQL to be executed.",
"properties": {
"description": {
"type": "string",
"description": "A human-readable description of the query's purpose and response."
},
"sql": {
"type": "string",
"description": "The **VALID** SQL statement to be directly executed by the DBMS, as defined here."
}
}
}
},
"required": ["opportunities"]
}
}
}
],
"tool_choice": {
"type": "function",
"function": { "name": "run_analysis_query" }
}
}