multi_tool.yaml

  1---
  2version: 2
  3interactions:
  4- id: 0
  5  request:
  6    proto: HTTP/1.1
  7    proto_major: 1
  8    proto_minor: 1
  9    content_length: 826
 10    host: us-east5-aiplatform.googleapis.com
 11    body: |
 12      {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parameters":{"properties":{"a":{"description":"first number","type":"INTEGER"},"b":{"description":"second number","type":"INTEGER"}},"required":["a","b"],"type":"OBJECT"}},{"description":"Multiply two numbers","name":"multiply","parameters":{"properties":{"a":{"description":"first number","type":"INTEGER"},"b":{"description":"second number","type":"INTEGER"}},"required":["a","b"],"type":"OBJECT"}}]}]}
 13    headers:
 14      Content-Type:
 15      - application/json
 16      User-Agent:
 17      - google-genai-sdk/1.29.0 gl-go/go1.25.1
 18    url: https://us-east5-aiplatform.googleapis.com/v1beta1/projects/fantasy-playground-472418/locations/us-east5/publishers/google/models/gemini-2.5-flash:generateContent
 19    method: POST
 20  response:
 21    proto: HTTP/2.0
 22    proto_major: 2
 23    proto_minor: 0
 24    content_length: -1
 25    uncompressed: true
 26    body: |
 27      {
 28        "candidates": [
 29          {
 30            "content": {
 31              "role": "model",
 32              "parts": [
 33                {
 34                  "functionCall": {
 35                    "name": "add",
 36                    "args": {
 37                      "b": 3,
 38                      "a": 2
 39                    }
 40                  },
 41                  "thoughtSignature": "CuACAePx/153kf8ikIzjnbSUf9jLxFZAf53a2GQYy4mUIqUl077OLhKwcyMd2YnG1/umJQZK8aqE6kdtgJG7sqpuDFZuFmEOqjgc1O3MxE4S+TaBZSa5wS/KAA05t4aGvS8TpkEttdy3u6wfIv6y8LM8A7LHn04qC9gswllmAiZ9iQn72RDWDgS7o2/ciprExjiDQMkU+m5yk3eRkXm1ovs9oNDNoDqlTTJnN0jtu2YgYtsxB/mwKBdA3MjSKwsiuIVc5fJj8970xQrfEmsA94QSGUQ9MNCUkB6kAUsFt3wQQ07X/Q3bYmfyud0OP/dB9HIM4xyVkayDrrVkbAOKD/1u8nKMGkPA5G/0+DaDVU4ZAqhCRGQAtHYRWYhwUZ4DICXJAqhBk9iTLIHvglDMaw4sKDZHqIlVRNnjvsx4nOoirR2S2Wpm3mKoEmCPnFGcQwRV9yJNY5/JwDquRAcwU9q1ug=="
 42                },
 43                {
 44                  "functionCall": {
 45                    "name": "multiply",
 46                    "args": {
 47                      "a": 2,
 48                      "b": 3
 49                    }
 50                  }
 51                }
 52              ]
 53            },
 54            "finishReason": "STOP",
 55            "avgLogprobs": -1.9749752044677735
 56          }
 57        ],
 58        "usageMetadata": {
 59          "promptTokenCount": 60,
 60          "candidatesTokenCount": 10,
 61          "totalTokenCount": 146,
 62          "trafficType": "ON_DEMAND",
 63          "promptTokensDetails": [
 64            {
 65              "modality": "TEXT",
 66              "tokenCount": 60
 67            }
 68          ],
 69          "candidatesTokensDetails": [
 70            {
 71              "modality": "TEXT",
 72              "tokenCount": 10
 73            }
 74          ],
 75          "thoughtsTokenCount": 76
 76        },
 77        "modelVersion": "gemini-2.5-flash",
 78        "createTime": "2025-10-23T06:56:24.603477Z",
 79        "responseId": "mNH5aNXqJMHDptQPtJigwQc"
 80      }
 81    headers:
 82      Content-Type:
 83      - application/json; charset=UTF-8
 84    status: 200 OK
 85    code: 200
 86    duration: 1.215592042s
 87- id: 1
 88  request:
 89    proto: HTTP/1.1
 90    proto_major: 1
 91    proto_minor: 1
 92    content_length: 1155
 93    host: us-east5-aiplatform.googleapis.com
 94    body: |
 95      {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"id":"1","name":"add"}},{"functionCall":{"args":{"a":2,"b":3},"id":"2","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"1","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"2","name":"multiply","response":{"result":"6"}}}],"role":"user"}],"generationConfig":{"maxOutputTokens":4000},"systemInstruction":{"parts":[{"text":"You are a helpful assistant. CRITICAL: Always use both add and multiply at the same time ALWAYS."}],"role":"user"},"toolConfig":{"functionCallingConfig":{"mode":"AUTO"}},"tools":[{"functionDeclarations":[{"description":"Add two numbers","name":"add","parameters":{"properties":{"a":{"description":"first number","type":"INTEGER"},"b":{"description":"second number","type":"INTEGER"}},"required":["a","b"],"type":"OBJECT"}},{"description":"Multiply two numbers","name":"multiply","parameters":{"properties":{"a":{"description":"first number","type":"INTEGER"},"b":{"description":"second number","type":"INTEGER"}},"required":["a","b"],"type":"OBJECT"}}]}]}
 96    headers:
 97      Content-Type:
 98      - application/json
 99      User-Agent:
100      - google-genai-sdk/1.29.0 gl-go/go1.25.1
101    url: https://us-east5-aiplatform.googleapis.com/v1beta1/projects/fantasy-playground-472418/locations/us-east5/publishers/google/models/gemini-2.5-flash:generateContent
102    method: POST
103  response:
104    proto: HTTP/2.0
105    proto_major: 2
106    proto_minor: 0
107    content_length: -1
108    uncompressed: true
109    body: |
110      {
111        "candidates": [
112          {
113            "content": {
114              "role": "model",
115              "parts": [
116                {
117                  "text": "2 + 3 = 5\n2 * 3 = 6",
118                  "thoughtSignature": "CsoBAePx/154N3gpceO1Pxh1IXX13o0HK5ftN5BUuyjfGfQi/778zwB+y0XPP47mlVhcC8YrYbdY9OCdsch6wLFdr8GW2Q/X0G7wvo5uCO+rxBCPgj0EJaQ36dnavIrM78MnwNT8JTFuNiifUYDO2Eek5//VNoFkZsbTfR0u6pHlX8odsl2zTqkihtwNkeun9UVCAkOE1J2royE0NUdFe5YQk6cMn/LboPV2NKVDWZxjvV6hlwV27nBoFqiH0r6zRT9AiKi55oTDlvwADA=="
119                }
120              ]
121            },
122            "finishReason": "STOP",
123            "avgLogprobs": -0.83015022277832029
124          }
125        ],
126        "usageMetadata": {
127          "promptTokenCount": 76,
128          "candidatesTokenCount": 15,
129          "totalTokenCount": 136,
130          "trafficType": "ON_DEMAND",
131          "promptTokensDetails": [
132            {
133              "modality": "TEXT",
134              "tokenCount": 76
135            }
136          ],
137          "candidatesTokensDetails": [
138            {
139              "modality": "TEXT",
140              "tokenCount": 15
141            }
142          ],
143          "thoughtsTokenCount": 45
144        },
145        "modelVersion": "gemini-2.5-flash",
146        "createTime": "2025-10-23T06:56:25.801186Z",
147        "responseId": "mdH5aKLzMMqZptQPrcWIuQM"
148      }
149    headers:
150      Content-Type:
151      - application/json; charset=UTF-8
152    status: 200 OK
153    code: 200
154    duration: 1.129055042s