Open Said-Apollo opened 1 month ago
Looks to me like its derived from the wrong base class. Could try to derive it from OpenAIEmbed
. Unfortunately, i dont have an dev env to try it.
I can confirm that changing the base class to OpenAIEmbed
works. I am able to use my azure deployed endpoinds with them. As an additional note the name of the endpoints must be:
azure-text-embedding-3-large
azure-gpt-35-turbo
and similar, so azure-
followed by the model type.
Describe your problem
Hi, I already have deployed some models and the ada and larg3 embedding models, however, when entering the API-key and endpoint, I'm receiving an error message that the encoding method was not implemented. As far as I know support was added by issue #1512 . Upon closer insection I saw in the embedding_model.py that there is no encode method for the azure openai class, or was that added somewhere else?
Here the azure class directly inherits from Base
class AzureEmbed(Base): def __init__(self, key, model_name, **kwargs): self.client = AzureOpenAI(api_key=key, azure_endpoint=kwargs["base_url"], api_version="2024-02-01") self.model_name = model_name
And here the Base `class Base(ABC): def init(self, key, model_name): pass