Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,14 +41,14 @@ MODEL_NAME = "gpt-3.5-turbo"
|
|
| 41 |
|
| 42 |
|
| 43 |
@st.cache
|
| 44 |
-
def ask_model(
|
| 45 |
"""This is the call to the OpenAI API. It creates a prompt from the document
|
| 46 |
and question and returns the endpoint's response."""
|
| 47 |
|
| 48 |
messages = BASE_CHAT_MESSAGES + [
|
| 49 |
{
|
| 50 |
"role": "user",
|
| 51 |
-
"content": f"Example SQL Query: {
|
| 52 |
}
|
| 53 |
]
|
| 54 |
|
|
|
|
| 41 |
|
| 42 |
|
| 43 |
@st.cache
|
| 44 |
+
def ask_model(query):
|
| 45 |
"""This is the call to the OpenAI API. It creates a prompt from the document
|
| 46 |
and question and returns the endpoint's response."""
|
| 47 |
|
| 48 |
messages = BASE_CHAT_MESSAGES + [
|
| 49 |
{
|
| 50 |
"role": "user",
|
| 51 |
+
"content": f"Example SQL Query: {query.strip()}\n\n",
|
| 52 |
}
|
| 53 |
]
|
| 54 |
|