Spaces:
Runtime error
Runtime error
Update app.py
Browse files124 unmodified lines125126127128129130131179 unmodified lines311312313314315316317113 unmodified lines431432433434435436437116 unmodified lines554555556557558559560124 unmodified linesdef load_chatbot():#return load_qa_chain(llm=OpenAI(), chain_type="stuff")return load_qa_chain(llm=OpenAI(model_name="gpt-3.5-turbo-instruct"), chain_type="stuff")def display_chat_history(chat_history):179 unmodified lines# Include the spinner around all processing and display operationswith st.spinner('Eve denkt über Ihre Frage nach...'):chain = load_chatbot()docs = VectorStore.similarity_search(query=query, k=10)with get_openai_callback() as cb:response = chain.run(input_documents=docs, question=full_query)response = handle_no_answer(response)113 unmodified lineswith st.spinner('Eve denkt über Ihre Frage nach...'):chain = load_chatbot()docs = VectorStore.similarity_search(query=query, k=10)with get_openai_callback() as cb:response = chain.run(input_documents=docs, question=full_query)response = handle_no_answer(response) # Process the response through the new function116 unmodified lineswith st.spinner('Eve denkt über Ihre Frage nach...'):chain = load_chatbot()docs = VectorStore.similarity_search(query=query, k=10)with get_openai_callback() as cb:response = chain.run(input_documents=docs, question=full_query)response = handle_no_answer(response) # Process the response through the new function124 unmodified lines125126127128129130131179 unmodified lines311312313314315316317113 unmodified lines431432433434435436437116 unmodified lines554555556557558559560124 unmodified linesdef load_chatbot():#return load_qa_chain(llm=OpenAI(), chain_type="stuff")return load_qa_chain(llm=OpenAI(model_name="gpt-3.5-turbo-1106"), chain_type="stuff")def display_chat_history(chat_history):179 unmodified lines# Include the spinner around all processing and display operationswith st.spinner('Eve denkt über Ihre Frage nach...'):chain = load_chatbot()docs = VectorStore.similarity_search(query=query, k=5)with get_openai_callback() as cb:response = chain.run(input_documents=docs, question=full_query)response = handle_no_answer(response)113 unmodified lineswith st.spinner('Eve denkt über Ihre Frage nach...'):chain = load_chatbot()docs = VectorStore.similarity_search(query=query, k=5)with get_openai_callback() as cb:response = chain.run(input_documents=docs, question=full_query)response = handle_no_answer(response) # Process the response through the new function116 unmodified lineswith st.spinner('Eve denkt über Ihre Frage nach...'):chain = load_chatbot()docs = VectorStore.similarity_search(query=query, k=5)with get_openai_callback() as cb:response = chain.run(input_documents=docs, question=full_query)response = handle_no_answer(response) # Process the response through the new function
app.py+4-4