Skip to content

Commit

Permalink
Update azureUtils.js
Browse files Browse the repository at this point in the history
  • Loading branch information
paychex-ssmithrand authored Dec 7, 2023
1 parent 04c7e00 commit 7a8badc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions api/utils/azureUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ const sanitizeModelName = (modelName) => {
* @returns {string} The complete endpoint URL for the Azure OpenAI API.
*/
const genAzureEndpoint = ({ azureOpenAIApiInstanceName, azureOpenAIApiDeploymentName }) => {
return `https://${azureOpenAIApiInstanceName}/${azureOpenAIApiDeploymentName}`;
console.log(`https://${azureOpenAIApiInstanceName}/openai/deployments/${azureOpenAIApiDeploymentName}`);
return `https://${azureOpenAIApiInstanceName}/openai/deployments/${azureOpenAIApiDeploymentName}`;
};

/**
Expand Down Expand Up @@ -54,8 +55,9 @@ const genAzureChatCompletion = (
} else {
throw new Error('Either a model name or a deployment name must be provided.');
}

return `https://${azureOpenAIApiInstanceName}/${deploymentSegment}/chat/completions?api-version=${azureOpenAIApiVersion}`;
console.log('genAzureChatCompletion');
console.log(`https://${azureOpenAIApiInstanceName}/openai/deployments/${deploymentSegment}/chat/completions?api-version=${azureOpenAIApiVersion}`);
return `https://${azureOpenAIApiInstanceName}/openai/deployments/${deploymentSegment}/chat/completions?api-version=${azureOpenAIApiVersion}`;
};

/**
Expand Down

0 comments on commit 7a8badc

Please sign in to comment.