You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am facing an intermittent issue with the @azure/[email protected] library using the [email protected]. While attempting to send messages to an OpenAI deployment, I sporadically encounter the ECONNRESET error. Despite multiple attempts, this problem persists. Below is my code snippet along with the error message:
code :
for (let attempt = 0, keyIdx = 0; attempt < retries; attempt++, keyIdx++) {
const openai = await this.createAPI();
const messages = [
{
role: 'system',
content: prompt,
},
{ role: 'user', content: content },
];
try {
let res = '';
const result = await openai.getChatCompletions(
OPENAI_DEPLOYMENT_ID,
messages,
);
for (const choice of result.choices) {
console.log(choice.message.content);
res += choice.message.content;
}
return res;
} catch (error) {
if (attempt === retries - 1) {
console.log('Failed after maximum attempts', error);
throw error;
}
}
}
Expected Resolution: I am seeking assistance in resolving the intermittent ECONNRESET error, which is impeding my ability to consistently send messages to the OpenAI deployment. I need help identifying the root cause of this issue and obtaining a solution.
Additional Information:
I am using Node.js v18.15.0.
The version of the @azure/openai library I am using is 1.0.0-beta.2.
Thank you for your support!
This issue is for a: (mark with an x)
- [x ] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)
Minimal steps to reproduce
Any log messages given by the failure
Expected/desired behavior
OS and Version?
Windows 11 & macOS
Versions
1.0.0-beta.2
Mention any other details that might be useful
Thanks! We'll be in touch soon.
The text was updated successfully, but these errors were encountered:
ltara
changed the title
Intermittent read ECONNRESET Error when Sending Messages to OpenAI Deployment
Intermittent RestError: read ECONNRESET Error when Sending Messages to OpenAI Deployment
Sep 30, 2023
I am facing an intermittent issue with the @azure/[email protected] library using the [email protected]. While attempting to send messages to an OpenAI deployment, I sporadically encounter the ECONNRESET error. Despite multiple attempts, this problem persists. Below is my code snippet along with the error message:
code :
Error Message:
Expected Resolution: I am seeking assistance in resolving the intermittent ECONNRESET error, which is impeding my ability to consistently send messages to the OpenAI deployment. I need help identifying the root cause of this issue and obtaining a solution.
Additional Information:
I am using Node.js v18.15.0.
The version of the @azure/openai library I am using is 1.0.0-beta.2.
Thank you for your support!
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
Expected/desired behavior
OS and Version?
Versions
Mention any other details that might be useful
The text was updated successfully, but these errors were encountered: