Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1105,6 +1105,7 @@ def rag_response(query):
|
|
| 1105 |
prompt = f"""
|
| 1106 |
Context:
|
| 1107 |
{context}
|
|
|
|
| 1108 |
|
| 1109 |
1. Use only the provided context to generate your answer.
|
| 1110 |
2. Match headings and content exactly as they appear in the knowledge base. Do not add, modify, or generalize content.
|
|
@@ -1116,7 +1117,7 @@ def rag_response(query):
|
|
| 1116 |
|
| 1117 |
Answer:
|
| 1118 |
"""
|
| 1119 |
-
llm = ChatOpenAI(model="gpt-
|
| 1120 |
response = llm.invoke(prompt)
|
| 1121 |
|
| 1122 |
return response.content.strip()
|
|
|
|
| 1105 |
prompt = f"""
|
| 1106 |
Context:
|
| 1107 |
{context}
|
| 1108 |
+
You are an expert assistant tasked with providing precise and accurate answers based only on the provided context.
|
| 1109 |
|
| 1110 |
1. Use only the provided context to generate your answer.
|
| 1111 |
2. Match headings and content exactly as they appear in the knowledge base. Do not add, modify, or generalize content.
|
|
|
|
| 1117 |
|
| 1118 |
Answer:
|
| 1119 |
"""
|
| 1120 |
+
llm = ChatOpenAI(model="gpt-4-32k", temperature=0.2, api_key=openai_api_key)
|
| 1121 |
response = llm.invoke(prompt)
|
| 1122 |
|
| 1123 |
return response.content.strip()
|