diff --git a/semantic_serach_streamlit/qa.py b/semantic_serach_streamlit/qa.py index 0827ba4..4a6bdb3 100644 --- a/semantic_serach_streamlit/qa.py +++ b/semantic_serach_streamlit/qa.py @@ -1,5 +1,5 @@ import openai -openai.api_key="api key" +openai.api_key="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" def create_prompt(context,query): header = "Answer the question as truthfully as possible using the provided context, and if the answer is not contained within the text and requires some latest information to be updated, print 'Sorry Not Sufficient context to answer query' \n" return header + context + "\n\n" + query + "\n" @@ -15,4 +15,4 @@ def generate_answer(prompt): presence_penalty=0, stop = [' END'] ) - return (response.choices[0].text).strip() \ No newline at end of file + return (response.choices[0].text).strip()