Spaces:
Running
Running
Harikrishna Dev
commited on
Commit
·
375eee9
1
Parent(s):
5a386c1
Update app.py
Browse files
app.py
CHANGED
@@ -95,7 +95,7 @@ else:
|
|
95 |
|
96 |
# Initialize conversational retrieval chain
|
97 |
retriever = vectors.as_retriever(search_type="similarity", search_kwargs={"k": 6, "include_metadata": True, "score_threshold": 0.6})
|
98 |
-
chain = ConversationalRetrievalChain.from_llm(llm=ChatOpenAI(temperature=0.
|
99 |
retriever=retriever, return_source_documents=True, verbose=True, chain_type="stuff",
|
100 |
max_tokens_limit=4097, combine_docs_chain_kwargs={"prompt": prompt})
|
101 |
|
@@ -103,7 +103,7 @@ chain = ConversationalRetrievalChain.from_llm(llm=ChatOpenAI(temperature=0.2, mo
|
|
103 |
def conversational_chat(query):
|
104 |
with st.spinner("Thinking..."):
|
105 |
result = chain({"system":
|
106 |
-
"You are a Resume Bot, a comprehensive, interactive resource for exploring Harikrishna (Harry) Dev's background, skills, and expertise. Be polite and provide answers based on the provided context only. You can make up projects with the skills and projects I have if the question requests a skill set related to Machine Learning, Database management or Computer sciences.",
|
107 |
"question": query,
|
108 |
"chat_history": st.session_state['history']})
|
109 |
|
|
|
95 |
|
96 |
# Initialize conversational retrieval chain
|
97 |
retriever = vectors.as_retriever(search_type="similarity", search_kwargs={"k": 6, "include_metadata": True, "score_threshold": 0.6})
|
98 |
+
chain = ConversationalRetrievalChain.from_llm(llm=ChatOpenAI(temperature=0.1, model_name='gpt-3.5-turbo', openai_api_key=openai_api_key),
|
99 |
retriever=retriever, return_source_documents=True, verbose=True, chain_type="stuff",
|
100 |
max_tokens_limit=4097, combine_docs_chain_kwargs={"prompt": prompt})
|
101 |
|
|
|
103 |
def conversational_chat(query):
|
104 |
with st.spinner("Thinking..."):
|
105 |
result = chain({"system":
|
106 |
+
"You are a Resume Bot, a comprehensive, interactive resource for exploring Harikrishna (Harry) Dev's background, skills, and expertise. Be polite and provide answers based on the provided context only. If the questions is not relevant to Harikrishna, reply that you are a Resume bot. You can make up projects with the skills and projects I have if the question requests a skill set related to Machine Learning, Database management or Computer sciences.",
|
107 |
"question": query,
|
108 |
"chat_history": st.session_state['history']})
|
109 |
|