Skip to content

Commit

Permalink
Merge a869bd4 into f1786d9
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Kristek committed Apr 26, 2024
2 parents f1786d9 + a869bd4 commit 00ae657
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/genai/extensions/llama_index/embeddings.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import asyncio
from typing import Optional

from pydantic import Field

from genai._types import ModelLike
from genai.client import Client
from genai.schema import TextEmbeddingParameters
Expand All @@ -17,6 +19,9 @@ class IBMGenAILlamaIndexEmbedding(BaseEmbedding):
model_id: str
parameters: Optional[ModelLike[TextEmbeddingParameters]] = None
execution_options: Optional[ModelLike[CreateExecutionOptions]] = None
# Batch size is set to 100000 to avoid batching in
# LlamaIndex as it is handled by the SDK itself
embed_batch_size: int = Field(default=10000, description="The batch size for embedding calls.", gt=0)

@classmethod
def class_name(cls) -> str:
Expand Down

0 comments on commit 00ae657

Please sign in to comment.