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.33.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                      "a": 2,
 38                      "b": 3
 39                    }
 40                  },
 41                  "thoughtSignature": "CqECAePx/16hu6jpQBsua/6D0znPjMbbAuwTIAxACow0BHlZjpuJ2bAGyr7Wo7paE6FNx84jcAd1AMLIJAWscUNukGCRiDORASgswHP16BSSB6jN5dLjTJ0UpUoxESXEW4U0iyrruAkortreKykTPMnW63wWjao8KQESbO/Q7g7WOQPGUzpmOCw9cvKt6I/DRZLjiJ1S8BmgEbc8ix2C4YBguza0iJ28V3ggewHiXumC3RxijchXLLkLx9Y5ww3XoJk1QaaWN3puEeWyVpEOQQJHa0pQVLYIp+IkQ0t0oe3jKDI05FBjn+h1lvbHoPuImyLtjUZFAMBqh76BWHQAYsfVUEzzSWplygLX0RP+NABj/9jDMK22/+DjBnBpEL1dv0lXvQ=="
 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": -0.99647712707519531
 56          }
 57        ],
 58        "usageMetadata": {
 59          "promptTokenCount": 60,
 60          "candidatesTokenCount": 10,
 61          "totalTokenCount": 140,
 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": 70
 76        },
 77        "modelVersion": "gemini-2.5-flash",
 78        "createTime": "2025-11-03T19:52:55.484773Z",
 79        "responseId": "FwgJaaXLHe2iptQP__zTsAs"
 80      }
 81    headers:
 82      Content-Type:
 83      - application/json; charset=UTF-8
 84    status: 200 OK
 85    code: 200
 86    duration: 1.145860833s
 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.33.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. The product of 2 and 3 is 6."
118                }
119              ]
120            },
121            "finishReason": "STOP",
122            "avgLogprobs": -0.047055284182230629
123          }
124        ],
125        "usageMetadata": {
126          "promptTokenCount": 76,
127          "candidatesTokenCount": 24,
128          "totalTokenCount": 100,
129          "trafficType": "ON_DEMAND",
130          "promptTokensDetails": [
131            {
132              "modality": "TEXT",
133              "tokenCount": 76
134            }
135          ],
136          "candidatesTokensDetails": [
137            {
138              "modality": "TEXT",
139              "tokenCount": 24
140            }
141          ]
142        },
143        "modelVersion": "gemini-2.5-flash",
144        "createTime": "2025-11-03T19:52:56.654104Z",
145        "responseId": "GAgJaZj2J4jK5OMPiMqt0Qg"
146      }
147    headers:
148      Content-Type:
149      - application/json; charset=UTF-8
150    status: 200 OK
151    code: 200
152    duration: 714.085958ms