|
| 1 | +interactions: |
| 2 | +- request: |
| 3 | + body: |- |
| 4 | + { |
| 5 | + "contents": [ |
| 6 | + { |
| 7 | + "role": "user", |
| 8 | + "parts": [ |
| 9 | + { |
| 10 | + "text": "Get weather details in New Delhi and San Francisco?" |
| 11 | + } |
| 12 | + ] |
| 13 | + }, |
| 14 | + { |
| 15 | + "role": "model", |
| 16 | + "parts": [ |
| 17 | + { |
| 18 | + "functionCall": { |
| 19 | + "name": "get_current_weather", |
| 20 | + "args": { |
| 21 | + "location": "New Delhi" |
| 22 | + } |
| 23 | + } |
| 24 | + }, |
| 25 | + { |
| 26 | + "functionCall": { |
| 27 | + "name": "get_current_weather", |
| 28 | + "args": { |
| 29 | + "location": "San Francisco" |
| 30 | + } |
| 31 | + } |
| 32 | + } |
| 33 | + ] |
| 34 | + }, |
| 35 | + { |
| 36 | + "role": "user", |
| 37 | + "parts": [ |
| 38 | + { |
| 39 | + "functionResponse": { |
| 40 | + "name": "get_current_weather", |
| 41 | + "response": { |
| 42 | + "content": "{\"temperature\": 35, \"unit\": \"C\"}" |
| 43 | + } |
| 44 | + } |
| 45 | + }, |
| 46 | + { |
| 47 | + "functionResponse": { |
| 48 | + "name": "get_current_weather", |
| 49 | + "response": { |
| 50 | + "content": "{\"temperature\": 25, \"unit\": \"C\"}" |
| 51 | + } |
| 52 | + } |
| 53 | + }, |
| 54 | + { |
| 55 | + "text": "Please respond in French" |
| 56 | + } |
| 57 | + ] |
| 58 | + } |
| 59 | + ], |
| 60 | + "tools": [ |
| 61 | + { |
| 62 | + "functionDeclarations": [ |
| 63 | + { |
| 64 | + "name": "get_current_weather", |
| 65 | + "description": "Get the current weather in a given location", |
| 66 | + "parameters": { |
| 67 | + "type": 6, |
| 68 | + "properties": { |
| 69 | + "location": { |
| 70 | + "type": 1, |
| 71 | + "description": "The location for which to get the weather. It can be a city name, a city name and state, or a zip code. Examples: 'San Francisco', 'San Francisco, CA', '95616', etc." |
| 72 | + } |
| 73 | + }, |
| 74 | + "propertyOrdering": [ |
| 75 | + "location" |
| 76 | + ] |
| 77 | + } |
| 78 | + } |
| 79 | + ] |
| 80 | + } |
| 81 | + ] |
| 82 | + } |
| 83 | + headers: |
| 84 | + Accept: |
| 85 | + - '*/*' |
| 86 | + Accept-Encoding: |
| 87 | + - gzip, deflate |
| 88 | + Connection: |
| 89 | + - keep-alive |
| 90 | + Content-Length: |
| 91 | + - '1797' |
| 92 | + Content-Type: |
| 93 | + - application/json |
| 94 | + User-Agent: |
| 95 | + - python-requests/2.32.3 |
| 96 | + method: POST |
| 97 | + uri: https://us-central1-aiplatform.googleapis.com/v1/projects/fake-project/locations/us-central1/publishers/google/models/gemini-1.5-flash-002:generateContent?%24alt=json%3Benum-encoding%3Dint |
| 98 | + response: |
| 99 | + body: |
| 100 | + string: |- |
| 101 | + { |
| 102 | + "candidates": [ |
| 103 | + { |
| 104 | + "content": { |
| 105 | + "role": "model", |
| 106 | + "parts": [ |
| 107 | + { |
| 108 | + "text": "La temp\u00e9rature actuelle \u00e0 New Delhi est de 35 degr\u00e9s Celsius et \u00e0 San Francisco, de 25 degr\u00e9s Celsius.\n" |
| 109 | + } |
| 110 | + ] |
| 111 | + }, |
| 112 | + "finishReason": 1, |
| 113 | + "avgLogprobs": -0.13563571526454046 |
| 114 | + } |
| 115 | + ], |
| 116 | + "usageMetadata": { |
| 117 | + "promptTokenCount": 130, |
| 118 | + "candidatesTokenCount": 26, |
| 119 | + "totalTokenCount": 156, |
| 120 | + "promptTokensDetails": [ |
| 121 | + { |
| 122 | + "modality": 1, |
| 123 | + "tokenCount": 130 |
| 124 | + } |
| 125 | + ], |
| 126 | + "candidatesTokensDetails": [ |
| 127 | + { |
| 128 | + "modality": 1, |
| 129 | + "tokenCount": 26 |
| 130 | + } |
| 131 | + ] |
| 132 | + }, |
| 133 | + "modelVersion": "gemini-1.5-flash-002", |
| 134 | + "createTime": "2025-02-06T18:23:19.079289Z", |
| 135 | + "responseId": "F_6kZ7nrBNa5nvgP1YzPmQE" |
| 136 | + } |
| 137 | + headers: |
| 138 | + Content-Type: |
| 139 | + - application/json; charset=UTF-8 |
| 140 | + Transfer-Encoding: |
| 141 | + - chunked |
| 142 | + Vary: |
| 143 | + - Origin |
| 144 | + - X-Origin |
| 145 | + - Referer |
| 146 | + content-length: |
| 147 | + - '794' |
| 148 | + status: |
| 149 | + code: 200 |
| 150 | + message: OK |
| 151 | +version: 1 |
0 commit comments