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      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
 18      - google-genai-sdk/1.49.0 gl-go/go1.26.1
 19    url: https://us-east5-aiplatform.googleapis.com/v1beta1/projects/fantasy-playground-472418/locations/us-east5/publishers/google/models/gemini-2.5-pro:generateContent
 20    method: POST
 21  response:
 22    proto: HTTP/2.0
 23    proto_major: 2
 24    proto_minor: 0
 25    content_length: -1
 26    uncompressed: true
 27    body: |
 28      {
 29        "candidates": [
 30          {
 31            "content": {
 32              "role": "model",
 33              "parts": [
 34                {
 35                  "functionCall": {
 36                    "name": "add",
 37                    "args": {
 38                      "a": 2,
 39                      "b": 3
 40                    }
 41                  },
 42                  "thoughtSignature": "CowCAY89a1/vAaqniXrmhElp8qu3tCETdO3UfyX6GAedsXE7vdfpKTvda4xMGK9wFBEmw0aN24fmJRBi5AmBiHSc9Vo9JMEjyusxOednzWJCXbVjmyyz2e7L8Y2XN4azmNC2YVxOIP00SBFByCBSz2Ev1cqQY1UYl+u9mtAC5PvlPx6gOTGFZdnN+0C8j9DkPpTgPqE4M/tD0NVZU7kVLk25+Bz+WvGUAhdstMDl2LZQ3NiTyeMr+QUu/e5BB8ePV/BbKIlMbQFOwKPmna4kOCaQPO31HfWGA0tJ2ZT4SyQEYj7vLrgQ4TyTfBG/NPFT7Ud37LZpSFY29312jvmR3aArX4nztAlsG6hpoAGFRg=="
 43                },
 44                {
 45                  "functionCall": {
 46                    "name": "multiply",
 47                    "args": {
 48                      "a": 2,
 49                      "b": 3
 50                    }
 51                  }
 52                }
 53              ]
 54            },
 55            "finishReason": "STOP",
 56            "avgLogprobs": -0.3190230131149292
 57          }
 58        ],
 59        "usageMetadata": {
 60          "promptTokenCount": 61,
 61          "candidatesTokenCount": 10,
 62          "totalTokenCount": 140,
 63          "trafficType": "ON_DEMAND",
 64          "promptTokensDetails": [
 65            {
 66              "modality": "TEXT",
 67              "tokenCount": 61
 68            }
 69          ],
 70          "candidatesTokensDetails": [
 71            {
 72              "modality": "TEXT",
 73              "tokenCount": 10
 74            }
 75          ],
 76          "thoughtsTokenCount": 69
 77        },
 78        "modelVersion": "gemini-2.5-pro",
 79        "createTime": "2026-03-12T18:06:32.920805Z",
 80        "responseId": "qACzaeWZOILU8eEP-5ez4QM"
 81      }
 82    headers:
 83      Content-Type:
 84      - application/json; charset=UTF-8
 85    status: 200 OK
 86    code: 200
 87    duration: 1.964643417s
 88- id: 1
 89  request:
 90    proto: HTTP/1.1
 91    proto_major: 1
 92    proto_minor: 1
 93    content_length: 1541
 94    host: us-east5-aiplatform.googleapis.com
 95    body: |
 96      {"contents":[{"parts":[{"text":"Add and multiply the number 2 and 3"}],"role":"user"},{"parts":[{"functionCall":{"args":{"a":2,"b":3},"id":"1","name":"add"},"thoughtSignature":"CowCAY89a1/vAaqniXrmhElp8qu3tCETdO3UfyX6GAedsXE7vdfpKTvda4xMGK9wFBEmw0aN24fmJRBi5AmBiHSc9Vo9JMEjyusxOednzWJCXbVjmyyz2e7L8Y2XN4azmNC2YVxOIP00SBFByCBSz2Ev1cqQY1UYl+u9mtAC5PvlPx6gOTGFZdnN+0C8j9DkPpTgPqE4M/tD0NVZU7kVLk25+Bz+WvGUAhdstMDl2LZQ3NiTyeMr+QUu/e5BB8ePV/BbKIlMbQFOwKPmna4kOCaQPO31HfWGA0tJ2ZT4SyQEYj7vLrgQ4TyTfBG/NPFT7Ud37LZpSFY29312jvmR3aArX4nztAlsG6hpoAGFRg=="},{"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"}}]}]}
 97    headers:
 98      Content-Type:
 99      - application/json
100      User-Agent:
101      - Charm-Fantasy/0.12.2 (https://charm.land/fantasy)
102      - google-genai-sdk/1.49.0 gl-go/go1.26.1
103    url: https://us-east5-aiplatform.googleapis.com/v1beta1/projects/fantasy-playground-472418/locations/us-east5/publishers/google/models/gemini-2.5-pro:generateContent
104    method: POST
105  response:
106    proto: HTTP/2.0
107    proto_major: 2
108    proto_minor: 0
109    content_length: -1
110    uncompressed: true
111    body: |
112      {
113        "candidates": [
114          {
115            "content": {
116              "role": "model",
117              "parts": [
118                {
119                  "text": "The sum of 2 and 3 is 5, and the product is 6.",
120                  "thoughtSignature": "CscBAY89a1/2yqSCpyPzXmW7CFH+/u94LfU2YYw6FljZU5ciMqeXif3lMN/IUG5eDvETLtNszUSQZp/itemcLocGi9osVT7T5kv2+kOp7saHIZrU0+nmZHZef+u4lOd+mTdbPLkkv/FGBba1wmwsDNJb2h/xm/BxDuJWvDs06A+YF0b6Djkv84oHaQOqPSiUdi2GdyofLc185pCwoPCMlTjCPgmwJ9oiXCl40vjyjvT6daatkW/RgtWutVBMNDcBkKWFih1rKoXYrw=="
121                }
122              ]
123            },
124            "finishReason": "STOP",
125            "avgLogprobs": -0.33660158358122172
126          }
127        ],
128        "usageMetadata": {
129          "promptTokenCount": 146,
130          "candidatesTokenCount": 19,
131          "totalTokenCount": 206,
132          "trafficType": "ON_DEMAND",
133          "promptTokensDetails": [
134            {
135              "modality": "TEXT",
136              "tokenCount": 146
137            }
138          ],
139          "candidatesTokensDetails": [
140            {
141              "modality": "TEXT",
142              "tokenCount": 19
143            }
144          ],
145          "thoughtsTokenCount": 41
146        },
147        "modelVersion": "gemini-2.5-pro",
148        "createTime": "2026-03-12T18:06:34.881582Z",
149        "responseId": "qgCzaa7nNZeq8eEP6tq10Q4"
150      }
151    headers:
152      Content-Type:
153      - application/json; charset=UTF-8
154    status: 200 OK
155    code: 200
156    duration: 1.597976042s