Spaces:
Runtime error
Runtime error
added llm object
Browse files
app.py
CHANGED
@@ -34,12 +34,14 @@ document_content_description = "Excerpt's from Reid Hoffman's book Impromptu"
|
|
34 |
embeddings = OpenAIEmbeddings()
|
35 |
|
36 |
pinecone.init(
|
37 |
-
|
38 |
-
|
|
|
39 |
index_name = str(os.environ['PINECONE_INDEX_NAME'])
|
40 |
|
41 |
def load_chain():
|
42 |
docsearch = Pinecone.from_existing_index(index_name, embeddings)
|
|
|
43 |
retriever = SelfQueryRetriever.from_llm(
|
44 |
llm,
|
45 |
vectorstore,
|
|
|
34 |
embeddings = OpenAIEmbeddings()
|
35 |
|
36 |
pinecone.init(
|
37 |
+
api_key=str(os.environ['PINECONE_API_KEY']),
|
38 |
+
environment=str(os.environ['PINECONE_ENV']))
|
39 |
+
|
40 |
index_name = str(os.environ['PINECONE_INDEX_NAME'])
|
41 |
|
42 |
def load_chain():
|
43 |
docsearch = Pinecone.from_existing_index(index_name, embeddings)
|
44 |
+
llm = OpenAI(temperature=0)
|
45 |
retriever = SelfQueryRetriever.from_llm(
|
46 |
llm,
|
47 |
vectorstore,
|