mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-11-01 10:19:34 +00:00
fix embeding model for Azure (#1601)
### What problem does this PR solve? #1599 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
fb21efd77d
commit
be6d5b76c3
@ -111,11 +111,12 @@ class OpenAIEmbed(Base):
|
||||
return np.array(res.data[0].embedding), res.usage.total_tokens
|
||||
|
||||
|
||||
class AzureEmbed(Base):
|
||||
class AzureEmbed(OpenAIEmbed):
|
||||
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
|
||||
|
||||
|
||||
class BaiChuanEmbed(OpenAIEmbed):
|
||||
def __init__(self, key,
|
||||
model_name='Baichuan-Text-Embedding',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user