only "t" on response - AI Rest API

hey! I'm currently getting the following response on the second message to the AI: REST API response: { result: { response: 't' }, success: true, errors: [], messages: [] } API query:
const response = await fetch(`https://api.cloudflare.com/client/v4/accounts/${process.env.CF_AI_ACC}/ai/run/@cf/meta/llama-2-7b-chat-int8`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.CF_AI_TOKEN}`
},
body: JSON.stringify({
messages: messages
})
}).then(async res => await res.json())
const response = await fetch(`https://api.cloudflare.com/client/v4/accounts/${process.env.CF_AI_ACC}/ai/run/@cf/meta/llama-2-7b-chat-int8`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.CF_AI_TOKEN}`
},
body: JSON.stringify({
messages: messages
})
}).then(async res => await res.json())
1 Reply
Sr Izan
Sr Izan2mo ago
thanks! I’ll try tomorrow and stream the response, see what happens