|
@@ -277,7 +277,7 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
}),
|
|
}),
|
|
|
- "azure-cognitive-services": Effect.fnUntraced(function* () {
|
|
|
|
|
|
|
+ "azure-cognitive-services": Effect.fnUntraced(function* (provider: Info) {
|
|
|
const resourceName = yield* dep.get("AZURE_COGNITIVE_SERVICES_RESOURCE_NAME")
|
|
const resourceName = yield* dep.get("AZURE_COGNITIVE_SERVICES_RESOURCE_NAME")
|
|
|
return {
|
|
return {
|
|
|
autoload: false,
|
|
autoload: false,
|
|
@@ -285,7 +285,9 @@ function custom(dep: CustomDep): Record<string, CustomLoader> {
|
|
|
return selectAzureLanguageModel(sdk, modelID, Boolean(options?.["useCompletionUrls"]))
|
|
return selectAzureLanguageModel(sdk, modelID, Boolean(options?.["useCompletionUrls"]))
|
|
|
},
|
|
},
|
|
|
options: {
|
|
options: {
|
|
|
- baseURL: resourceName ? `https://${resourceName}.cognitiveservices.azure.com/openai` : undefined,
|
|
|
|
|
|
|
+ baseURL: resourceName
|
|
|
|
|
+ ? `https://${resourceName}.cognitiveservices.azure.com/openai${provider.options?.useDeploymentBasedUrls ? "" : "/v1"}`
|
|
|
|
|
+ : undefined,
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
}),
|
|
}),
|