NameError: name ‘get_completion_from_message’ is not defined from the orderbot learning of ChatGPT Prompt Engineering for Developers.
I have checked in the function but what I always get is the name error
Dear @Apoorva22,
Welcome to the community.
Can you please send me your notebook, so that I can check where is the error.
{moderator edit: notebook removed}
Dear @Apoorva22,
Please don’t share your code publicly, it is against the community rule. So keep in mind for future. Send me your notebook though personal message.
Please delete your previous post which has the attachment of the notebook.
you have not written the code for following two methods.
def get_completion(prompt, model=“gpt-3.5-turbo”)
def get_completion_from_messages(messages, model=“gpt-3.5-turbo”, temperature=0)
I have fixed your code and sent you as email.
Hi Girjesh,
I have exactly the same issue. Where exactly this code should be added in a prompt?
Please send me your notebook.
I’ll update and send you.
I’m also facing the same issue can you please solve this
If the function is undefined then both the function has to be written in the cell next to the cell where API call is made.
This both are helper function for chatbot working.