mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-26 09:32:25 +02:00
Add anthropic notebook
This commit is contained in:
@@ -211,14 +211,12 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": 10,
|
||||
"id": "3b541bb9-900c-40d0-964d-7b5dfee30667",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langgraph.prebuilt import ToolNode\n",
|
||||
"import json\n",
|
||||
"from langchain_core.messages import FunctionMessage\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"# Define the function that determines whether to continue or not\n",
|
||||
@@ -257,7 +255,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"execution_count": 6,
|
||||
"id": "813ae66c-3b58-4283-a02a-36da72a2ab90",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -319,28 +317,20 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"execution_count": 7,
|
||||
"id": "8edb04b9-40b6-46f1-a7a8-4b2d8aba7752",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/Users/nuno/dev/langgraph/.venv/lib/python3.11/site-packages/langchain_core/messages/ai.py:52: UserWarning: New langchain packages are available that more efficiently handle tool calling. Please upgrade your packages to versions that set message tool calls. e.g., `pip install --upgrade langchain-anthropic`, pip install--upgrade langchain-openai`, etc.\n",
|
||||
" warnings.warn(\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'messages': [HumanMessage(content='what is the weather in sf'),\n",
|
||||
" AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_Q7l0TopyJxaly7xM9Vq2aGxO', 'function': {'arguments': '{\"query\":\"weather in San Francisco\"}', 'name': 'tavily_search_results_json'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 21, 'prompt_tokens': 87, 'total_tokens': 108}, 'model_name': 'gpt-3.5-turbo', 'system_fingerprint': 'fp_b28b39ffa8', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-d39a73db-e37a-46ce-9476-73fe9eb84b2e-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'weather in San Francisco'}, 'id': 'call_Q7l0TopyJxaly7xM9Vq2aGxO'}]),\n",
|
||||
" ToolMessage(content='[{\"url\": \"https://www.weatherapi.com/\", \"content\": \"{\\'location\\': {\\'name\\': \\'San Francisco\\', \\'region\\': \\'California\\', \\'country\\': \\'United States of America\\', \\'lat\\': 37.78, \\'lon\\': -122.42, \\'tz_id\\': \\'America/Los_Angeles\\', \\'localtime_epoch\\': 1712797953, \\'localtime\\': \\'2024-04-10 18:12\\'}, \\'current\\': {\\'last_updated_epoch\\': 1712797200, \\'last_updated\\': \\'2024-04-10 18:00\\', \\'temp_c\\': 21.1, \\'temp_f\\': 70.0, \\'is_day\\': 1, \\'condition\\': {\\'text\\': \\'Partly cloudy\\', \\'icon\\': \\'//cdn.weatherapi.com/weather/64x64/day/116.png\\', \\'code\\': 1003}, \\'wind_mph\\': 10.5, \\'wind_kph\\': 16.9, \\'wind_degree\\': 300, \\'wind_dir\\': \\'WNW\\', \\'pressure_mb\\': 1017.0, \\'pressure_in\\': 30.04, \\'precip_mm\\': 0.0, \\'precip_in\\': 0.0, \\'humidity\\': 59, \\'cloud\\': 75, \\'feelslike_c\\': 21.1, \\'feelslike_f\\': 70.0, \\'vis_km\\': 16.0, \\'vis_miles\\': 9.0, \\'uv\\': 5.0, \\'gust_mph\\': 16.0, \\'gust_kph\\': 25.8}}\"}]', name='tavily_search_results_json', tool_call_id='call_Q7l0TopyJxaly7xM9Vq2aGxO'),\n",
|
||||
" AIMessage(content='The current weather in San Francisco is partly cloudy with a temperature of 21.1°C (70.0°F). The wind speed is 10.5 mph (16.9 kph) coming from the west-northwest direction. The humidity is at 59% with a visibility of 16.0 km (9.0 miles).', response_metadata={'token_usage': {'completion_tokens': 72, 'prompt_tokens': 466, 'total_tokens': 538}, 'model_name': 'gpt-3.5-turbo', 'system_fingerprint': 'fp_b28b39ffa8', 'finish_reason': 'stop', 'logprobs': None}, id='run-091dcb4c-9424-40fc-aab6-58968d9929a2-0')]}"
|
||||
" AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_HGOi2cCxKKVWnz8WMuOCWnZx', 'function': {'arguments': '{\"query\":\"weather in San Francisco\"}', 'name': 'tavily_search_results_json'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 21, 'prompt_tokens': 87, 'total_tokens': 108}, 'model_name': 'gpt-3.5-turbo', 'system_fingerprint': 'fp_b28b39ffa8', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-df061477-a815-432b-a69f-9951d4c6edfa-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'weather in San Francisco'}, 'id': 'call_HGOi2cCxKKVWnz8WMuOCWnZx'}]),\n",
|
||||
" ToolMessage(content='[{\"url\": \"https://www.weatherapi.com/\", \"content\": \"{\\'location\\': {\\'name\\': \\'San Francisco\\', \\'region\\': \\'California\\', \\'country\\': \\'United States of America\\', \\'lat\\': 37.78, \\'lon\\': -122.42, \\'tz_id\\': \\'America/Los_Angeles\\', \\'localtime_epoch\\': 1712852407, \\'localtime\\': \\'2024-04-11 9:20\\'}, \\'current\\': {\\'last_updated_epoch\\': 1712852100, \\'last_updated\\': \\'2024-04-11 09:15\\', \\'temp_c\\': 15.0, \\'temp_f\\': 59.0, \\'is_day\\': 1, \\'condition\\': {\\'text\\': \\'Partly cloudy\\', \\'icon\\': \\'//cdn.weatherapi.com/weather/64x64/day/116.png\\', \\'code\\': 1003}, \\'wind_mph\\': 3.8, \\'wind_kph\\': 6.1, \\'wind_degree\\': 350, \\'wind_dir\\': \\'N\\', \\'pressure_mb\\': 1015.0, \\'pressure_in\\': 29.97, \\'precip_mm\\': 0.0, \\'precip_in\\': 0.0, \\'humidity\\': 78, \\'cloud\\': 25, \\'feelslike_c\\': 15.8, \\'feelslike_f\\': 60.4, \\'vis_km\\': 16.0, \\'vis_miles\\': 9.0, \\'uv\\': 4.0, \\'gust_mph\\': 8.3, \\'gust_kph\\': 13.3}}\"}]', name='tavily_search_results_json', tool_call_id='call_HGOi2cCxKKVWnz8WMuOCWnZx'),\n",
|
||||
" AIMessage(content='The current weather in San Francisco is as follows:\\n- Temperature: 15.0°C (59.0°F)\\n- Condition: Partly cloudy\\n- Wind: 3.8 mph from the North\\n- Humidity: 78%\\n- Visibility: 16.0 km (9.0 miles)\\n- UV Index: 4.0\\n\\nFor more details, you can visit [Weather API](https://www.weatherapi.com/).', response_metadata={'token_usage': {'completion_tokens': 93, 'prompt_tokens': 465, 'total_tokens': 558}, 'model_name': 'gpt-3.5-turbo', 'system_fingerprint': 'fp_b28b39ffa8', 'finish_reason': 'stop', 'logprobs': None}, id='run-923bcbd2-3c79-4696-8f9e-5142b50b20cf-0')]}"
|
||||
]
|
||||
},
|
||||
"execution_count": 14,
|
||||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -371,37 +361,29 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"execution_count": 8,
|
||||
"id": "f544977e-31f7-41f0-88c4-ec9c27b8cecb",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/Users/nuno/dev/langgraph/.venv/lib/python3.11/site-packages/langchain_core/messages/ai.py:52: UserWarning: New langchain packages are available that more efficiently handle tool calling. Please upgrade your packages to versions that set message tool calls. e.g., `pip install --upgrade langchain-anthropic`, pip install--upgrade langchain-openai`, etc.\n",
|
||||
" warnings.warn(\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Output from node 'agent':\n",
|
||||
"---\n",
|
||||
"{'messages': [AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_VgzsFE5Cf3sdlrIudeijqVsp', 'function': {'arguments': '{\"query\":\"weather in San Francisco\"}', 'name': 'tavily_search_results_json'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 21, 'prompt_tokens': 87, 'total_tokens': 108}, 'model_name': 'gpt-3.5-turbo', 'system_fingerprint': 'fp_b28b39ffa8', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-b3acca13-ccbf-4761-9d0c-1410d5f4f0a9-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'weather in San Francisco'}, 'id': 'call_VgzsFE5Cf3sdlrIudeijqVsp'}])]}\n",
|
||||
"{'messages': [AIMessage(content='', additional_kwargs={'tool_calls': [{'id': 'call_3QXwm9UTKcfN2BuFhTDlLgIN', 'function': {'arguments': '{\"query\":\"weather in San Francisco\"}', 'name': 'tavily_search_results_json'}, 'type': 'function'}]}, response_metadata={'token_usage': {'completion_tokens': 21, 'prompt_tokens': 87, 'total_tokens': 108}, 'model_name': 'gpt-3.5-turbo', 'system_fingerprint': 'fp_b28b39ffa8', 'finish_reason': 'tool_calls', 'logprobs': None}, id='run-9a2d6e22-873a-4afc-8ae2-0adf8176b1b2-0', tool_calls=[{'name': 'tavily_search_results_json', 'args': {'query': 'weather in San Francisco'}, 'id': 'call_3QXwm9UTKcfN2BuFhTDlLgIN'}])]}\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"\n",
|
||||
"Output from node 'action':\n",
|
||||
"---\n",
|
||||
"{'messages': [ToolMessage(content='[{\"url\": \"https://www.weatherapi.com/\", \"content\": \"{\\'location\\': {\\'name\\': \\'San Francisco\\', \\'region\\': \\'California\\', \\'country\\': \\'United States of America\\', \\'lat\\': 37.78, \\'lon\\': -122.42, \\'tz_id\\': \\'America/Los_Angeles\\', \\'localtime_epoch\\': 1712797953, \\'localtime\\': \\'2024-04-10 18:12\\'}, \\'current\\': {\\'last_updated_epoch\\': 1712797200, \\'last_updated\\': \\'2024-04-10 18:00\\', \\'temp_c\\': 21.1, \\'temp_f\\': 70.0, \\'is_day\\': 1, \\'condition\\': {\\'text\\': \\'Partly cloudy\\', \\'icon\\': \\'//cdn.weatherapi.com/weather/64x64/day/116.png\\', \\'code\\': 1003}, \\'wind_mph\\': 10.5, \\'wind_kph\\': 16.9, \\'wind_degree\\': 300, \\'wind_dir\\': \\'WNW\\', \\'pressure_mb\\': 1017.0, \\'pressure_in\\': 30.04, \\'precip_mm\\': 0.0, \\'precip_in\\': 0.0, \\'humidity\\': 59, \\'cloud\\': 75, \\'feelslike_c\\': 21.1, \\'feelslike_f\\': 70.0, \\'vis_km\\': 16.0, \\'vis_miles\\': 9.0, \\'uv\\': 5.0, \\'gust_mph\\': 16.0, \\'gust_kph\\': 25.8}}\"}]', name='tavily_search_results_json', tool_call_id='call_VgzsFE5Cf3sdlrIudeijqVsp')]}\n",
|
||||
"{'messages': [ToolMessage(content='[{\"url\": \"https://www.weatherapi.com/\", \"content\": \"{\\'location\\': {\\'name\\': \\'San Francisco\\', \\'region\\': \\'California\\', \\'country\\': \\'United States of America\\', \\'lat\\': 37.78, \\'lon\\': -122.42, \\'tz_id\\': \\'America/Los_Angeles\\', \\'localtime_epoch\\': 1712852407, \\'localtime\\': \\'2024-04-11 9:20\\'}, \\'current\\': {\\'last_updated_epoch\\': 1712852100, \\'last_updated\\': \\'2024-04-11 09:15\\', \\'temp_c\\': 15.0, \\'temp_f\\': 59.0, \\'is_day\\': 1, \\'condition\\': {\\'text\\': \\'Partly cloudy\\', \\'icon\\': \\'//cdn.weatherapi.com/weather/64x64/day/116.png\\', \\'code\\': 1003}, \\'wind_mph\\': 3.8, \\'wind_kph\\': 6.1, \\'wind_degree\\': 350, \\'wind_dir\\': \\'N\\', \\'pressure_mb\\': 1015.0, \\'pressure_in\\': 29.97, \\'precip_mm\\': 0.0, \\'precip_in\\': 0.0, \\'humidity\\': 78, \\'cloud\\': 25, \\'feelslike_c\\': 15.8, \\'feelslike_f\\': 60.4, \\'vis_km\\': 16.0, \\'vis_miles\\': 9.0, \\'uv\\': 4.0, \\'gust_mph\\': 8.3, \\'gust_kph\\': 13.3}}\"}]', name='tavily_search_results_json', tool_call_id='call_3QXwm9UTKcfN2BuFhTDlLgIN')]}\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"\n",
|
||||
"Output from node 'agent':\n",
|
||||
"---\n",
|
||||
"{'messages': [AIMessage(content='The current weather in San Francisco is partly cloudy with a temperature of 70°F (21.1°C). The wind speed is 10.5 mph (16.9 kph) coming from the west-northwest direction. The humidity is at 59%, and the visibility is 9.0 miles.', response_metadata={'token_usage': {'completion_tokens': 65, 'prompt_tokens': 466, 'total_tokens': 531}, 'model_name': 'gpt-3.5-turbo', 'system_fingerprint': 'fp_b28b39ffa8', 'finish_reason': 'stop', 'logprobs': None}, id='run-fa95b6d0-34bb-41e7-8cfd-87b6af69064f-0')]}\n",
|
||||
"{'messages': [AIMessage(content='The current weather in San Francisco is partly cloudy with a temperature of 59°F (15°C). The wind speed is 6.1 km/h coming from the north. The humidity is at 78%, and the visibility is 16.0 km.', response_metadata={'token_usage': {'completion_tokens': 53, 'prompt_tokens': 465, 'total_tokens': 518}, 'model_name': 'gpt-3.5-turbo', 'system_fingerprint': 'fp_b28b39ffa8', 'finish_reason': 'stop', 'logprobs': None}, id='run-8875456d-e31e-42b0-b2af-bdc1a9cfccfe-0')]}\n",
|
||||
"\n",
|
||||
"---\n",
|
||||
"\n"
|
||||
@@ -433,143 +415,82 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"execution_count": 9,
|
||||
"id": "cfd140f0-a5a6-4697-8115-322242f197b5",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"/Users/nuno/dev/langgraph/.venv/lib/python3.11/site-packages/langchain_core/messages/ai.py:52: UserWarning: New langchain packages are available that more efficiently handle tool calling. Please upgrade your packages to versions that set message tool calls. e.g., `pip install --upgrade langchain-anthropic`, pip install--upgrade langchain-openai`, etc.\n",
|
||||
" warnings.warn(\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': 'call_TyyKAi2L0Uymjr3YW2d3ZnIm', 'function': {'arguments': '', 'name': 'tavily_search_results_json'}, 'type': 'function'}]} id='run-7106791e-464e-4aa1-aaee-5d4674fe49e1' invalid_tool_calls=[{'name': 'tavily_search_results_json', 'args': '', 'id': 'call_TyyKAi2L0Uymjr3YW2d3ZnIm', 'error': 'Malformed args.'}] tool_call_chunks=[{'name': 'tavily_search_results_json', 'args': '', 'id': 'call_TyyKAi2L0Uymjr3YW2d3ZnIm', 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': '{\"', 'name': None}, 'type': None}]} id='run-7106791e-464e-4aa1-aaee-5d4674fe49e1' tool_calls=[{'name': '', 'args': {}, 'id': None}] tool_call_chunks=[{'name': None, 'args': '{\"', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': 'query', 'name': None}, 'type': None}]} id='run-7106791e-464e-4aa1-aaee-5d4674fe49e1' invalid_tool_calls=[{'name': None, 'args': 'query', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': 'query', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': '\":\"', 'name': None}, 'type': None}]} id='run-7106791e-464e-4aa1-aaee-5d4674fe49e1' invalid_tool_calls=[{'name': None, 'args': '\":\"', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': '\":\"', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': 'weather', 'name': None}, 'type': None}]} id='run-7106791e-464e-4aa1-aaee-5d4674fe49e1' invalid_tool_calls=[{'name': None, 'args': 'weather', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': 'weather', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': ' in', 'name': None}, 'type': None}]} id='run-7106791e-464e-4aa1-aaee-5d4674fe49e1' invalid_tool_calls=[{'name': None, 'args': ' in', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': ' in', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': ' San', 'name': None}, 'type': None}]} id='run-7106791e-464e-4aa1-aaee-5d4674fe49e1' invalid_tool_calls=[{'name': None, 'args': ' San', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': ' San', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': ' Francisco', 'name': None}, 'type': None}]} id='run-7106791e-464e-4aa1-aaee-5d4674fe49e1' invalid_tool_calls=[{'name': None, 'args': ' Francisco', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': ' Francisco', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': '\"}', 'name': None}, 'type': None}]} id='run-7106791e-464e-4aa1-aaee-5d4674fe49e1' invalid_tool_calls=[{'name': None, 'args': '\"}', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': '\"}', 'id': None, 'index': 0}]\n",
|
||||
"content='' response_metadata={'finish_reason': 'tool_calls'} id='run-7106791e-464e-4aa1-aaee-5d4674fe49e1'\n",
|
||||
"content='' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='The' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' current' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' weather' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' in' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' San' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Francisco' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' is' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' as' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' follows' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=':\\n' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='-' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Temperature' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=':' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' ' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='21' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='.' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='1' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='°C' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' (' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='70' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='.' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='0' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='°F' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=')\\n' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='-' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Condition' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=':' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Part' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='ly' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' cloudy' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='\\n' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='-' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Wind' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=':' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' ' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='10' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='.' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='5' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' mph' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' from' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' W' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='NW' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='\\n' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='-' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Pressure' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=':' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' ' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='101' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='7' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='.' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='0' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' mb' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='\\n' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='-' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Hum' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='idity' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=':' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' ' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='59' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='%\\n' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='-' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Cloud' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Cover' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=':' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' ' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='75' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='%\\n' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='-' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Visibility' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=':' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' ' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='16' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='.' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='0' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' km' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' (' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='9' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='.' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='0' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' miles' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=')\\n' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='-' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' UV' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' Index' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=':' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' ' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='5' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='.' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='0' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='\\n\\n' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='For' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' more' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' details' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=',' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' you' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' can' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' visit' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' [' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='Weather' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=' API' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='](' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='https' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='://' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='www' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='.weather' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='api' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='.com' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='/' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content=').' id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n",
|
||||
"content='' response_metadata={'finish_reason': 'stop'} id='run-9000bee8-10fe-4712-852b-e043aecb42ec'\n"
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': 'call_EdTLEVxQKMLRNv82Yqdcugdy', 'function': {'arguments': '', 'name': 'tavily_search_results_json'}, 'type': 'function'}]} id='run-acf76f4b-c5d0-46a1-a114-75021091719b' invalid_tool_calls=[{'name': 'tavily_search_results_json', 'args': '', 'id': 'call_EdTLEVxQKMLRNv82Yqdcugdy', 'error': 'Malformed args.'}] tool_call_chunks=[{'name': 'tavily_search_results_json', 'args': '', 'id': 'call_EdTLEVxQKMLRNv82Yqdcugdy', 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': '{\"', 'name': None}, 'type': None}]} id='run-acf76f4b-c5d0-46a1-a114-75021091719b' tool_calls=[{'name': '', 'args': {}, 'id': None}] tool_call_chunks=[{'name': None, 'args': '{\"', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': 'query', 'name': None}, 'type': None}]} id='run-acf76f4b-c5d0-46a1-a114-75021091719b' invalid_tool_calls=[{'name': None, 'args': 'query', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': 'query', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': '\":\"', 'name': None}, 'type': None}]} id='run-acf76f4b-c5d0-46a1-a114-75021091719b' invalid_tool_calls=[{'name': None, 'args': '\":\"', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': '\":\"', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': 'weather', 'name': None}, 'type': None}]} id='run-acf76f4b-c5d0-46a1-a114-75021091719b' invalid_tool_calls=[{'name': None, 'args': 'weather', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': 'weather', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': ' in', 'name': None}, 'type': None}]} id='run-acf76f4b-c5d0-46a1-a114-75021091719b' invalid_tool_calls=[{'name': None, 'args': ' in', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': ' in', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': ' San', 'name': None}, 'type': None}]} id='run-acf76f4b-c5d0-46a1-a114-75021091719b' invalid_tool_calls=[{'name': None, 'args': ' San', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': ' San', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': ' Francisco', 'name': None}, 'type': None}]} id='run-acf76f4b-c5d0-46a1-a114-75021091719b' invalid_tool_calls=[{'name': None, 'args': ' Francisco', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': ' Francisco', 'id': None, 'index': 0}]\n",
|
||||
"content='' additional_kwargs={'tool_calls': [{'index': 0, 'id': None, 'function': {'arguments': '\"}', 'name': None}, 'type': None}]} id='run-acf76f4b-c5d0-46a1-a114-75021091719b' invalid_tool_calls=[{'name': None, 'args': '\"}', 'id': None, 'error': 'Malformed args.'}] tool_call_chunks=[{'name': None, 'args': '\"}', 'id': None, 'index': 0}]\n",
|
||||
"content='' response_metadata={'finish_reason': 'tool_calls'} id='run-acf76f4b-c5d0-46a1-a114-75021091719b'\n",
|
||||
"content='' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='The' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' current' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' weather' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' in' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' San' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' Francisco' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' is' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' partly' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' cloudy' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' with' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' a' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' temperature' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' of' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' ' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='59' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='°F' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' (' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='15' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='°C' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=').' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' The' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' wind' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' speed' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' is' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' ' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='3' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='.' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='8' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' mph' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' (' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='6' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='.' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='1' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' k' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='ph' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=')' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' coming' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' from' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' the' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' north' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='.' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' The' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' humidity' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' is' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' at' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' ' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='78' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='%' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' with' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' a' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' visibility' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' of' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' ' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='9' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content=' miles' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='.' id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n",
|
||||
"content='' response_metadata={'finish_reason': 'stop'} id='run-bd561aa4-2af3-4d44-a110-b7991ec0d930'\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user