|
@@ -1,4 +1,4 @@
|
|
|
-from typing import Optional
|
|
|
+from typing import Any, Dict, Optional
|
|
|
|
|
|
from embedchain.helpers.json_serializable import register_deserializable
|
|
|
|
|
@@ -13,6 +13,7 @@ class BaseEmbedderConfig:
|
|
|
endpoint: Optional[str] = None,
|
|
|
api_key: Optional[str] = None,
|
|
|
api_base: Optional[str] = None,
|
|
|
+ model_kwargs: Optional[Dict[str, Any]] = None,
|
|
|
):
|
|
|
"""
|
|
|
Initialize a new instance of an embedder config class.
|
|
@@ -29,6 +30,8 @@ class BaseEmbedderConfig:
|
|
|
:type api_key: Optional[str], optional
|
|
|
:param api_base: huggingface api base, defaults to None
|
|
|
:type api_base: Optional[str], optional
|
|
|
+ :param model_kwargs: key-value arguments for the embedding model, defaults a dict inside init.
|
|
|
+ :type model_kwargs: Optional[Dict[str, Any]], defaults a dict inside init.
|
|
|
"""
|
|
|
self.model = model
|
|
|
self.deployment_name = deployment_name
|
|
@@ -36,3 +39,4 @@ class BaseEmbedderConfig:
|
|
|
self.endpoint = endpoint
|
|
|
self.api_key = api_key
|
|
|
self.api_base = api_base
|
|
|
+ self.model_kwargs = model_kwargs or {}
|