Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
interactions:
- request:
body: '{"contents": [{"parts": [{"text": "What is the current population of Tokyo,
Japan?"}], "role": "user"}], "tools": [{"googleSearch": {}}], "generationConfig":
{"maxOutputTokens": 300}}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '183'
Content-Type:
- application/json
Host:
- generativelanguage.googleapis.com
user-agent:
- google-genai-sdk/1.68.0 gl-python/3.13.3
x-goog-api-client:
- google-genai-sdk/1.68.0 gl-python/3.13.3
method: POST
uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-001:streamGenerateContent?alt=sse
response:
body:
string: "data: {\"candidates\": [{\"content\": {\"parts\": [{\"text\": \"The
population of Tokyo\"}],\"role\": \"model\"},\"groundingMetadata\": {}}],\"usageMetadata\":
{\"promptTokenCount\": 11,\"totalTokenCount\": 11,\"promptTokensDetails\":
[{\"modality\": \"TEXT\",\"tokenCount\": 11}]},\"modelVersion\": \"gemini-2.0-flash-001\",\"responseId\":
\"cXHFaaixONjR6MEP7r7FsQg\"}\r\n\r\ndata: {\"candidates\": [{\"content\":
{\"parts\": [{\"text\": \" can be defined in different ways, depending on
the area being considered.\"}],\"role\": \"model\"},\"groundingMetadata\":
{}}],\"usageMetadata\": {\"promptTokenCount\": 11,\"totalTokenCount\": 11,\"promptTokensDetails\":
[{\"modality\": \"TEXT\",\"tokenCount\": 11}]},\"modelVersion\": \"gemini-2.0-flash-001\",\"responseId\":
\"cXHFaaixONjR6MEP7r7FsQg\"}\r\n\r\ndata: {\"candidates\": [{\"content\":
{\"parts\": [{\"text\": \" Here are a few estimates for 2026:\\n\\n* **Urban\"}],\"role\":
\"model\"},\"groundingMetadata\": {}}],\"usageMetadata\": {\"promptTokenCount\":
11,\"totalTokenCount\": 11,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\":
11}]},\"modelVersion\": \"gemini-2.0-flash-001\",\"responseId\": \"cXHFaaixONjR6MEP7r7FsQg\"}\r\n\r\ndata:
{\"candidates\": [{\"content\": {\"parts\": [{\"text\": \" Agglomeration:**
Approximately 36,953,600. Another source states 36,954,\"}],\"role\": \"model\"},\"groundingMetadata\":
{}}],\"usageMetadata\": {\"promptTokenCount\": 11,\"totalTokenCount\": 11,\"promptTokensDetails\":
[{\"modality\": \"TEXT\",\"tokenCount\": 11}]},\"modelVersion\": \"gemini-2.0-flash-001\",\"responseId\":
\"cXHFaaixONjR6MEP7r7FsQg\"}\r\n\r\ndata: {\"candidates\": [{\"content\":
{\"parts\": [{\"text\": \"000. This estimate includes Tokyo's population in
addition to adjacent suburban areas.\\n* **\"}],\"role\": \"model\"},\"groundingMetadata\":
{}}],\"usageMetadata\": {\"promptTokenCount\": 11,\"totalTokenCount\": 11,\"promptTokensDetails\":
[{\"modality\": \"TEXT\",\"tokenCount\": 11}]},\"modelVersion\": \"gemini-2.0-flash-001\",\"responseId\":
\"cXHFaaixONjR6MEP7r7FsQg\"}\r\n\r\ndata: {\"candidates\": [{\"content\":
{\"parts\": [{\"text\": \"City Proper:** In 2023, the population of the city
proper was over 14 million. Another source states that the population in 2023
was 14,085,\"}],\"role\": \"model\"},\"groundingMetadata\": {}}],\"usageMetadata\":
{\"promptTokenCount\": 11,\"totalTokenCount\": 11,\"promptTokensDetails\":
[{\"modality\": \"TEXT\",\"tokenCount\": 11}]},\"modelVersion\": \"gemini-2.0-flash-001\",\"responseId\":
\"cXHFaaixONjR6MEP7r7FsQg\"}\r\n\r\ndata: {\"candidates\": [{\"content\":
{\"parts\": [{\"text\": \"890.\\n* **Metropolitan Area:** A UN report states
that the population of the Tokyo metropolitan area is 33.4 million.\\n\"}],\"role\":
\"model\"},\"finishReason\": \"STOP\",\"groundingMetadata\": {\"searchEntryPoint\":
{\"renderedContent\": \"\\u003cstyle\\u003e\\n.container {\\n align-items:
center;\\n border-radius: 8px;\\n display: flex;\\n font-family: Google
Sans, Roboto, sans-serif;\\n font-size: 14px;\\n line-height: 20px;\\n padding:
8px 12px;\\n}\\n.chip {\\n display: inline-block;\\n border: solid 1px;\\n
\ border-radius: 16px;\\n min-width: 14px;\\n padding: 5px 16px;\\n text-align:
center;\\n user-select: none;\\n margin: 0 8px;\\n -webkit-tap-highlight-color:
transparent;\\n}\\n.carousel {\\n overflow: auto;\\n scrollbar-width: none;\\n
\ white-space: nowrap;\\n margin-right: -12px;\\n}\\n.headline {\\n display:
flex;\\n margin-right: 4px;\\n}\\n.gradient-container {\\n position: relative;\\n}\\n.gradient
{\\n position: absolute;\\n transform: translate(3px, -9px);\\n height:
36px;\\n width: 9px;\\n}\\n@media (prefers-color-scheme: light) {\\n .container
{\\n background-color: #fafafa;\\n box-shadow: 0 0 0 1px #0000000f;\\n
\ }\\n .headline-label {\\n color: #1f1f1f;\\n }\\n .chip {\\n background-color:
#ffffff;\\n border-color: #d2d2d2;\\n color: #5e5e5e;\\n text-decoration:
none;\\n }\\n .chip:hover {\\n background-color: #f2f2f2;\\n }\\n .chip:focus
{\\n background-color: #f2f2f2;\\n }\\n .chip:active {\\n background-color:
#d8d8d8;\\n border-color: #b6b6b6;\\n }\\n .logo-dark {\\n display:
none;\\n }\\n .gradient {\\n background: linear-gradient(90deg, #fafafa
15%, #fafafa00 100%);\\n }\\n}\\n@media (prefers-color-scheme: dark) {\\n
\ .container {\\n background-color: #1f1f1f;\\n box-shadow: 0 0 0 1px
#ffffff26;\\n }\\n .headline-label {\\n color: #fff;\\n }\\n .chip
{\\n background-color: #2c2c2c;\\n border-color: #3c4043;\\n color:
#fff;\\n text-decoration: none;\\n }\\n .chip:hover {\\n background-color:
#353536;\\n }\\n .chip:focus {\\n background-color: #353536;\\n }\\n
\ .chip:active {\\n background-color: #464849;\\n border-color: #53575b;\\n
\ }\\n .logo-light {\\n display: none;\\n }\\n .gradient {\\n background:
linear-gradient(90deg, #1f1f1f 15%, #1f1f1f00 100%);\\n }\\n}\\n\\u003c/style\\u003e\\n\\u003cdiv
class=\\\"container\\\"\\u003e\\n \\u003cdiv class=\\\"headline\\\"\\u003e\\n
\ \\u003csvg class=\\\"logo-light\\\" width=\\\"18\\\" height=\\\"18\\\"
viewBox=\\\"9 9 35 35\\\" fill=\\\"none\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"\\u003e\\n
\ \\u003cpath fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M42.8622
27.0064C42.8622 25.7839 42.7525 24.6084 42.5487 23.4799H26.3109V30.1568H35.5897C35.1821
32.3041 33.9596 34.1222 32.1258 35.3448V39.6864H37.7213C40.9814 36.677 42.8622
32.2571 42.8622 27.0064V27.0064Z\\\" fill=\\\"#4285F4\\\"/\\u003e\\n \\u003cpath
fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M26.3109 43.8555C30.9659
43.8555 34.8687 42.3195 37.7213 39.6863L32.1258 35.3447C30.5898 36.3792 28.6306
37.0061 26.3109 37.0061C21.8282 37.0061 18.0195 33.9811 16.6559 29.906H10.9194V34.3573C13.7563
39.9841 19.5712 43.8555 26.3109 43.8555V43.8555Z\\\" fill=\\\"#34A853\\\"/\\u003e\\n
\ \\u003cpath fill-rule=\\\"evenodd\\\" clip-rule=\\\"evenodd\\\" d=\\\"M16.6559
29.8904C16.3111 28.8559 16.1074 27.7588 16.1074 26.6146C16.1074 25.4704 16.3111
24.3733 16.6559 23.3388V18.8875H10.9194C9.74388 21.2072 9.06992 23.8247 9.06992
26.6146C9.06992 29.4045 9.74388 32.022 10.9194 34.3417L15.3864 30.8621L16.6559
29.8904V29.8904Z\\\" fill=\\\"#FBBC05\\\"/\\u003e\\n \\u003cpath fill-rule=\\\"evenodd\\\"
clip-rule=\\\"evenodd\\\" d=\\\"M26.3109 16.2386C28.85 16.2386 31.107 17.1164
32.9095 18.8091L37.8466 13.8719C34.853 11.082 30.9659 9.3736 26.3109 9.3736C19.5712
9.3736 13.7563 13.245 10.9194 18.8875L16.6559 23.3388C18.0195 19.2636 21.8282
16.2386 26.3109 16.2386V16.2386Z\\\" fill=\\\"#EA4335\\\"/\\u003e\\n \\u003c/svg\\u003e\\n
\ \\u003csvg class=\\\"logo-dark\\\" width=\\\"18\\\" height=\\\"18\\\"
viewBox=\\\"0 0 48 48\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"\\u003e\\n
\ \\u003ccircle cx=\\\"24\\\" cy=\\\"23\\\" fill=\\\"#FFF\\\" r=\\\"22\\\"/\\u003e\\n
\ \\u003cpath d=\\\"M33.76 34.26c2.75-2.56 4.49-6.37 4.49-11.26 0-.89-.08-1.84-.29-3H24.01v5.99h8.03c-.4
2.02-1.5 3.56-3.07 4.56v.75l3.91 2.97h.88z\\\" fill=\\\"#4285F4\\\"/\\u003e\\n
\ \\u003cpath d=\\\"M15.58 25.77A8.845 8.845 0 0 0 24 31.86c1.92 0 3.62-.46
4.97-1.31l4.79 3.71C31.14 36.7 27.65 38 24 38c-5.93 0-11.01-3.4-13.45-8.36l.17-1.01
4.06-2.85h.8z\\\" fill=\\\"#34A853\\\"/\\u003e\\n \\u003cpath d=\\\"M15.59
20.21a8.864 8.864 0 0 0 0 5.58l-5.03 3.86c-.98-2-1.53-4.25-1.53-6.64 0-2.39.55-4.64
1.53-6.64l1-.22 3.81 2.98.22 1.08z\\\" fill=\\\"#FBBC05\\\"/\\u003e\\n \\u003cpath
d=\\\"M24 14.14c2.11 0 4.02.75 5.52 1.98l4.36-4.36C31.22 9.43 27.81 8 24 8c-5.93
0-11.01 3.4-13.45 8.36l5.03 3.85A8.86 8.86 0 0 1 24 14.14z\\\" fill=\\\"#EA4335\\\"/\\u003e\\n
\ \\u003c/svg\\u003e\\n \\u003cdiv class=\\\"gradient-container\\\"\\u003e\\u003cdiv
class=\\\"gradient\\\"\\u003e\\u003c/div\\u003e\\u003c/div\\u003e\\n \\u003c/div\\u003e\\n
\ \\u003cdiv class=\\\"carousel\\\"\\u003e\\n \\u003ca class=\\\"chip\\\"
href=\\\"https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQEJnHGvpZY9FHXRAKLap3Y-n-znEofWXB-8WZ_rCNsOCdgVtNzgHdiNwV9_uJvR8zu49TZdqIiH2Kw4LTC1iKfuZErL7ytdzRX1Oc4vrjwvQUzYgDy8K4Xqa1XVNrlnV4lZpa9o3Rvfd5pNIXcR3vmQJ100cP2plWlNa2ad0FFg2C5YKSmB1TNyCnkNtSjFKW19WmqT3NRZNSpWDgJmumkRGqoP\\\"\\u003ecurrent
population of Tokyo Japan\\u003c/a\\u003e\\n \\u003ca class=\\\"chip\\\"
href=\\\"https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQH8yiLATSIW0I_Br2IFHh7ZBLJph6YXK_5dlg6zNx2Weis4S4HT8GMbVH10J8vubrJc4x_dNBStzJA6JuYNL-F5QOEw6yNEk8jw8URuARBvRGIsIXJiKT5ejiY3z_YDPj0wUxBOzjL_3_pCVDKSsG3Ss2VgSLUfXJKyIomtumelU1N2evFDXHyVekm9blABymCS-YX5FyyklbNwZpvr\\\"\\u003eTokyo
Japan population 2026\\u003c/a\\u003e\\n \\u003c/div\\u003e\\n\\u003c/div\\u003e\\n\"},\"groundingChunks\":
[{\"web\": {\"uri\": \"https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQGfY6De1vUdeoQ_7yxMcRxmoU1jXGTFpmsCecctoPecepIwqMdbvgd1ePeHcaGydZBKoEO9wlq_RQmPCUy_EY6EvYNBwE54f5zZWN3w9wSM5wm3ZRvCrU4SDxW7_ovEwEVIes8-fncBJKbjH0QDdQ==\",\"title\":
\"worldpopulationreview.com\"}},{\"web\": {\"uri\": \"https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQGM_lsMwoLVzOx-O0xoK85P26DFdWGglx9-2cIyFRxmrr14HVAcW-btryDkExzGyZsBVmdV5NidXH8slM6JC3bzivhJ0eqsldjMW65NikgfvWxp3HQJuSDiNi8hrLJaFHsf28WJOIDd1irMmiA-DpK7Ls4s4Q3-Toh4VstxFQhpT0g8\",\"title\":
\"macrotrends.net\"}},{\"web\": {\"uri\": \"https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQFhiyRWzYP55hXrg6JQ6i5ilTKqVY_4KOoj7Z4B_gpXdr9fkTuWhv7aGiAkc2raQPwmTqhCx6YxxwzDX6JH1TbNnqI0dqTYTc5Rn1gdVZR2kJT8RgOF7gCznuMpbgk=\",\"title\":
\"wikipedia.org\"}},{\"web\": {\"uri\": \"https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQGF1ztZcIRZZewcstfjPGwlmKrDiMVs9iIOmseEzKZanyJ2MDmxH0a8GIQrxiuTV3grwI2wM9MWurduSdZRUD4quUtAtWnZCfngk6iaS6W8Mu_2GG4PHygNIShbpZNqWfw7XhOY55oosA==\",\"title\":
\"datacommons.org\"}},{\"web\": {\"uri\": \"https://vertexaisearch.cloud.google.com/grounding-api-redirect/AUZIYQG9biqQ4AqplO6fKM3HR3c5txhgzSCe1Dtyoctv4pNS1layNT5Wpm9x-4syGf6kEuJdI9jtWiTgSqffa_NstcLVEL1t4eYTXt5O91tiL8SXVQlKFiJDJq1w9-3VX8Hr4SBc8nAtwUo=\",\"title\":
\"nippon.com\"}}],\"groundingSupports\": [{\"segment\": {\"endIndex\": 96,\"text\":
\"The population of Tokyo can be defined in different ways, depending on the
area being considered\"},\"groundingChunkIndices\": [0],\"confidenceScores\":
[0.5695162]},{\"segment\": {\"startIndex\": 134,\"endIndex\": 187,\"text\":
\"* **Urban Agglomeration:** Approximately 36,953,600\"},\"groundingChunkIndices\":
[0],\"confidenceScores\": [0.7969141]},{\"segment\": {\"startIndex\": 189,\"endIndex\":
221,\"text\": \"Another source states 36,954,000\"},\"groundingChunkIndices\":
[1],\"confidenceScores\": [0.44627395]},{\"segment\": {\"startIndex\": 223,\"endIndex\":
303,\"text\": \"This estimate includes Tokyo's population in addition to adjacent
suburban areas\"},\"groundingChunkIndices\": [0],\"confidenceScores\": [0.8972164]},{\"segment\":
{\"startIndex\": 305,\"endIndex\": 388,\"text\": \"* **City Proper:** In
2023, the population of the city proper was over 14 million\"},\"groundingChunkIndices\":
[2],\"confidenceScores\": [0.9636004]},{\"segment\": {\"startIndex\": 390,\"endIndex\":
454,\"text\": \"Another source states that the population in 2023 was 14,085,890\"},\"groundingChunkIndices\":
[3],\"confidenceScores\": [0.6583797]},{\"segment\": {\"startIndex\": 456,\"endIndex\":
568,\"text\": \"* **Metropolitan Area:** A UN report states that the population
of the Tokyo metropolitan area is 33.4 million\"},\"groundingChunkIndices\":
[4],\"confidenceScores\": [0.92047733]}],\"retrievalMetadata\": {},\"webSearchQueries\":
[\"current population of Tokyo Japan\",\"Tokyo Japan population 2026\"]}}],\"usageMetadata\":
{\"promptTokenCount\": 10,\"candidatesTokenCount\": 162,\"totalTokenCount\":
172,\"promptTokensDetails\": [{\"modality\": \"TEXT\",\"tokenCount\": 10}],\"candidatesTokensDetails\":
[{\"modality\": \"TEXT\",\"tokenCount\": 162}]},\"modelVersion\": \"gemini-2.0-flash-001\",\"responseId\":
\"cXHFaaixONjR6MEP7r7FsQg\"}\r\n\r\n"
headers:
Alt-Svc:
- h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Content-Disposition:
- attachment
Content-Type:
- text/event-stream
Date:
- Thu, 26 Mar 2026 17:48:35 GMT
Server:
- scaffolding on HTTPServer2
Server-Timing:
- gfet4t7; dur=1976
Transfer-Encoding:
- chunked
Vary:
- Origin
- X-Origin
- Referer
X-Content-Type-Options:
- nosniff
X-Frame-Options:
- SAMEORIGIN
X-XSS-Protection:
- '0'
status:
code: 200
message: OK
version: 1
Loading
Loading