Spaces:
Running
Running
韩宇
commited on
Commit
·
2ff8862
1
Parent(s):
d20c53a
opt
Browse files
omagent_core/models/encoders/azure_encoder.py
CHANGED
@@ -21,8 +21,8 @@ class AzureTextEmbeddingV3(EncoderBase):
|
|
21 |
|
22 |
def __init__(self, /, **data: Any) -> None:
|
23 |
super().__init__(**data)
|
24 |
-
self.client = AzureOpenAI(
|
25 |
-
self.aclient = AsyncAzureOpenAI(
|
26 |
|
27 |
def _infer(self, data: List[str], **kwargs) -> List[List[float]]:
|
28 |
res = self.client.embeddings.create(input=data, model=self.model_id)
|
|
|
21 |
|
22 |
def __init__(self, /, **data: Any) -> None:
|
23 |
super().__init__(**data)
|
24 |
+
self.client = AzureOpenAI(azure_endpoint=self.endpoint, api_key=self.api_key, api_version=self.api_version)
|
25 |
+
self.aclient = AsyncAzureOpenAI(azure_endpoint=self.endpoint, api_key=self.api_key, api_version=self.api_version)
|
26 |
|
27 |
def _infer(self, data: List[str], **kwargs) -> List[List[float]]:
|
28 |
res = self.client.embeddings.create(input=data, model=self.model_id)
|