Upgrade the Rails version to 7.0.3.1 following known migration guides to upgrade a Rails project from Rails 6 to Rails 7. Ensure that `bundle exec rspec` still passes
reqJson {
model: 'gpt-4',
temperature: 0,
total_tokens: 4050,
max_tokens: 29905,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
rawApi: false,
messages: [
{
role: 'system',
content: "You are an assistant, who can only reply in JSON object, reply with a yes (in a param named 'reply') if you understand"
},
{ role: 'assistant', content: '{"reply":"yes"}' },
{
role: 'user',
content: '[object Object]\n' +
'[object Object]\n' +
'[object Object]\n' +
'[object Object]\n' +
'[object Object]'
}
]
}
getCompletion API error {
message: "This model's maximum context length is 8192 tokens. However, you requested 29973 tokens (68 in the messages, 29905 in the completion). Please reduce the length of the messages or completion.",
type: 'invalid_request_error',
param: 'messages',
code: 'context_length_exceeded'
}
I'm not sure how to debug further here.
I'm trying to run this on a project with the following prompt:
I've tried to trim down my files in
src_includeas much as possible to fit within the default limits but when I try a prompt I see:I'm not sure how to debug further here.