chore: fix typo.
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run

This commit is contained in:
CaptainB 2024-12-20 12:33:08 +08:00
parent 77aa83d829
commit 6c7ae3f79f
2 changed files with 2 additions and 9 deletions

View File

@ -16,14 +16,10 @@ from setting.models_provider.base_model_provider import MaxKBBaseModel
class AzureOpenAIEmbeddingModel(MaxKBBaseModel, AzureOpenAIEmbeddings):
@staticmethod
def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs):
return AzureOpenAIEmbeddings(
return AzureOpenAIEmbeddingModel(
model=model_name,
openai_api_key=model_credential.get('api_key'),
azure_endpoint=model_credential.get('api_base'),
openai_api_version=model_credential.get('api_version'),
openai_api_type="azure",
)
def is_cache_model(self):
return True

View File

@ -16,10 +16,7 @@ from setting.models_provider.base_model_provider import MaxKBBaseModel
class GeminiEmbeddingModel(MaxKBBaseModel, GoogleGenerativeAIEmbeddings):
@staticmethod
def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs):
return GoogleGenerativeAIEmbeddings(
return GeminiEmbeddingModel(
google_api_key=model_credential.get('api_key'),
model=model_name,
)
def is_cache_model(self):
return False