Find answers from the community

Updated 3 months ago

Azure

how to solve this erro Must provide an 'engine' or 'deployment_id' parameter to create a <class 'openai.api_resources.chat_completion.ChatCompletion'>

im getting this error , what is wrong with my code , i persist and now i get load

graph_store = Neo4jGraphStore(
username=username,
password=password,
url=url,
database=database,
)

storage_context = StorageContext.from_defaults(graph_store=graph_store)

index = KnowledgeGraphIndex.from_documents(
documents,
storage_context=storage_context,
max_triplets_per_chunk=10,
service_context=servicecontext,
include_embeddings=True,
)

index.storage_context.persist('testSorage')
from llama_index.storage.docstore import SimpleDocumentStore
from llama_index.vector_stores import SimpleVectorStore
from llama_index.storage.index_store import SimpleIndexStore
storage_context = StorageContext.from_defaults(
docstore=SimpleDocumentStore.from_persist_dir(persist_dir="./testSorage/"),
vector_store=SimpleVectorStore.from_persist_dir(persist_dir="./testSorage/"),
index_store=SimpleIndexStore.from_persist_dir(persist_dir="./testSorage/"),
)
from llama_index import load_index_from_storage
graph = load_index_from_storage(storage_context)
gb=graph.as_query_engine()
gb.query("how much is this")
Add a reply
Sign up and join the conversation on Discord