docs: add langchain-cloudsway provider doc, tools doc and provider entry to packages.yml

This commit is contained in:
unknown 2025-07-21 10:30:20 +08:00
parent e4b2a90c0a
commit 452de4c0db

View File

@ -153,9 +153,7 @@
"metadata": {},
"outputs": [],
"source": [
"tool.invoke({\n",
" \"query\": \"2024 global AI summit highlights\"\n",
"})"
"tool.invoke({\"query\": \"2024 global AI summit highlights\"})"
]
},
{
@ -173,7 +171,7 @@
"id": "3f2b33fd",
"metadata": {},
"source": [
"## Using with an Agent\n",
"## Use within an agent\n",
"\n",
"You can use SmartsearchTool directly with an agent executor by binding the tool to the agent. This allows the agent to dynamically set the available arguments for SmartsearchTool based on user input."
]
@ -192,7 +190,7 @@
"import os\n",
"\n",
"if not os.environ.get(\"DEEPSEEK_API_KEY\"):\n",
" os.environ[\"DEEPSEEK_API_KEY\"] = getpass.getpass(\"Enter API key for DeepSeek: \")\n",
" os.environ[\"DEEPSEEK_API_KEY\"] = getpass.getpass(\"Enter API key for DeepSeek: \")\n",
"\n",
"if not os.environ.get(\"CLOUDSWAY_SERVER_KEY\"):\n",
" os.environ[\"CLOUDSWAY_SERVER_KEY\"] = getpass.getpass(\"CLOUDSWAY_SERVER_KEY:\\n\")\n",
@ -211,8 +209,9 @@
"# Create agent with the tool\n",
"agent = create_react_agent(llm, [smartsearch_tool])\n",
"\n",
"user_input = \"Show me recent peer-reviewed papers about autonomous vehicles from arxiv.org.\"\n",
"\n",
"user_input = (\n",
" \"Show me recent peer-reviewed papers about autonomous vehicles from arxiv.org.\"\n",
")\n",
"for step in agent.stream(\n",
" {\"messages\": user_input},\n",
" stream_mode=\"values\",\n",