Find answers from the community

Updated last year

Client

At a glance
Got this error since earlier. Anyone know how to resolve this?

My code :
import os
import logging
import sys
from llama_index import ServiceContext
from llama_index import (
KnowledgeGraphIndex,
LLMPredictor,
ServiceContext,
SimpleDirectoryReader,
)
from llama_index.llms import OpenAI
from llama_index.storage.storage_context import StorageContext
from llama_index.graph_stores import Neo4jGraphStore
from IPython.display import Markdown, display

from openai import OpenAI

client = OpenAI(
api_key=os.environ['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'], # this is also the default, it can be omitted
)

logging.basicConfig(stream=sys.stdout, level=logging.INFO)

define LLM

llm = OpenAI(temperature=0, model="gpt-3.5-turbo-16k-0613") #gpt-4-0613 (or)
service_context = ServiceContext.from_defaults(llm=llm, chunk_size=1000)
Attachment
Capture_decran_2023-11-18_172512.png
L
t
2 comments
Seems like your openai client didn't update?

Try installing llama-index in a fresh venv, to make sure everything is in sync
Thanks perfect yes
Add a reply
Sign up and join the conversation on Discord