From 343438e8722f15a3ad088ab0aeb52bc63650c991 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Mon, 4 Mar 2024 17:04:26 -0800 Subject: [PATCH] community[patch]: deprecate community fireworks (#18544) --- libs/community/langchain_community/chat_models/fireworks.py | 6 ++++++ libs/community/langchain_community/llms/fireworks.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/libs/community/langchain_community/chat_models/fireworks.py b/libs/community/langchain_community/chat_models/fireworks.py index 118126c4e6482b..3de28798939e7a 100644 --- a/libs/community/langchain_community/chat_models/fireworks.py +++ b/libs/community/langchain_community/chat_models/fireworks.py @@ -10,6 +10,7 @@ Union, ) +from langchain_core._api.deprecation import deprecated from langchain_core.callbacks import ( AsyncCallbackManagerForLLMRun, CallbackManagerForLLMRun, @@ -78,6 +79,11 @@ def convert_dict_to_message(_dict: Any) -> BaseMessage: return ChatMessage(content=content, role=role) +@deprecated( + since="0.0.26", + removal="0.2", + alternative_import="langchain_fireworks.ChatFireworks", +) class ChatFireworks(BaseChatModel): """Fireworks Chat models.""" diff --git a/libs/community/langchain_community/llms/fireworks.py b/libs/community/langchain_community/llms/fireworks.py index 9c0c80a33d1dba..c12733480c96e7 100644 --- a/libs/community/langchain_community/llms/fireworks.py +++ b/libs/community/langchain_community/llms/fireworks.py @@ -2,6 +2,7 @@ from concurrent.futures import ThreadPoolExecutor from typing import Any, AsyncIterator, Callable, Dict, Iterator, List, Optional, Union +from langchain_core._api.deprecation import deprecated from langchain_core.callbacks import ( AsyncCallbackManagerForLLMRun, CallbackManagerForLLMRun, @@ -26,6 +27,11 @@ def _stream_response_to_generation_chunk( ) +@deprecated( + since="0.0.26", + removal="0.2", + alternative_import="langchain_fireworks.Fireworks", +) class Fireworks(BaseLLM): """Fireworks models."""