Skip to content

Commit

Permalink
Add serialisable support for Replicate (#8525)
Browse files Browse the repository at this point in the history
  • Loading branch information
dqbd authored Aug 11, 2023
1 parent 16af5f8 commit 6d03f8b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libs/langchain/langchain/llms/replicate.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ class Config:

extra = Extra.forbid

@property
def lc_secrets(self) -> Dict[str, str]:
return {"replicate_api_token": "REPLICATE_API_TOKEN"}

@property
def lc_serializable(self) -> bool:
return True

@root_validator(pre=True)
def build_extra(cls, values: Dict[str, Any]) -> Dict[str, Any]:
"""Build extra kwargs from additional params that were passed in."""
Expand Down

0 comments on commit 6d03f8b

Please sign in to comment.