Skip to content

Commit

Permalink
fix(azure/tts): avoid stripping model param (#999)
Browse files Browse the repository at this point in the history
* [Azure] Fix tts required model issue

* add tests

* remove console.log call
  • Loading branch information
deyaaeldeen authored Aug 16, 2024
1 parent 0fc2ae4 commit c3a7ccd
Show file tree
Hide file tree
Showing 2 changed files with 148 additions and 185 deletions.
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ export class AzureOpenAI extends OpenAI {
throw new Error('Expected request body to be an object');
}
const model = this._deployment || options.body['model'];
delete options.body['model'];
if (model !== undefined && !this.baseURL.includes('/deployments')) {
options.path = `/deployments/${model}${options.path}`;
}
Expand Down
Loading

0 comments on commit c3a7ccd

Please sign in to comment.