Hello
I was really excited about responses api feature to store conversations for entire month!
But I realized (when played) that It stores only beginning of conversation and doesn’t add new messages to existing chat. Am I wrong?
I played with this code
import OpenAI from "openai";
import cred from "./cred.json"
const openai = new OpenAI({
apiKey: cred.openai
})
const prevId = "resp_681e4ae92df08191a874320b75b121180aded87eff5a98d8"
const main = async () => {
const resp1 =
await openai.responses.create({
model: "gpt-4.1-mini",
previous_response_id: "resp_681e4ae92df08191a874320b75b121180aded87eff5a98d8",
input: "hello again, and how to translate hello to german?",
store: true
})
console.log("resp1", resp1.id, resp1.output_text)
const resp2 =
await openai.responses.create({
model: "gpt-4.1-mini",
previous_response_id: prevId,
input: [
{
role: "system",
content: "be patient and very kind"
},
{
role: "user",
content: "what was my first question?"
}
]
});
console.log("resp2", resp2.id, resp2.output_text)
}
main()