Find answers from the community

Updated 3 months ago

Hello.

Hello.
we have developed an app using llama_index and it is in production. Now we have seen an error in production that says
The model text-divinchi-003 has been deprecated with llama-index version 0.7.7.
How can we update to alternate model?
W
A
L
13 comments
Da-vinci was deprecated from OpenAI, You'll need to move towards GPT 3.5
how we can do that?
I think there was ChatOpenAI module in llamaIndex for the version you are running with.
else updating llamaindex is also an option it has GPT3.5 by default
Are you explicitly setting davinici-003 somewhere? The default in llama-index is gpt-3.5
@Logan M i'm using 0.7.7 version of llama_index
using text-divinci-002 for embeddings.
Oof, old version πŸ˜… Those embeddings might also be deperecated by openai too, not sure.

In any case, you can change the LLM with

Plain Text
from llama_index.llms import OpenAI

llm = OpenAI(model="gpt-3.5-turbo")
service_context = ServiceContext.from_defaults(llm=llm, embed_model=embed_model)


I'm guessing you are already setting the embed model in the service context
how can we upgrade to newer version of llama_index. But i'm not sure it may break the existing functionality of the app.
yea one or two things may break slightly, but it wouldn't be too bad.
embed_model = OpenAIEmbedding( model='text-embedding-ada-002', embed_batch_size=100) llm = OpenAI(model="gpt-3.5-turbo") service_context = ServiceContext.from_defaults( llm=llm, embed_model=embed_model) policies_index = load_index_from_storage( policies_storage_context, service_context=service_context)

is there error in this code? if not then it still use text-davinci-003
@Logan M
Thos looks correct to me. But depending on other features you are using, maybe something else is defaulting to text-davinci?
thanks @Logan M i've updated to updated version of llama_index and fixed the issues. 😍
Add a reply
Sign up and join the conversation on Discord