Skip to content

Commit d6ab8ae

Browse files
committed
docs / remove configs
1 parent e9ac94d commit d6ab8ae

File tree

3 files changed

+4
-31
lines changed

3 files changed

+4
-31
lines changed

docs/api_reference/core/embeddings.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@
55
::: ragbits.core.embeddings.local.LocalEmbedder
66

77
::: ragbits.core.embeddings.litellm.LiteLLMEmbedder
8+
9+
::: ragbits.core.embeddings.fastembed.FastembedEmbedder
10+
11+
::: ragbits.core.embeddings.fastembed.FastembedSparseEmbedder

packages/ragbits-core/src/ragbits/core/embeddings/litellm.py

-7
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,6 @@ def from_config(cls, config: dict[str, Any]) -> Self:
131131
Returns:
132132
LiteLLMEmbedder: An initialized LiteLLMEmbedder instance.
133133
"""
134-
# Handle parameter name mapping for config
135-
if "model" in config:
136-
config["model_name"] = config.pop("model")
137-
138-
if "api_base" in config:
139-
config["base_url"] = config.pop("api_base")
140-
141134
if "router" in config:
142135
router = litellm.router.Router(model_list=config["router"])
143136
config["router"] = router

packages/ragbits-core/src/ragbits/core/embeddings/vertex_multimodal.py

-24
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import asyncio
22
import base64
3-
from typing import Any
4-
5-
from typing_extensions import Self
63

74
from ragbits.core.embeddings.litellm import LiteLLMEmbedderOptions
85

@@ -184,24 +181,3 @@ async def embed_image(
184181
[{"image": {"bytesBase64Encoded": image}} for image in images_b64], options=options
185182
)
186183
return [embedding["embedding"] for embedding in response]
187-
188-
@classmethod
189-
def from_config(cls, config: dict[str, Any]) -> Self:
190-
"""
191-
Creates and returns a VertexAIMultimodelEmbedder instance.
192-
193-
Args:
194-
config: A configuration object containing the configuration for initializing
195-
the VertexAIMultimodelEmbedder instance.
196-
197-
Returns:
198-
VertexAIMultimodelEmbedder: An initialized VertexAIMultimodelEmbedder instance.
199-
"""
200-
# Handle parameter name mapping for config
201-
if "model" in config:
202-
config["model_name"] = config.pop("model")
203-
204-
if "api_base" in config:
205-
config["base_url"] = config.pop("api_base")
206-
207-
return super().from_config(config)

0 commit comments

Comments
 (0)