diff --git a/libs/community/langchain_community/chat_models/sparkllm.py b/libs/community/langchain_community/chat_models/sparkllm.py index 02c39d885b6..b29467108eb 100644 --- a/libs/community/langchain_community/chat_models/sparkllm.py +++ b/libs/community/langchain_community/chat_models/sparkllm.py @@ -190,10 +190,10 @@ class ChatSparkLLM(BaseChatModel): "spark_api_secret", "IFLYTEK_SPARK_API_SECRET", ) - values["spark_app_url"] = get_from_dict_or_env( + values["spark_api_url"] = get_from_dict_or_env( values, - "spark_app_url", - "IFLYTEK_SPARK_APP_URL", + "spark_api_url", + "IFLYTEK_SPARK_API_URL", "wss://spark-api.xf-yun.com/v3.1/chat", ) values["spark_llm_domain"] = get_from_dict_or_env( diff --git a/libs/community/langchain_community/llms/sparkllm.py b/libs/community/langchain_community/llms/sparkllm.py index 0f49a356b9d..7d5eeab2184 100644 --- a/libs/community/langchain_community/llms/sparkllm.py +++ b/libs/community/langchain_community/llms/sparkllm.py @@ -71,10 +71,10 @@ class SparkLLM(LLM): "spark_api_secret", "IFLYTEK_SPARK_API_SECRET", ) - values["spark_app_url"] = get_from_dict_or_env( + values["spark_api_url"] = get_from_dict_or_env( values, - "spark_app_url", - "IFLYTEK_SPARK_APP_URL", + "spark_api_url", + "IFLYTEK_SPARK_API_URL", "wss://spark-api.xf-yun.com/v3.1/chat", ) values["spark_llm_domain"] = get_from_dict_or_env(