feat: pass openai api key
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ class MdnaQA:
|
|
41 |
def __init__(self, llm, docs):
|
42 |
self.docs = docs
|
43 |
self.chain = load_qa_chain(llm, chain_type="stuff")
|
44 |
-
embeddings = OpenAIEmbeddings()
|
45 |
self.docsearch = Chroma.from_documents(docs, embeddings)
|
46 |
|
47 |
def ask(self, question):
|
|
|
41 |
def __init__(self, llm, docs):
|
42 |
self.docs = docs
|
43 |
self.chain = load_qa_chain(llm, chain_type="stuff")
|
44 |
+
embeddings = OpenAIEmbeddings(openai_api_key=llm.openai_api_key)
|
45 |
self.docsearch = Chroma.from_documents(docs, embeddings)
|
46 |
|
47 |
def ask(self, question):
|