mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-15 06:26:12 +00:00
@@ -13,6 +13,7 @@ from typing import (
|
||||
Mapping,
|
||||
Optional,
|
||||
Union,
|
||||
cast,
|
||||
)
|
||||
|
||||
from langchain_core.callbacks import (
|
||||
@@ -197,7 +198,7 @@ class ChatTongyi(BaseChatModel):
|
||||
return {
|
||||
"model": self.model_name,
|
||||
"top_p": self.top_p,
|
||||
"api_key": self.dashscope_api_key.get_secret_value(), # type: ignore[union-attr]
|
||||
"api_key": cast(SecretStr, self.dashscope_api_key).get_secret_value(),
|
||||
"result_format": "message",
|
||||
**self.model_kwargs,
|
||||
}
|
||||
|
Reference in New Issue
Block a user