Gemini API is here! Let's try it! | Basic Usage + Function Calling (Python SDK)

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • In today's video I check out Google's Gemini API for the first time.
    GitHub: github.com/unconv/gemini-testing
    Support: buymeacoffee.com/unconv
    Consultations: www.buymeacoffee.com/unconv/e...
    Memberships: www.buymeacoffee.com/unconv/m...
    00:00 Intro & Get API Key
    01:02 Installing Python SDK
    01:22 Listing available models
    03:07 Making a completion
    04:31 Sending harmful content
    07:37 Streaming responses
    09:08 Gemini Pro Vision: Images to Text
    12:20 Creating chats (simple way)
    15:33 Creating chats (hard way)
    19:53 Setting max_tokens and temperature etc.
    20:13 Migrate Function Calling AI Agent from OpenAI to Gemini
    39:00 Gemini 0 - ChatGPT 1
    41:52 Outro
  • Věda a technologie

Komentáře • 33

  • @pradeeshnarayan
    @pradeeshnarayan Před 5 měsíci

    Thank you. It was very helpful

  • @emptyname
    @emptyname Před 7 měsíci +3

    An intresting thing I found was that this is slightly different from Gemini Pro. If you ask it's name, it will not give any name. If you ask "are you powered by Gemini", it won't say it's powered by Gemini. I did manage the LLM to tell it's name once, to which it replied "Serenity"

  • @sarthakbhan1562
    @sarthakbhan1562 Před 7 měsíci

    man, thanks. THANK YOU SOO SOO MUCHHHHHHH!!!!!!!

  • @aimakehappy
    @aimakehappy Před 7 měsíci

    Thank you.

  • @homerdus9668
    @homerdus9668 Před 7 měsíci

    Thanks I started following your great tutorials… I would like to do many this… mainly chat with a book…. Convert pdf to text file with ocr (text is images in pdf) … detect anomalies in large text file eg. foreign words (to the language) … have double language chat e.g. German and Spanish in same chat …

  • @AyushGupta-kp9xf
    @AyushGupta-kp9xf Před 7 měsíci +1

    I am getting a 500 InternalServerException. Network Error while trying to run genai.. Is someone else too ?

  • @pikleman5880
    @pikleman5880 Před 7 měsíci +1

    When I used Gemini, it just called all the functions I listed in the functions file. It's really in need of improvement.

  • @user-to2yv5qs9r
    @user-to2yv5qs9r Před 6 měsíci

    when i try this i get some error about authentication scope can you help me

  • @savire.ergheiz
    @savire.ergheiz Před 7 měsíci

    8k tokens output and not ready yet for businesses. Google did though provides regional based access albeit no european based yet.
    Overall its currently faster than cgpt although the contents somewhat need to be adjusted as required

  • @HarmonyHouse12
    @HarmonyHouse12 Před 7 měsíci

    Could you make a video showing us how to replace OpenAI with Gemini in AutoGPT? 🙏

  • @pradipdutta7851
    @pradipdutta7851 Před 7 měsíci

    Bro How much Python Knowledge Required I am beginner at Python

  • @SkillCollectors
    @SkillCollectors Před 7 měsíci +1

    I made a similar video as this! After playing with this for about 24 hours, I'm finding Gemini is very buggy (chat triggering exceptions) and is suffering from a lot of hallucinations. It's been giving me links that lead to 404 pages. One example, I asked it to explain binary to me where it started off ok but then proceeded to calculate 1011 (11 in decimal) and added it backwards (left to right instead of right to left) and got 13. SMH. I'm sure they will work it out but this is not ready for general use yet. Anyone else having experiences like this?

    • @AyushGupta-kp9xf
      @AyushGupta-kp9xf Před 7 měsíci

      I am getting NetworkError. InternalServerException while trying to call any method from genai

    • @renatosoares4338
      @renatosoares4338 Před 7 měsíci

      The model we use in the API is not the same on Bard. Bard is more verbose while on the API it is 'direct'. Like when we ask "what is the 3rd planet of the sun" Bard gives a more verbose answer, while the API just gives "Earth". Maybe a system prompt can make it more chat friendly.

    • @pikleman5880
      @pikleman5880 Před 7 měsíci

      Yeah. And when I said "hi" to it, it just executed all the functions I gave it sequentially. It also refuses to write code for some reason for me.

  • @LogicShade
    @LogicShade Před 7 měsíci

    should start making tutorials, i just learned a lot from observing you debug code.

  • @professorpuddle
    @professorpuddle Před 7 měsíci

    When I click get an API key the site doesn't load or it says I'm not allowed to access it or something?

    • @HariTrigger
      @HariTrigger Před 7 měsíci

      same here

    • @unconv
      @unconv  Před 7 měsíci +2

      Seems that it's country restricted. Basically Europe is excluded :(
      You could try using a VPN

  • @user-jg4ci4mf8w
    @user-jg4ci4mf8w Před 7 měsíci +1

    Thanks for the video. It would help if you thoroughly read the Documentation. 😂

  • @RaviTomar-ef6rg
    @RaviTomar-ef6rg Před 2 měsíci

    i need to convert this using GEMINI API

  • @JOHNSMITH-ve3rq
    @JOHNSMITH-ve3rq Před 7 měsíci

    Bro why not use the debugger ? Iteration a lot faster because you keep all the state!

    • @unconv
      @unconv  Před 7 měsíci

      Thanks for the tip. I'll try it out!

  • @outdoorsy01
    @outdoorsy01 Před 7 měsíci +1

    Then why can no one, other than youtubers seem to be able to get onto Gemini?

    • @unconv
      @unconv  Před 7 měsíci

      It seems to be country restricted (basically excluding Europe)

    • @EliSpizzichino
      @EliSpizzichino Před 7 měsíci

      @@unconv I'm not able to create the API keys indeed. where do you get the info that it's not available in EU?

    • @unconv
      @unconv  Před 7 měsíci

      Here: ai.google.dev/available_regions

  • @de-kat
    @de-kat Před 7 měsíci

    Is the API free ?

    • @unconv
      @unconv  Před 7 měsíci +2

      Yes, for 60 queries per minute (but Google uses your data to train the model)

    • @de-kat
      @de-kat Před 7 měsíci

      What is the right of use, can I use the API in free products with in-game purchase?@@unconv