2024-01-02 20:32:16 +00:00
|
|
|
from langchain_community.embeddings import OpenAIEmbeddings
|
2024-02-22 16:24:08 +00:00
|
|
|
from langchain_pinecone import PineconeVectorStore
|
2023-10-26 01:47:42 +00:00
|
|
|
|
|
|
|
all_documents = {
|
|
|
|
"doc1": "Climate change and economic impact.",
|
|
|
|
"doc2": "Public health concerns due to climate change.",
|
|
|
|
"doc3": "Climate change: A social perspective.",
|
|
|
|
"doc4": "Technological solutions to climate change.",
|
|
|
|
"doc5": "Policy changes needed to combat climate change.",
|
|
|
|
"doc6": "Climate change and its impact on biodiversity.",
|
|
|
|
"doc7": "Climate change: The science and models.",
|
|
|
|
"doc8": "Global warming: A subset of climate change.",
|
|
|
|
"doc9": "How climate change affects daily weather.",
|
2023-10-27 02:44:30 +00:00
|
|
|
"doc10": "The history of climate change activism.",
|
2023-10-26 01:47:42 +00:00
|
|
|
}
|
|
|
|
|
2024-02-22 16:24:08 +00:00
|
|
|
PineconeVectorStore.from_texts(
|
2023-10-27 02:44:30 +00:00
|
|
|
list(all_documents.values()), OpenAIEmbeddings(), index_name="rag-fusion"
|
|
|
|
)
|