Find answers from the community

Updated last year

Error

At a glance

The community member is trying to create a chatbot using llama-index and is encountering an error when running chat_engine.chat(...). The error is a NotImplementedError stating that "Messages passed in must be of odd length".

In the comments, another community member suggests that this is a specific issue with the inference API and that a pull request may be needed to fix it.

Another community member mentions a similar issue they encountered when using query_engine.query(), where they received an InvalidRequestError stating that the model text-davinci-003 has been deprecated. They note that this model is being shut down by OpenAI on 2024-01-04, and that they set the llm=gpt-3.5-turbo when building the index, but are still encountering the issue. They are looking for a solution.

In response, a community member confirms that text-davinci-003 has been completely deleted by OpenAI, and that newer versions of llama-index set the default llm as gpt-3.5. They suggest

Useful resources
Hi ther, i ran into a problem.

im trying to make a chatbot with llama-index.

I try to use a LLM form HuggingFace (see in the picture)

But when i run the chat_engine.chat(...) im getting following error:
NotImplementedError: Messages passed in must be of odd length. (picture)

Im kind of stuck. Thanks for your help.
Attachment
Bildschirmfoto_2024-01-12_um_02.28.44.png
L
x
F
5 comments
Well that's a dumb error lol

Needs a pr to fix I think
Looks specific to inference api
i ran into a similar problem suddenly,when executing 'query_engine.query()', my code used to work well. The error is: InvalidRequestError: The model text-davinci-003 has been deprecated, learn more here: https://platform.openai.com/docs/deprecations. i find text-davinci-003 shut down on 2024-01-04,i guess maybe because text-davinci-003 is default model for chat or query, and it's no longger supported although I set the llm=gpt-3.5-turbo when building index. and I also don't know the solution yet. if you know the solution, please let me know.
yea text davicini 003 is completely deleted by openai. Newer versions of llama-index set the default llm as gpt-3.5. You'll need to set the llm both when building and loading the index
How can I fix it?
Add a reply
Sign up and join the conversation on Discord