Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1102,7 +1102,7 @@ def rag_response(query):
|
|
| 1102 |
|
| 1103 |
# Generate AI response with the retrieved context
|
| 1104 |
prompt = f"Context:\n{context}\n\nQuestion: {query}\nAnswer:"
|
| 1105 |
-
llm = ChatOpenAI(model="gpt-
|
| 1106 |
response = llm.invoke(prompt)
|
| 1107 |
|
| 1108 |
return response.content
|
|
@@ -2007,7 +2007,7 @@ def handle_prompt(prompt):
|
|
| 2007 |
cleaned_text = ""
|
| 2008 |
base_instructions = (
|
| 2009 |
"Strictly Avoid flowery language, typical AI phrases and jargons. "
|
| 2010 |
-
"
|
| 2011 |
"Strictly dont use trustbucket names in copy headings and content avoid it"
|
| 2012 |
)
|
| 2013 |
|
|
|
|
| 1102 |
|
| 1103 |
# Generate AI response with the retrieved context
|
| 1104 |
prompt = f"Context:\n{context}\n\nQuestion: {query}\nAnswer:"
|
| 1105 |
+
llm = ChatOpenAI(model="gpt-4o", temperature=0.5, api_key=openai_api_key)
|
| 1106 |
response = llm.invoke(prompt)
|
| 1107 |
|
| 1108 |
return response.content
|
|
|
|
| 2007 |
cleaned_text = ""
|
| 2008 |
base_instructions = (
|
| 2009 |
"Strictly Avoid flowery language, typical AI phrases and jargons. "
|
| 2010 |
+
"When asked for top trust drivers,buckets,builders search in knowledgebase and search when asked to use google to give sources.*Be specific with $ amounts awards, people and programs."
|
| 2011 |
"Strictly dont use trustbucket names in copy headings and content avoid it"
|
| 2012 |
)
|
| 2013 |
|