forked from phoenix/litellm-mirror
* Fixed UserWarning: Valid config keys have changed in V2 underscore_attrs_are_private * Trying different method Co-authored-by: CyanideByte <cyanidebyte@hotmail.com>
This commit is contained in:
parent
aa64c34ce6
commit
3a5039e284
1 changed files with 4 additions and 2 deletions
|
@ -6,7 +6,7 @@ https://docs.cohere.com/reference/rerank
|
|||
|
||||
from typing import List, Optional, Union
|
||||
|
||||
from pydantic import BaseModel
|
||||
from pydantic import BaseModel, PrivateAttr
|
||||
|
||||
|
||||
class RerankRequest(BaseModel):
|
||||
|
@ -23,7 +23,9 @@ class RerankResponse(BaseModel):
|
|||
id: str
|
||||
results: List[dict] # Contains index and relevance_score
|
||||
meta: dict # Contains api_version and billed_units
|
||||
_hidden_params: dict = {}
|
||||
|
||||
# Define private attributes using PrivateAttr
|
||||
_hidden_params: dict = PrivateAttr(default_factory=dict)
|
||||
|
||||
def __getitem__(self, key):
|
||||
return self.__dict__[key]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue