Spaces:
Paused
Paused
Update app.py
Browse files258 unmodified lines25926026126226326426539 unmodified lines305306307308309310311312313314258 unmodified linesretrieved_docs = search_knowledge_base(query)context = "\n".join(doc.page_content for doc in retrieved_docs)prompt = f"Context:\n{context}\n\nQuestion: {query}\nAnswer:"llm = ChatOpenAI(model="gpt-4o", temperature=0.5, api_key=openai_api_key)response = llm.invoke(prompt)return response.contentexcept Exception as e:39 unmodified linesIf query is related to trust builders or proof points , refer to knowledge base :[knowledge_base] and follow the instructions :* Generate a compelling copy based upon guidlines & objective of specific trust bucket mentioned in [{input}].* Return around 5-6 points but do not explain them much just return short facts as dot points.* Strictly Do not mention "Trust" , "Stability" , "Development" , "Relationship" , "Competence" , "benefit" , "vision" words in your response .* If {input} contains more than one trust bucket then Do not make seperate sections/headings for both the buckets .* Proof Points: Use guiding principles or objectives from the knowledge base to support your points . Add sub-points everytime* Strictly be specific with names, dates, locations, numbers, Dollars , currency , figures etc. in proof points .Proof points should contain as much amount figures,dollars as possible .* With every proof point , always return source link of that information in bracket with every point.* Trust Statements/TrustBuilders: Use these terms interchangeably in place of "proof points" throughout your response. Do not overuse one term.258 unmodified lines25926026126226326426539 unmodified lines305306307308309310311312313314258 unmodified linesretrieved_docs = search_knowledge_base(query)context = "\n".join(doc.page_content for doc in retrieved_docs)prompt = f"Context:\n{context}\n\nQuestion: {query}\nAnswer:"llm = ChatOpenAI(model="gpt-4o", temperature=0.4, api_key=openai_api_key)response = llm.invoke(prompt)return response.contentexcept Exception as e:39 unmodified linesIf query is related to trust builders or proof points , refer to knowledge base :[knowledge_base] and follow the instructions :* Generate a compelling copy based upon guidlines & objective of specific trust bucket mentioned in [{input}].* Return around 5-6 points but do not explain ,just return short facts as dot points.* Strictly Do not mention "Trust" , "Stability" , "Development" , "Relationship" , "Competence" , "benefit" , "vision" words in your response .* If {input} contains more than one trust bucket then Do not make seperate sections/headings for both the buckets .* Proof Points: Use guiding principles or objectives from the knowledge base to support short facts and dot points. Add sub-points everytime .* Strictly be specific with names, dates, locations, numbers, Dollars , currency , figures etc. in proof points .Proof points should contain as much amount figures,dollars as possible .* With every proof point , always return source link of that information in bracket with every point.* Trust Statements/TrustBuilders: Use these terms interchangeably in place of "proof points" throughout your response. Do not overuse one term.
app.py+3-3