Linking API Calls - Chat Mode GPT 3.5 Turbo

I make an API call to OpenAI, then I want to make a second call. However the API doesn’t recognize my first question.

For example I can say “tell me something about the summer season?” as the first API call.
Then if I ask “can you give me more information about my last question” the response is that it doesn’t know what I’m referring to.

Welcome to the forum.

See:

ChatGPT Prompt Engineering for Developers by Isa Fulford (OpenAI) and Andrew Ng (DeepLearning.AI)

LangChain for LLM Application Development by Harrison Chase (Creator of LangChain) and Andrew Ng (DeepLearning.AI)

Welcome to the OpenAI community @matthew.gordon

When you make the next call you’ll have to pass the previous messages as well. Here’s docs

I also wrote a tutorial doing this with python - Build your own AI assistant in 10 lines of code - Python

This worked perfectly, thank you so much!

1 Like