curl --location 'https://generativelanguage.googleapis.com/v1beta3/models/text-bison-001:generateText?key=' \
--header 'Content-Type: application/json' \
--data '{"prompt":{"text":"Give response in one word\ninput: Capital of India\noutput: New Delhi\ninput: The country with most Cricket world cups\noutput: Australia\ninput: 13/12/23 in a friendly format\noutput: December 13,2023\ninput: 25/1/2135 in a friendly format\noutput:"},"temperature":0.7,"top_k":40,"top_p":0.95,"candidate_count":1,"max_output_tokens":1024,"stop_sequences":[],"safety_settings":[{"category":"HARM_CATEGORY_DEROGATORY","threshold":"BLOCK_LOW_AND_ABOVE"},{"category":"HARM_CATEGORY_TOXICITY","threshold":"BLOCK_LOW_AND_ABOVE"},{"category":"HARM_CATEGORY_VIOLENCE","threshold":"BLOCK_MEDIUM_AND_ABOVE"},{"category":"HARM_CATEGORY_SEXUAL","threshold":"BLOCK_MEDIUM_AND_ABOVE"},{"category":"HARM_CATEGORY_MEDICAL","threshold":"BLOCK_MEDIUM_AND_ABOVE"},{"category":"HARM_CATEGORY_DANGEROUS","threshold":"BLOCK_MEDIUM_AND_ABOVE"}]}'
This curl can be translated using
Well, this uses the legacy model, PaLM-2 as the Gemini Pro API doesn’t work.