mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🎙️ fix: Azure OpenAI Speech-to-Text 400 Bad Request Error (#10355)
This commit is contained in:
parent
06fcf79d56
commit
772b706e20
2 changed files with 6 additions and 1 deletions
|
|
@ -227,7 +227,6 @@ class STTService {
|
|||
}
|
||||
|
||||
const headers = {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
...(apiKey && { 'api-key': apiKey }),
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,12 @@ export const genAzureEndpoint = ({
|
|||
azureOpenAIApiInstanceName: string;
|
||||
azureOpenAIApiDeploymentName: string;
|
||||
}): string => {
|
||||
// Support both old (.openai.azure.com) and new (.cognitiveservices.azure.com) endpoint formats
|
||||
// If instanceName already includes a full domain, use it as-is
|
||||
if (azureOpenAIApiInstanceName.includes('.azure.com')) {
|
||||
return `https://${azureOpenAIApiInstanceName}/openai/deployments/${azureOpenAIApiDeploymentName}`;
|
||||
}
|
||||
// Legacy format for backward compatibility
|
||||
return `https://${azureOpenAIApiInstanceName}.openai.azure.com/openai/deployments/${azureOpenAIApiDeploymentName}`;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue