azure-openai-node icon indicating copy to clipboard operation
azure-openai-node copied to clipboard

please correct example request in readme

Open tszalaj opened this issue 1 year ago • 1 comments

Hi,

Your example request in readme results in error 400 bad request. Correct notation is max_tokens, presence_penalty, etc.:

optional, you can also set your Azure deploymentName by replacing your model with deployment name, like this:

const response = await this.openAiApi.createCompletion({ model: {your-azure-openai-resource-deployment-name}, prompt: prompt, maxTokens: 100, temperature: 0.9, topP: 1, presencePenalty: 0, frequencyPenalty: 0, bestOf: 1, });

tszalaj avatar Apr 20 '23 14:04 tszalaj