Add serialisable support for Replicate (#8525)

harrison/clean-up-imports
David Duong 1 year ago committed by GitHub
parent 16af5f8690
commit 6d03f8b5d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -46,6 +46,14 @@ class Replicate(LLM):
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."""

Loading…
Cancel
Save