community[patch]: Fix ChatModel for sparkllm Bug. (#18375)

**PR message**: ***Delete this entire checklist*** and replace with
    - **Description:** fix sparkllm paramer error
    - **Issue:**   close #18370
- **Dependencies:** change `IFLYTEK_SPARK_APP_URL` to
`IFLYTEK_SPARK_API_URL`
    - **Twitter handle:** No
This commit is contained in:
Guangdong Liu 2024-03-02 02:49:30 +08:00 committed by GitHub
parent cbb65741a7
commit 760a16ff32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -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(

View File

@ -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(