diff --git a/libs/langchain/langchain/chat_models/fireworks.py b/libs/langchain/langchain/chat_models/fireworks.py index 841ee8a0d84f4..0da316a96889d 100644 --- a/libs/langchain/langchain/chat_models/fireworks.py +++ b/libs/langchain/langchain/chat_models/fireworks.py @@ -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.""" diff --git a/libs/langchain/langchain/llms/fireworks.py b/libs/langchain/langchain/llms/fireworks.py index 73f4a96aa9785..51ebb8800998e 100644 --- a/libs/langchain/langchain/llms/fireworks.py +++ b/libs/langchain/langchain/llms/fireworks.py @@ -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."""