Changed it to this and same error
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))