Spaces:
Sleeping
Sleeping
Commit
·
3a33bae
1
Parent(s):
d88ff6b
first commit
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ def create_knowledge_base(chunks, api_key=None):
|
|
59 |
|
60 |
def answer_question(question, knowledge_base, model):
|
61 |
docs = knowledge_base.similarity_search(question)
|
62 |
-
llm = model(model_name="gpt-3.5-turbo")
|
63 |
chain = load_qa_chain(llm, chain_type="stuff")
|
64 |
with get_openai_callback() as cb:
|
65 |
response = chain.run(input_documents=docs, question=question)
|
|
|
59 |
|
60 |
def answer_question(question, knowledge_base, model):
|
61 |
docs = knowledge_base.similarity_search(question)
|
62 |
+
llm = model(model_name="gpt-3.5-turbo", open_api_key=st.session_state.api_key)
|
63 |
chain = load_qa_chain(llm, chain_type="stuff")
|
64 |
with get_openai_callback() as cb:
|
65 |
response = chain.run(input_documents=docs, question=question)
|