From 32f91c5f317700d0aedad023c6ef7917e0cbbe77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Thu, 23 May 2024 07:27:04 -0700 Subject: [PATCH] services(azure): fix AzureLLMService Fixes #160 --- CHANGELOG.md | 6 ++++++ src/pipecat/services/azure.py | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6282c843a..da59e5dd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to **pipecat** will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Fixed AzureLLMService. + ## [0.0.23] - 2024-05-23 ### Fixed diff --git a/src/pipecat/services/azure.py b/src/pipecat/services/azure.py index d9d5e1b3e..6f0f8075b 100644 --- a/src/pipecat/services/azure.py +++ b/src/pipecat/services/azure.py @@ -77,10 +77,11 @@ class AzureLLMService(BaseOpenAILLMService): endpoint, api_version="2023-12-01-preview", model): - super().__init__(api_key=api_key, model=model) + # Initialize variables before calling parent __init__() because that + # will call create_client() and we need those values there. self._endpoint = endpoint self._api_version = api_version - self._model: str = model + super().__init__(api_key=api_key, model=model) def create_client(self, api_key=None, base_url=None): self._client = AsyncAzureOpenAI(