mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-02 13:08:57 +00:00
community[patch]: QianfanLLMEndpoint fix type information for the keys (#24128)
Fix for issue: https://github.com/langchain-ai/langchain/issues/24126
This commit is contained in:
parent
ee3fe20af4
commit
08638ccc88
@ -16,7 +16,7 @@ from langchain_core.callbacks import (
|
|||||||
)
|
)
|
||||||
from langchain_core.language_models.llms import LLM
|
from langchain_core.language_models.llms import LLM
|
||||||
from langchain_core.outputs import GenerationChunk
|
from langchain_core.outputs import GenerationChunk
|
||||||
from langchain_core.pydantic_v1 import Field
|
from langchain_core.pydantic_v1 import Field, SecretStr
|
||||||
from langchain_core.utils import convert_to_secret_str, get_from_dict_or_env, pre_init
|
from langchain_core.utils import convert_to_secret_str, get_from_dict_or_env, pre_init
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -49,8 +49,8 @@ class QianfanLLMEndpoint(LLM):
|
|||||||
|
|
||||||
client: Any
|
client: Any
|
||||||
|
|
||||||
qianfan_ak: Optional[str] = None
|
qianfan_ak: Optional[SecretStr] = None
|
||||||
qianfan_sk: Optional[str] = None
|
qianfan_sk: Optional[SecretStr] = None
|
||||||
|
|
||||||
streaming: Optional[bool] = False
|
streaming: Optional[bool] = False
|
||||||
"""Whether to stream the results or not."""
|
"""Whether to stream the results or not."""
|
||||||
|
Loading…
Reference in New Issue
Block a user