mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-05 02:41:56 +00:00
(sap) fix after bot review
This commit is contained in:
parent
834ed13534
commit
338379bf40
3 changed files with 6 additions and 6 deletions
|
|
@ -144,13 +144,13 @@ class DocumentMetadataKeyValueListPairs(KeyValueListPair):
|
|||
|
||||
|
||||
class GroundingSearchConfig(BaseModel):
|
||||
max_chunk_count: int = Field(default=None, ge=0)
|
||||
max_document_count: int = Field(default=None, ge=0)
|
||||
max_chunk_count: Optional[int] = Field(default=None, ge=0)
|
||||
max_document_count: Optional[int] = Field(default=None, ge=0)
|
||||
|
||||
@model_validator(mode='after')
|
||||
def validate_max_chunk_count_and_max_document_count(self):
|
||||
if self.max_chunk_count and self.max_document_count:
|
||||
raise ValidationError("Cannot specify both maxChunkCount and maxDocumentCount.")
|
||||
raise ValueError("Cannot specify both maxChunkCount and maxDocumentCount.")
|
||||
return self
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ class GenAIHubOrchestrationConfig(OpenAIGPTConfig):
|
|||
|
||||
for modules_dict in fallback_modules:
|
||||
fallback_model = modules_dict.pop("model")
|
||||
if fallback_model.startswith("sap"):
|
||||
if fallback_model.startswith("sap/"):
|
||||
fallback_model = fallback_model[4:]
|
||||
fallback_template = modules_dict.pop("messages", [])
|
||||
|
||||
|
|
|
|||
|
|
@ -64,11 +64,11 @@ class EmbeddingInput(BaseModel):
|
|||
text: Union[str, List[str]]
|
||||
type: Literal["text", "document", "query"] = "text"
|
||||
|
||||
class EmbeddingComfig(BaseModel):
|
||||
class EmbeddingConfig(BaseModel):
|
||||
modules: EmbeddingsModules
|
||||
|
||||
class EmbeddingRequest(BaseModel):
|
||||
config: EmbeddingComfig
|
||||
config: EmbeddingConfig
|
||||
input: EmbeddingInput
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue