Skip to content

Commit

Permalink
chore: fix typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
liuruibin committed Dec 20, 2024
1 parent 77aa83d commit 6c7ae3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
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

0 comments on commit 6c7ae3f

Please sign in to comment.