Getting Started with the Gemini API in Agent Platform with cURL recensioni
65431 recensioni
good
vijay u. · Recensione inserita oltre 2 anni fa
best
Gayatri G. · Recensione inserita oltre 2 anni fa
geetha gayathri m. · Recensione inserita oltre 2 anni fa
Saheba A. · Recensione inserita oltre 2 anni fa
Parthita C. · Recensione inserita oltre 2 anni fa
Riya D. · Recensione inserita oltre 2 anni fa
Up against this firewall. Cannot proceed further. CANNOT SOLVE THIS. Will TRY Again. Ran this code in the exercise (3rd in line): %%bash MODEL_ID="gemini-1.0-pro" curl -X POST \ -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "Content-Type: application/json" \ https://${API_ENDPOINT}/v1/projects/${PROJECT_ID}/locations/${LOCATION}/publishers/google/models/${MODEL_ID}:streamGenerateContent \ -d '{ "contents": { "role": "USER", "parts": { "text": "Why is the sky blue?" } } }' Came up with the error: curl: (3) bad range in URL position 60: https://us-central1-aiplatform.googleapis.com/v1/projects/[qwiklabs-gcp-04-634a559125a9]/locations/us-central1/publishers/google/models/gemini-1.0-pro:streamGenerateContent ^ --------------------------------------------------------------------------- CalledProcessError Traceback (most recent call last) Cell In[26], line 1 ----> 1 get_ipython().run_cell_magic('bash', '', '\nMODEL_ID="gemini-1.0-pro"\n\ncurl -X POST \\\n -H "Authorization: Bearer $(gcloud auth print-access-token)" \\\n -H "Content-Type: application/json" \\\n https://${API_ENDPOINT}/v1/projects/${PROJECT_ID}/locations/${LOCATION}/publishers/google/models/${MODEL_ID}:streamGenerateContent \\\n -d \'{\n "contents": {\n "role": "USER",\n "parts": { "text": "Why is the sky blue?" }\n }\n }\'\n') File /opt/conda/lib/python3.10/site-packages/IPython/core/interactiveshell.py:2517, in InteractiveShell.run_cell_magic(self, magic_name, line, cell) 2515 with self.builtin_trap: 2516 args = (magic_arg_s, cell) -> 2517 result = fn(*args, **kwargs) 2519 # The code below prevents the output from being displayed 2520 # when using magics with decorator @output_can_be_silenced 2521 # when the last Python token in the expression is a ';'. 2522 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False): File /opt/conda/lib/python3.10/site-packages/IPython/core/magics/script.py:154, in ScriptMagics._make_script_magic.<locals>.named_script_magic(line, cell) 152 else: 153 line = script --> 154 return self.shebang(line, cell) File /opt/conda/lib/python3.10/site-packages/IPython/core/magics/script.py:314, in ScriptMagics.shebang(self, line, cell) 309 if args.raise_error and p.returncode != 0: 310 # If we get here and p.returncode is still None, we must have 311 # killed it but not yet seen its return code. We don't wait for it, 312 # in case it's stuck in uninterruptible sleep. -9 = SIGKILL 313 rc = p.returncode or -9 --> 314 raise CalledProcessError(rc, cell) CalledProcessError: Command 'b'\nMODEL_ID="gemini-1.0-pro"\n\ncurl -X POST \\\n -H "Authorization: Bearer $(gcloud auth print-access-token)" \\\n -H "Content-Type: application/json" \\\n https://${API_ENDPOINT}/v1/projects/${PROJECT_ID}/locations/${LOCATION}/publishers/google/models/${MODEL_ID}:streamGenerateContent \\\n -d \'{\n "contents": {\n "role": "USER",\n "parts": { "text": "Why is the sky blue?" }\n }\n }\'\n'' returned non-zero exit status 3. --- -TRYING AGAIN- SUCCESSFULLY COMPLETED LAB THIS TIME. In Task 2. Open the generative-ai folder I see an instruction, "Click on the intro_gemini_curl.ipynb file." It should have been "Double-click on ..." There are many such ambiguous statements, which may mislead the user. Just wondering, if this were part of a rocket launcher code, would you be willing to take that chance? Or, was it part of the agenda?
Premkumar B. · Recensione inserita oltre 2 anni fa
Shaima P. · Recensione inserita oltre 2 anni fa
Vanshika K. · Recensione inserita oltre 2 anni fa
nada p. · Recensione inserita oltre 2 anni fa
shashi k. · Recensione inserita oltre 2 anni fa
Soudeepp G. · Recensione inserita oltre 2 anni fa
Robert N. · Recensione inserita oltre 2 anni fa
Archi K. · Recensione inserita oltre 2 anni fa
Mohamadou C. · Recensione inserita oltre 2 anni fa
Anshika P. · Recensione inserita oltre 2 anni fa
sunny k. · Recensione inserita oltre 2 anni fa
not correct many times practice
Mamta K. · Recensione inserita oltre 2 anni fa
Saksham M. · Recensione inserita oltre 2 anni fa
Zaid S. · Recensione inserita oltre 2 anni fa
good
Gaurab C. · Recensione inserita oltre 2 anni fa
Jagruti r. · Recensione inserita oltre 2 anni fa
Aman K. · Recensione inserita oltre 2 anni fa
N V Siddharth G. · Recensione inserita oltre 2 anni fa
Agnidhra S. · Recensione inserita oltre 2 anni fa
Non garantiamo che le recensioni pubblicate provengano da consumatori che hanno acquistato o utilizzato i prodotti. Le recensioni non sono verificate da Google.