service_context = ServiceContext.from_defaults( llm_predictor=LLMPredictor(llm=OpenAI(model_name='text-davinci-003', temperature=0, openai_api_key='keyhere')) )
const openaiLLM = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0, apiKey: 'your_api_key' }); const serviceContext = serviceContextFromDefaults({ llm: openaiLLM });
const openaiLLM = new OpenAI({ model: "gpt-3.5-turbo", temperature: 0, apiKey: 'your_api_key' }); const serviceContext = serviceContextFromDefaults({ llm: openaiLLM }); const index = await VectorStoreIndex.fromDocuments([document], { serviceContext });