mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-09 06:53:59 +00:00
community: Add deprecation warning for GigaChat integration in langchain-community (#28022)
- **Description:** We have released the [langchain-gigachat](https://github.com/ai-forever/langchain-gigachat?tab=readme-ov-file) with new GigaChat integration that support's function/tool calling. This PR deprecated legacy GigaChat class in community package. --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
@@ -13,6 +13,7 @@ from typing import (
|
||||
Type,
|
||||
)
|
||||
|
||||
from langchain_core._api.deprecation import deprecated
|
||||
from langchain_core.callbacks import (
|
||||
AsyncCallbackManagerForLLMRun,
|
||||
CallbackManagerForLLMRun,
|
||||
@@ -113,6 +114,11 @@ def _convert_delta_to_message_chunk(
|
||||
return default_class(content=content) # type: ignore[call-arg]
|
||||
|
||||
|
||||
@deprecated(
|
||||
since="0.3.5",
|
||||
removal="1.0",
|
||||
alternative_import="langchain_gigachat.GigaChat",
|
||||
)
|
||||
class GigaChat(_BaseGigaChat, BaseChatModel):
|
||||
"""`GigaChat` large language models API.
|
||||
|
||||
|
@@ -4,6 +4,7 @@ import logging
|
||||
from functools import cached_property
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
from langchain_core._api.deprecation import deprecated
|
||||
from langchain_core.embeddings import Embeddings
|
||||
from langchain_core.utils import pre_init
|
||||
from langchain_core.utils.pydantic import get_fields
|
||||
@@ -15,6 +16,11 @@ MAX_BATCH_SIZE_CHARS = 1000000
|
||||
MAX_BATCH_SIZE_PARTS = 90
|
||||
|
||||
|
||||
@deprecated(
|
||||
since="0.3.5",
|
||||
removal="1.0",
|
||||
alternative_import="langchain_gigachat.GigaChatEmbeddings",
|
||||
)
|
||||
class GigaChatEmbeddings(BaseModel, Embeddings):
|
||||
"""GigaChat Embeddings models.
|
||||
|
||||
|
Reference in New Issue
Block a user