Skip to content

Commit

Permalink
fix: format code according to lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
tlaukkanen committed Oct 14, 2024
1 parent 110c7fc commit ed47c97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/helpers/llm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ export const getOpenAi = async function () {
if (endpoint.indexOf('.openai.azure.com/openai') > 0) {
const deploymentName = endpoint.split('/deployments/')[1].split('/')[0];
const apiVersion = endpoint.split('api-version=')[1];
if(!deploymentName || !apiVersion) {
if (!deploymentName || !apiVersion) {
throw new KnownError(
`Invalid Azure OpenAI endpoint. Use \`${commandName} config\` to set ` +
'your Azure OpenAI deployment endpoint as your OpenAI API endpoint. ' +
'Use the format: https://<hub>.openai.azure.com/openai/' +
'deployments/<deployment_name>/chat/completions?api-version=<api_version>'
'your Azure OpenAI deployment endpoint as your OpenAI API endpoint. ' +
'Use the format: https://<hub>.openai.azure.com/openai/' +
'deployments/<deployment_name>/chat/completions?api-version=<api_version>'
);
}
return new AzureOpenAI({
Expand Down

0 comments on commit ed47c97

Please sign in to comment.