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.0
 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": "CtYBAR/MhbZp5ZDuhyHbftCznQzuyaI5rPK4iL6DCOZOAmHm2hvqsydZ6Zw+07tzqcdyvt0Xj3Jnh9XktQUlSX7lLhgt9ChPZYfBbTUMPnBujEDNLtWhe8/7rZrBKchffl35uHsDpucQ+I+KC9Wj6NzQyaUr/TlGlyGsEXG6RotaEkVFjgxkbwLI7Ibh7CKjSQfqRd5cRz3ANCA9Td7OGCMRGXFGVwm8iC9lmhRtIOFUGxP2WyU/Nnsr3wGO9i4q+3gK17X2+rNbqMKHgb0W0anxkm4kfn8EDw=="
 42                },
 43                {
 44                  "functionCall": {
 45                    "name": "multiply",
 46                    "args": {
 47                      "b": 3,
 48                      "a": 2
 49                    }
 50                  }
 51                }
 52              ]
 53            },
 54            "finishReason": "STOP",
 55            "avgLogprobs": -0.949029541015625
 56          }
 57        ],
 58        "usageMetadata": {
 59          "promptTokenCount": 60,
 60          "candidatesTokenCount": 10,
 61          "totalTokenCount": 129,
 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": 59
 76        },
 77        "modelVersion": "gemini-2.5-flash",
 78        "createTime": "2025-10-10T17:53:33.301138Z",
 79        "responseId": "HUjpaNKwEoav1tEPtZXfiQc"
 80      }
 81    headers:
 82      Content-Type:
 83      - application/json; charset=UTF-8
 84    status: 200 OK
 85    code: 200
 86    duration: 1.033450667s
 87- id: 1
 88  request:
 89    proto: HTTP/1.1
 90    proto_major: 1
 91    proto_minor: 1
 92    content_length: 1173
 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":"add","name":"add"}},{"functionCall":{"args":{"a":2,"b":3},"id":"multiply","name":"multiply"}}],"role":"model"},{"parts":[{"functionResponse":{"id":"add","name":"add","response":{"result":"5"}}},{"functionResponse":{"id":"multiply","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.0
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": "The sum of 2 and 3 is 5.\nThe product of 2 and 3 is 6.",
118                  "thoughtSignature": "CvMBAR/Mhba8Or3cizXO+bltJNPmX3Egn41Nag1M8hjUlogeXAA1V3QbRuM3otL2FTMLckFiUxhtWnp8SPfF6wzh2jMPbhKOt9YOgRzjxpqqpH+HmvDhiWiuc0mxsZiazLNjv6M98WD3sBPK4RGLV2QtnWKJAda6NdgAITqFljR/T2efQMopsaStKTWTu2vzO8mm5vUkuYo7uX1gJLJya6+Hp2BWDEliJBDksLt52BJCo9Y7es21bHfMYq1cAytPHX/PbWl975i7uogyW0tMaT+FID0RMAWAivgKum8b8dwb26UMv5jXaHnNLxvnulBGFWfynXYc"
119                }
120              ]
121            },
122            "finishReason": "STOP",
123            "avgLogprobs": -0.5109736633300781
124          }
125        ],
126        "usageMetadata": {
127          "promptTokenCount": 76,
128          "candidatesTokenCount": 25,
129          "totalTokenCount": 151,
130          "trafficType": "ON_DEMAND",
131          "promptTokensDetails": [
132            {
133              "modality": "TEXT",
134              "tokenCount": 76
135            }
136          ],
137          "candidatesTokensDetails": [
138            {
139              "modality": "TEXT",
140              "tokenCount": 25
141            }
142          ],
143          "thoughtsTokenCount": 50
144        },
145        "modelVersion": "gemini-2.5-flash",
146        "createTime": "2025-10-10T17:53:34.331007Z",
147        "responseId": "HkjpaP-ZFLqK1tEPkOGW2Qo"
148      }
149    headers:
150      Content-Type:
151      - application/json; charset=UTF-8
152    status: 200 OK
153    code: 200
154    duration: 816.680917ms