Find answers from the community

Home
Members
᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼
᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼᲼
Offline, last seen 3 months ago
Joined September 25, 2024
Why when i do this
storage_context = StorageContext.from_defaults(
docstore=SimpleDocumentStore.from_persist_dir(persist_dir=persist_dir),
vector_store=SimpleVectorStore.from_persist_dir(persist_dir=persist_dir),
index_store=SimpleIndexStore.from_persist_dir(persist_dir=persistdir),)It tells me it cant find the docstore.json file ? Im trying to create it --
4 comments
L
Changed it to this and same error
Plain Text
embed_model = LangchainEmbedding(HuggingFaceEmbeddings())
llm_predictor = LLMPredictor(llm=ChatOpenAI(temperature=0.7, model_name="text-curie-001"))
service_context = ServiceContext.from_defaults(embed_model=embed_model, llm_predictor=llm_predictor)
index = GPTSimpleVectorIndex.from_documents(documents, service_context=service_context)
index.save_to_disk('index.json')
index = GPTSimpleVectorIndex.load_from_disk('index.json')
response = index.query("How do i get kudos ?", similarity_top_k=5, mode='embedding', service_context=service_context, optimizer=SentenceEmbeddingOptimizer(percentile_cutoff=0.5))
11 comments
L
y
Tbh maybe just make this right part span the whole remaining width ? Gonna look into that
8 comments
L