mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-18 09:01:03 +00:00
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>
This commit is contained in:
parent
8639624d40
commit
a7fc731720
@ -99,6 +99,36 @@
|
|||||||
"for chunk in chat.stream(\"Hello!\"):\n",
|
"for chunk in chat.stream(\"Hello!\"):\n",
|
||||||
" print(chunk.content, end=\"\")"
|
" 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": {
|
"metadata": {
|
||||||
|
Loading…
Reference in New Issue
Block a user