From b71e9be2a189db31f52c1cfaf592d60491c175be Mon Sep 17 00:00:00 2001 From: Philipp Memmel Date: Tue, 10 Sep 2024 11:23:14 +0200 Subject: [PATCH] MBS-9360: Hardcore tts model param in case of OpenAI TTS via Azure --- tools/openaitts/classes/connector.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/openaitts/classes/connector.php b/tools/openaitts/classes/connector.php index 46e6585..39b2b0a 100644 --- a/tools/openaitts/classes/connector.php +++ b/tools/openaitts/classes/connector.php @@ -47,6 +47,9 @@ public function get_prompt_data(string $prompttext, array $requestoptions): arra if (!$this->instance->azure_enabled()) { // If azure is enabled, the model will be preconfigured in the azure resource, so we do not need to send it. $data['model'] = $this->instance->get_model(); + } else { + // OpenAI via Azure expects the model to be sent despite being preconfigured in the resource. So we hardcode "tts". + $data['model'] = 'tts'; } return $data;