Add serialisation props to Fireworks and ChatFireworks (#12255)

pull/12270/head
David Duong 12 months ago committed by GitHub
parent fd5f549a9e
commit c25b174db5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -90,6 +90,14 @@ class ChatFireworks(BaseChatModel):
fireworks_api_key: Optional[str] = None
max_retries: int = 20
@property
def lc_secrets(self) -> Dict[str, str]:
return {"fireworks_api_key": "FIREWORKS_API_KEY"}
@classmethod
def is_lc_serializable(cls) -> bool:
return True
@root_validator()
def validate_environment(cls, values: Dict) -> Dict:
"""Validate that api key in environment."""

@ -37,6 +37,14 @@ class Fireworks(LLM):
fireworks_api_key: Optional[str] = None
max_retries: int = 20
@property
def lc_secrets(self) -> Dict[str, str]:
return {"fireworks_api_key": "FIREWORKS_API_KEY"}
@classmethod
def is_lc_serializable(cls) -> bool:
return True
@root_validator()
def validate_environment(cls, values: Dict) -> Dict:
"""Validate that api key in environment."""

Loading…
Cancel
Save