mirror of
https://github.com/vxcontrol/langchaingo.git
synced 2026-07-18 18:54:43 -04:00
1c3dd0fca4
- Upgraded various AWS SDK dependencies in go.mod and go.sum files to their latest versions, improving compatibility and performance. - Introduced automatic caching support for specific Anthropic models, optimizing token usage and reducing costs. - Refactored message processing to include caching logic, ensuring seamless integration with existing functionalities. - Removed deprecated models from tests and updated test cases to validate new caching features and model support.
58 lines
44 KiB
Plaintext
Generated
58 lines
44 KiB
Plaintext
Generated
httprr trace v1
|
|
10113 602
|
|
POST https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-sonnet-4-5-20250929-v1%3A0/converse HTTP/1.1
|
|
Host: bedrock-runtime.us-east-1.amazonaws.com
|
|
User-Agent: langchaingo-httprr
|
|
Content-Length: 9808
|
|
Authorization: AWS4-HMAC-SHA256 test-api-key
|
|
Content-Type: application/json
|
|
|
|
{"inferenceConfig":{"maxTokens":512},"messages":[{"content":[{"text":"What's the weather in Boston?"}],"role":"user"}],"system":[{"text":"BedrockConverseCache-v1: You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. "}],"toolConfig":{"toolChoice":{"auto":{}},"tools":[{"toolSpec":{"description":"BedrockConverseCache-v1: Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. ","inputSchema":{"json":{"properties":{"location":{"description":"City and state, e.g. San Francisco, CA","type":"string"}},"required":["location"],"type":"object"}},"name":"get_weather"}},{"toolSpec":{"description":"BedrockConverseCache-v1: Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. ","inputSchema":{"json":{"properties":{"date":{"description":"Departure date","type":"string"},"destination":{"description":"Destination city","type":"string"}},"required":["destination","date"],"type":"object"}},"name":"book_flight"}}]}}HTTP/2.0 200 OK
|
|
Content-Length: 437
|
|
Content-Type: application/json
|
|
Date: Tue, 03 Mar 2026 21:48:25 GMT
|
|
X-Amzn-Requestid: d9fc318c-4f76-41ad-bf53-bf56c7c38d58
|
|
|
|
{"metrics":{"latencyMs":2319},"output":{"message":{"content":[{"toolUse":{"input":{"location":"Boston, MA"},"name":"get_weather","toolUseId":"tooluse_hLq2QJgO5f0H7WyOdLMyOx","type":"tool_use"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":2094,"outputTokens":55,"serverToolUsage":{},"totalTokens":2149}}10422 577
|
|
POST https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-sonnet-4-5-20250929-v1%3A0/converse HTTP/1.1
|
|
Host: bedrock-runtime.us-east-1.amazonaws.com
|
|
User-Agent: langchaingo-httprr
|
|
Content-Length: 10116
|
|
Authorization: AWS4-HMAC-SHA256 test-api-key
|
|
Content-Type: application/json
|
|
|
|
{"inferenceConfig":{"maxTokens":512},"messages":[{"content":[{"text":"What's the weather in Boston?"}],"role":"user"},{"content":[{"toolUse":{"input":{"location":"Boston, MA"},"name":"get_weather","toolUseId":"tooluse_hLq2QJgO5f0H7WyOdLMyOx"}}],"role":"assistant"},{"content":[{"toolResult":{"content":[{"text":"{\"temperature\": 72, \"condition\": \"sunny\"}"}],"toolUseId":"tooluse_hLq2QJgO5f0H7WyOdLMyOx"}}],"role":"user"}],"system":[{"text":"BedrockConverseCache-v1: You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. "}],"toolConfig":{"toolChoice":{"auto":{}},"tools":[{"toolSpec":{"description":"BedrockConverseCache-v1: Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. ","inputSchema":{"json":{"properties":{"location":{"description":"City and state, e.g. San Francisco, CA","type":"string"}},"required":["location"],"type":"object"}},"name":"get_weather"}},{"toolSpec":{"description":"BedrockConverseCache-v1: Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. ","inputSchema":{"json":{"properties":{"date":{"description":"Departure date","type":"string"},"destination":{"description":"Destination city","type":"string"}},"required":["destination","date"],"type":"object"}},"name":"book_flight"}}]}}HTTP/2.0 200 OK
|
|
Content-Length: 412
|
|
Content-Type: application/json
|
|
Date: Tue, 03 Mar 2026 21:48:29 GMT
|
|
X-Amzn-Requestid: 67b89095-6b61-4a77-879c-3169194c331e
|
|
|
|
{"metrics":{"latencyMs":2746},"output":{"message":{"content":[{"text":"The weather in Boston, MA is currently sunny with a temperature of 72°F. It's a beautiful day!"}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":0,"cacheWriteInputTokens":0,"inputTokens":2174,"outputTokens":27,"serverToolUsage":{},"totalTokens":2201}}10777 908
|
|
POST https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-sonnet-4-5-20250929-v1%3A0/converse HTTP/1.1
|
|
Host: bedrock-runtime.us-east-1.amazonaws.com
|
|
User-Agent: langchaingo-httprr
|
|
Content-Length: 10471
|
|
Authorization: AWS4-HMAC-SHA256 test-api-key
|
|
Content-Type: application/json
|
|
|
|
{"inferenceConfig":{"maxTokens":512},"messages":[{"content":[{"text":"What's the weather in Boston?"}],"role":"user"},{"content":[{"toolUse":{"input":{"location":"Boston, MA"},"name":"get_weather","toolUseId":"tooluse_hLq2QJgO5f0H7WyOdLMyOx"}}],"role":"assistant"},{"content":[{"toolResult":{"content":[{"text":"{\"temperature\": 72, \"condition\": \"sunny\"}"}],"toolUseId":"tooluse_hLq2QJgO5f0H7WyOdLMyOx"}}],"role":"user"},{"content":[{"text":"The weather in Boston, MA is currently sunny with a temperature of 72°F. It's a beautiful day!"},{"cachePoint":{"ttl":"5m","type":"default"}}],"role":"assistant"},{"content":[{"text":"Now book a flight to Boston for tomorrow"},{"cachePoint":{"ttl":"5m","type":"default"}}],"role":"user"}],"system":[{"text":"BedrockConverseCache-v1: You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. "},{"cachePoint":{"ttl":"5m","type":"default"}}],"toolConfig":{"toolChoice":{"auto":{}},"tools":[{"toolSpec":{"description":"BedrockConverseCache-v1: Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. ","inputSchema":{"json":{"properties":{"location":{"description":"City and state, e.g. San Francisco, CA","type":"string"}},"required":["location"],"type":"object"}},"name":"get_weather"}},{"toolSpec":{"description":"BedrockConverseCache-v1: Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. ","inputSchema":{"json":{"properties":{"date":{"description":"Departure date","type":"string"},"destination":{"description":"Destination city","type":"string"}},"required":["destination","date"],"type":"object"}},"name":"book_flight"}}]}}HTTP/2.0 200 OK
|
|
Content-Length: 743
|
|
Content-Type: application/json
|
|
Date: Tue, 03 Mar 2026 21:48:33 GMT
|
|
X-Amzn-Requestid: cbcb4f5a-6d35-4121-9061-5c1a4bc8dad5
|
|
|
|
{"metrics":{"latencyMs":3199},"output":{"message":{"content":[{"text":"I can help you book a flight to Boston for tomorrow! However, I need a bit more information:\n\n1. **Where are you departing from?** (Which city will you be flying from?)\n2. **What is tomorrow's date?** (Please provide the specific date in a format like \"2024-01-15\" or \"January 15, 2024\")\n\nOnce you provide these details, I'll be able to book your flight to Boston."}],"role":"assistant"}},"stopReason":"end_turn","usage":{"cacheDetails":[{"inputTokens":2209,"ttl":"5m"}],"cacheReadInputTokenCount":0,"cacheReadInputTokens":0,"cacheWriteInputTokenCount":2209,"cacheWriteInputTokens":2209,"inputTokens":3,"outputTokens":102,"serverToolUsage":{},"totalTokens":2314}}11317 675
|
|
POST https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-sonnet-4-5-20250929-v1%3A0/converse HTTP/1.1
|
|
Host: bedrock-runtime.us-east-1.amazonaws.com
|
|
User-Agent: langchaingo-httprr
|
|
Content-Length: 11011
|
|
Authorization: AWS4-HMAC-SHA256 test-api-key
|
|
Content-Type: application/json
|
|
|
|
{"inferenceConfig":{"maxTokens":512},"messages":[{"content":[{"text":"What's the weather in Boston?"}],"role":"user"},{"content":[{"toolUse":{"input":{"location":"Boston, MA"},"name":"get_weather","toolUseId":"tooluse_hLq2QJgO5f0H7WyOdLMyOx"}}],"role":"assistant"},{"content":[{"toolResult":{"content":[{"text":"{\"temperature\": 72, \"condition\": \"sunny\"}"}],"toolUseId":"tooluse_hLq2QJgO5f0H7WyOdLMyOx"}}],"role":"user"},{"content":[{"text":"The weather in Boston, MA is currently sunny with a temperature of 72°F. It's a beautiful day!"},{"cachePoint":{"ttl":"5m","type":"default"}}],"role":"assistant"},{"content":[{"text":"Now book a flight to Boston for tomorrow"}],"role":"user"},{"content":[{"text":"I can help you book a flight to Boston for tomorrow! However, I need a bit more information:\n\n1. **Where are you departing from?** (Which city will you be flying from?)\n2. **What is tomorrow's date?** (Please provide the specific date in a format like \"2024-01-15\" or \"January 15, 2024\")\n\nOnce you provide these details, I'll be able to book your flight to Boston."},{"cachePoint":{"ttl":"5m","type":"default"}}],"role":"assistant"},{"content":[{"text":"I'm flying from New York on March 4th"},{"cachePoint":{"ttl":"5m","type":"default"}}],"role":"user"}],"system":[{"text":"BedrockConverseCache-v1: You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. You are a helpful assistant with access to weather and flight booking capabilities. "},{"cachePoint":{"ttl":"5m","type":"default"}}],"toolConfig":{"toolChoice":{"auto":{}},"tools":[{"toolSpec":{"description":"BedrockConverseCache-v1: Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. Get current weather conditions including temperature, humidity, wind speed, and precipitation for a specified geographic location. ","inputSchema":{"json":{"properties":{"location":{"description":"City and state, e.g. San Francisco, CA","type":"string"}},"required":["location"],"type":"object"}},"name":"get_weather"}},{"toolSpec":{"description":"BedrockConverseCache-v1: Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. Book airline tickets for domestic and international flights with flexible options for departure, arrival, and passenger details. ","inputSchema":{"json":{"properties":{"date":{"description":"Departure date","type":"string"},"destination":{"description":"Destination city","type":"string"}},"required":["destination","date"],"type":"object"}},"name":"book_flight"}}]}}HTTP/2.0 200 OK
|
|
Content-Length: 510
|
|
Content-Type: application/json
|
|
Date: Tue, 03 Mar 2026 21:48:37 GMT
|
|
X-Amzn-Requestid: 0ba50972-8c2f-433a-8e35-e53445779aa2
|
|
|
|
{"metrics":{"latencyMs":2462},"output":{"message":{"content":[{"toolUse":{"input":{"destination":"Boston","date":"March 4th"},"name":"book_flight","toolUseId":"tooluse_IAcLRbQIVFWWhNj83mN6vM","type":"tool_use"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"cacheDetails":[{"inputTokens":116,"ttl":"5m"}],"cacheReadInputTokenCount":2209,"cacheReadInputTokens":2209,"cacheWriteInputTokenCount":116,"cacheWriteInputTokens":116,"inputTokens":3,"outputTokens":73,"serverToolUsage":{},"totalTokens":2401}} |