docs: change sparkllm spark_app_url to spark_api_url (#18000)

community: fix - change sparkllm spark_app_url to spark_api_url

- **Description:** 
- Change the variable name from `sparkllm spark_app_url` to
`spark_api_url` in the community package.

---------

Co-authored-by: Bagatur <baskaryan@gmail.com>
pull/18908/head^2
fjk 4 months ago committed by GitHub
parent 8639624d40
commit a7fc731720
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -99,6 +99,36 @@
"for chunk in chat.stream(\"Hello!\"):\n",
" print(chunk.content, end=\"\")"
]
},
{
"cell_type": "markdown",
"id": "566c85e0",
"metadata": {},
"source": [
"## For v2"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "3103ebdf",
"metadata": {},
"outputs": [],
"source": [
"\"\"\"For basic init and call\"\"\"\n",
"from langchain_community.chat_models import ChatSparkLLM\n",
"from langchain_core.messages import HumanMessage\n",
"\n",
"chat = ChatSparkLLM(\n",
" spark_app_id=\"<app_id>\",\n",
" spark_api_key=\"<api_key>\",\n",
" spark_api_secret=\"<api_secret>\",\n",
" spark_api_url=\"wss://spark-api.xf-yun.com/v2.1/chat\",\n",
" spark_llm_domain=\"generalv2\",\n",
")\n",
"message = HumanMessage(content=\"Hello\")\n",
"chat([message])"
]
}
],
"metadata": {

Loading…
Cancel
Save