mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
Add serialisable support for Replicate (#8525)
This commit is contained in:
parent
16af5f8690
commit
6d03f8b5d8
@ -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…
Reference in New Issue
Block a user