|
| 1 | +interactions: |
| 2 | +- request: |
| 3 | + body: '{"messages": [{"role": "user", "content": [{"text": "What is the largest city in the user country?"}]}], "system": |
| 4 | + [], "inferenceConfig": {}, "toolConfig": {"tools": [{"toolSpec": {"name": "get_user_country", "inputSchema": {"json": |
| 5 | + {"additionalProperties": false, "properties": {}, "type": "object"}}}}]}, "additionalModelRequestFields": {"thinking": |
| 6 | + {"type": "enabled", "budget_tokens": 1024}}}' |
| 7 | + headers: |
| 8 | + amz-sdk-invocation-id: |
| 9 | + - !!binary | |
| 10 | + MmM5YzRmZDctMmNlZS00Yzk2LWIwZWMtZjMxN2NkZDEwYmM5 |
| 11 | + amz-sdk-request: |
| 12 | + - !!binary | |
| 13 | + YXR0ZW1wdD0x |
| 14 | + content-length: |
| 15 | + - '396' |
| 16 | + content-type: |
| 17 | + - !!binary | |
| 18 | + YXBwbGljYXRpb24vanNvbg== |
| 19 | + method: POST |
| 20 | + uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/converse |
| 21 | + response: |
| 22 | + headers: |
| 23 | + connection: |
| 24 | + - keep-alive |
| 25 | + content-length: |
| 26 | + - '1085' |
| 27 | + content-type: |
| 28 | + - application/json |
| 29 | + parsed_body: |
| 30 | + metrics: |
| 31 | + latencyMs: 3896 |
| 32 | + output: |
| 33 | + message: |
| 34 | + content: |
| 35 | + - reasoningContent: |
| 36 | + reasoningText: |
| 37 | + signature: ErcBCkgIBhABGAIiQDYN+P1S3ACL3r24cAMKCrRNiuPPxvmT2uzREPLRyKEUXagRbXn97QCke6L7OEZvlh7NdA/MQNTwMZV8TuB4qPASDLNxYxDx1S3luCIfARoMIwLZXwhsvjjTN72XIjAJrEl5ryAvv6C1+6YMCPC73ffE+kgwB96IcZaOuDFQtyaoWwcFcDPBguM6YNp5e3cqHbDQ3QF5dR4PP5q+3K23pual3pUdT/0e7khyIxXkGAI= |
| 38 | + text: |- |
| 39 | + The user is asking for the largest city in their country. To answer this, I first need to determine what country the user is from. I can use the `get_user_country` function to retrieve this information. |
| 40 | +
|
| 41 | + Once I have the user's country, I can then provide information about the largest city in that country. |
| 42 | + - text: I'll need to check what country you're from to answer that question. |
| 43 | + - toolUse: |
| 44 | + input: {} |
| 45 | + name: get_user_country |
| 46 | + toolUseId: tooluse_W9DaUFg4Tj2cRPpndqxWSg |
| 47 | + role: assistant |
| 48 | + stopReason: tool_use |
| 49 | + usage: |
| 50 | + cacheReadInputTokenCount: 0 |
| 51 | + cacheReadInputTokens: 0 |
| 52 | + cacheWriteInputTokenCount: 0 |
| 53 | + cacheWriteInputTokens: 0 |
| 54 | + inputTokens: 397 |
| 55 | + outputTokens: 130 |
| 56 | + totalTokens: 527 |
| 57 | + status: |
| 58 | + code: 200 |
| 59 | + message: OK |
| 60 | +- request: |
| 61 | + body: '{"messages": [{"role": "user", "content": [{"text": "What is the largest city in the user country?"}]}, {"role": |
| 62 | + "assistant", "content": [{"reasoningContent": {"reasoningText": {"text": "The user is asking for the largest city in |
| 63 | + their country. To answer this, I first need to determine what country the user is from. I can use the `get_user_country` |
| 64 | + function to retrieve this information.\n\nOnce I have the user''s country, I can then provide information about the |
| 65 | + largest city in that country.", "signature": "ErcBCkgIBhABGAIiQDYN+P1S3ACL3r24cAMKCrRNiuPPxvmT2uzREPLRyKEUXagRbXn97QCke6L7OEZvlh7NdA/MQNTwMZV8TuB4qPASDLNxYxDx1S3luCIfARoMIwLZXwhsvjjTN72XIjAJrEl5ryAvv6C1+6YMCPC73ffE+kgwB96IcZaOuDFQtyaoWwcFcDPBguM6YNp5e3cqHbDQ3QF5dR4PP5q+3K23pual3pUdT/0e7khyIxXkGAI="}}}, |
| 66 | + {"text": "I''ll need to check what country you''re from to answer that question."}, {"toolUse": {"toolUseId": "tooluse_W9DaUFg4Tj2cRPpndqxWSg", |
| 67 | + "name": "get_user_country", "input": {}}}]}, {"role": "user", "content": [{"toolResult": {"toolUseId": "tooluse_W9DaUFg4Tj2cRPpndqxWSg", |
| 68 | + "content": [{"text": "Mexico"}], "status": "success"}}]}], "system": [], "inferenceConfig": {}, "toolConfig": {"tools": |
| 69 | + [{"toolSpec": {"name": "get_user_country", "inputSchema": {"json": {"additionalProperties": false, "properties": {}, |
| 70 | + "type": "object"}}}}]}, "additionalModelRequestFields": {"thinking": {"type": "enabled", "budget_tokens": 1024}}}' |
| 71 | + headers: |
| 72 | + amz-sdk-invocation-id: |
| 73 | + - !!binary | |
| 74 | + ZWM5NzBkMzYtZTZhYi00MjdlLWFmMzItMTBhNTc2ZjBiMWNl |
| 75 | + amz-sdk-request: |
| 76 | + - !!binary | |
| 77 | + YXR0ZW1wdD0x |
| 78 | + content-length: |
| 79 | + - '1399' |
| 80 | + content-type: |
| 81 | + - !!binary | |
| 82 | + YXBwbGljYXRpb24vanNvbg== |
| 83 | + method: POST |
| 84 | + uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/us.anthropic.claude-3-7-sonnet-20250219-v1%3A0/converse |
| 85 | + response: |
| 86 | + headers: |
| 87 | + connection: |
| 88 | + - keep-alive |
| 89 | + content-length: |
| 90 | + - '756' |
| 91 | + content-type: |
| 92 | + - application/json |
| 93 | + parsed_body: |
| 94 | + metrics: |
| 95 | + latencyMs: 4529 |
| 96 | + output: |
| 97 | + message: |
| 98 | + content: |
| 99 | + - text: |- |
| 100 | + Based on your location in Mexico, the largest city is Mexico City (Ciudad de México). It's not only the capital but also the most populous city in Mexico with a metropolitan area population of over 21 million people, making it one of the largest urban agglomerations in the world. |
| 101 | +
|
| 102 | + Mexico City is an important cultural, financial, and political center for the country and has a rich history dating back to the Aztec empire when it was known as Tenochtitlán. |
| 103 | + role: assistant |
| 104 | + stopReason: end_turn |
| 105 | + usage: |
| 106 | + cacheReadInputTokenCount: 0 |
| 107 | + cacheReadInputTokens: 0 |
| 108 | + cacheWriteInputTokenCount: 0 |
| 109 | + cacheWriteInputTokens: 0 |
| 110 | + inputTokens: 539 |
| 111 | + outputTokens: 106 |
| 112 | + totalTokens: 645 |
| 113 | + status: |
| 114 | + code: 200 |
| 115 | + message: OK |
| 116 | +version: 1 |
0 commit comments