Conheça a IA generativa com a API Gemini na Vertex AI: laboratório com desafio avaliações

18467 avaliações

Bejoy A. · Revisado há 7 days

Luis O. · Revisado há 7 days

Avilash K. · Revisado há 7 days

abakash r. · Revisado há 7 days

Kollipara P. · Revisado há 7 days

Shahyan M. · Revisado há 7 days

Ravindra Reddy A. · Revisado há 7 days

Jonathan D. · Revisado há 8 days

Mohammad N. · Revisado há 8 days

Hana L. · Revisado há 8 days

퀵랩 노트북 접속불가...여서크레딧만날리고 다시 재실행함 ㅠㅠ

시너겟 홍. · Revisado há 8 days

Carlos B. · Revisado há 8 days

Daniel B. · Revisado há 8 days

Ranjit N. · Revisado há 8 days

Ravindra Reddy A. · Revisado há 8 days

OK

Chakradhar S. · Revisado há 8 days

tudent_01_6afdebda885d@cloudshell:~ (qwiklabs-gcp-03-1bd85bf99d78)$ PROJECT_ID=qwiklabs-gcp-03-1bd85bf99d78 LOCATION=us-west1 API_ENDPOINT=${LOCATION}-aiplatform.googleapis.com MODEL_ID="gemini-2.5-flash" student_01_6afdebda885d@cloudshell:~ (qwiklabs-gcp-03-1bd85bf99d78)$ echo $LOCATION us-west1 student_01_6afdebda885d@cloudshell:~ (qwiklabs-gcp-03-1bd85bf99d78)$ curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" -d '{ "contents": [ { "role": "USER", "parts": { "text": "Why is the sky blue?" } } ] }' https://${API_ENDPOINT}/v1/projects/${PROJECT_ID}/locations/${LOCATION}/publishers/google/models/gemini-2.5-flash:generateContent { "candidates": [ { "content": { "role": "model", "parts": [ { "text": "The sky is blue due to a phenomenon called **Rayleigh scattering**, which describes how light interacts with particles much smaller than its wavelength. Here's a breakdown:\n\n1. **Sunlight is White Light:** Sunlight appears white to us, but it's actually made up of all the colors of the rainbow (the visible spectrum: red, orange, yellow, green, blue, indigo, violet). Each color has a different **wavelength** – red has the longest wavelength, and violet/blue have the shortest.\n\n2. **Earth's Atmosphere:** Our planet is surrounded by an atmosphere composed mainly of nitrogen (about 78%) and oxygen (about 21%) molecules, along with tiny amounts of other gases and particles. These molecules are much, much smaller than the wavelengths of visible light.\n\n3. **Rayleigh Scattering in Action:**\n * When sunlight enters the Earth's atmosphere, it collides with these tiny air molecules.\n * Instead of reflecting evenly, the light is **scattered** (bounced around) in all directions.\n * Rayleigh scattering dictates that **shorter wavelengths of light (like blue and violet) are scattered much more efficiently and intensely than longer wavelengths (like red and orange).** Blue light, for instance, is scattered about 10 times more than red light.\n\n4. **Why We See Blue:**\n * Because blue and violet light are scattered so much more effectively, they are bounced around the atmosphere and spread out across the sky.\n * This scattered blue light reaches our eyes from all directions, making the entire sky appear blue.\n\n5. **Why Not Violet?**\n * You might wonder why the sky isn't violet, as violet light has an even shorter wavelength than blue and should scatter more. There are two main reasons:\n * The sun actually emits slightly less violet light than blue light.\n * Our eyes are more sensitive to blue light than to violet light. We perceive more blue than violet, so the dominant color we see is blue.\n\n**What about other times?**\n\n* **Sunrises and Sunsets:** When the sun is low on the horizon, its light has to travel through a much thicker layer of the atmosphere. By the time the light reaches our eyes, most of the blue and violet light has been scattered away, leaving primarily the longer wavelengths (red, orange, yellow) to be seen directly.\n* **Space is Black:** In the vacuum of space, there are no air molecules to scatter sunlight, so the \"sky\" appears black, and stars are visible even during the day (if the sun isn't in your direct field of vision).\n* **Clouds are White/Grey:** Clouds are made of much larger water droplets or ice crystals. These larger particles scatter all wavelengths of visible light more or less equally (a phenomenon called Mie scattering), which results in the clouds appearing white or grey.\n\nSo, in essence, the sky is blue because our atmosphere is very good at scattering blue light." } ] }, "finishReason": "STOP", "avgLogprobs": -0.69543831975055892 } ], "usageMetadata": { "promptTokenCount": 6, "candidatesTokenCount": 643, "totalTokenCount": 1940, "trafficType": "ON_DEMAND", "promptTokensDetails": [ { "modality": "TEXT", "tokenCount": 6 } ], "candidatesTokensDetails": [ { "modality": "TEXT", "tokenCount": 643 } ], "thoughtsTokenCount": 1291 }, "modelVersion": "gemini-2.5-flash", "createTime": "2026-05-10T18:16:14.269469Z", "responseId": "bssAap25EJSnk-4PlbTe8As" } student_01_6afdebda885d@cloudshell:~ (qwiklabs-gcp-03-1bd85bf99d78)$

Embun K. · Revisado há 9 days

i did hit the api using curl but the web didnt recognize it tudent_01_6afdebda885d@cloudshell:~ (qwiklabs-gcp-03-1bd85bf99d78)$ PROJECT_ID=qwiklabs-gcp-03-1bd85bf99d78 LOCATION=us-west1 API_ENDPOINT=${LOCATION}-aiplatform.googleapis.com MODEL_ID="gemini-2.5-flash" student_01_6afdebda885d@cloudshell:~ (qwiklabs-gcp-03-1bd85bf99d78)$ echo $LOCATION us-west1 student_01_6afdebda885d@cloudshell:~ (qwiklabs-gcp-03-1bd85bf99d78)$ curl -X POST -H "Authorization: Bearer $(gcloud auth print-access-token)" -H "Content-Type: application/json" -d '{ "contents": [ { "role": "USER", "parts": { "text": "Why is the sky blue?" } } ] }' https://${API_ENDPOINT}/v1/projects/${PROJECT_ID}/locations/${LOCATION}/publishers/google/models/gemini-2.5-flash:generateContent { "candidates": [ { "content": { "role": "model", "parts": [ { "text": "The sky is blue due to a phenomenon called **Rayleigh scattering**, which describes how light interacts with particles much smaller than its wavelength. Here's a breakdown:\n\n1. **Sunlight is White Light:** Sunlight appears white to us, but it's actually made up of all the colors of the rainbow (the visible spectrum: red, orange, yellow, green, blue, indigo, violet). Each color has a different **wavelength** – red has the longest wavelength, and violet/blue have the shortest.\n\n2. **Earth's Atmosphere:** Our planet is surrounded by an atmosphere composed mainly of nitrogen (about 78%) and oxygen (about 21%) molecules, along with tiny amounts of other gases and particles. These molecules are much, much smaller than the wavelengths of visible light.\n\n3. **Rayleigh Scattering in Action:**\n * When sunlight enters the Earth's atmosphere, it collides with these tiny air molecules.\n * Instead of reflecting evenly, the light is **scattered** (bounced around) in all directions.\n * Rayleigh scattering dictates that **shorter wavelengths of light (like blue and violet) are scattered much more efficiently and intensely than longer wavelengths (like red and orange).** Blue light, for instance, is scattered about 10 times more than red light.\n\n4. **Why We See Blue:**\n * Because blue and violet light are scattered so much more effectively, they are bounced around the atmosphere and spread out across the sky.\n * This scattered blue light reaches our eyes from all directions, making the entire sky appear blue.\n\n5. **Why Not Violet?**\n * You might wonder why the sky isn't violet, as violet light has an even shorter wavelength than blue and should scatter more. There are two main reasons:\n * The sun actually emits slightly less violet light than blue light.\n * Our eyes are more sensitive to blue light than to violet light. We perceive more blue than violet, so the dominant color we see is blue.\n\n**What about other times?**\n\n* **Sunrises and Sunsets:** When the sun is low on the horizon, its light has to travel through a much thicker layer of the atmosphere. By the time the light reaches our eyes, most of the blue and violet light has been scattered away, leaving primarily the longer wavelengths (red, orange, yellow) to be seen directly.\n* **Space is Black:** In the vacuum of space, there are no air molecules to scatter sunlight, so the \"sky\" appears black, and stars are visible even during the day (if the sun isn't in your direct field of vision).\n* **Clouds are White/Grey:** Clouds are made of much larger water droplets or ice crystals. These larger particles scatter all wavelengths of visible light more or less equally (a phenomenon called Mie scattering), which results in the clouds appearing white or grey.\n\nSo, in essence, the sky is blue because our atmosphere is very good at scattering blue light." } ] }, "finishReason": "STOP", "avgLogprobs": -0.69543831975055892 } ], "usageMetadata": { "promptTokenCount": 6, "candidatesTokenCount": 643, "totalTokenCount": 1940, "trafficType": "ON_DEMAND", "promptTokensDetails": [ { "modality": "TEXT", "tokenCount": 6 } ], "candidatesTokensDetails": [ { "modality": "TEXT", "tokenCount": 643 } ], "thoughtsTokenCount": 1291 }, "modelVersion": "gemini-2.5-flash", "createTime": "2026-05-10T18:16:14.269469Z", "responseId": "bssAap25EJSnk-4PlbTe8As" } student_01_6afdebda885d@cloudshell:~ (qwiklabs-gcp-03-1bd85bf99d78)$

Embun K. · Revisado há 9 days

Seji T. · Revisado há 9 days

Aegis K. · Revisado há 9 days

venkatanagasaisri Krishna v. · Revisado há 9 days

Jayesh P. · Revisado há 9 days

Indrajit B. · Revisado há 9 days

서재원 G. · Revisado há 10 days

David C. · Revisado há 10 days

Não garantimos que as avaliações publicadas sejam de consumidores que compraram ou usaram os produtos. As avaliações não são verificadas pelo Google.