Live data from Hacker News

Google Gemini Pro API Available Through AI Studio

ai.google.dev

101–110 of 118 posts

Re: Google Gemini Pro API Available Through AI Studio

#102
post #12

I can only access https://makersuite.google.com/ when using a VPN to the US. Also, it spams popups that get blocked by Firefox. Some basic prompts, which are answered correctly most of the time by ChatGPT4: There are 31 books in my house. I read 2 books over the weekend. How many books are still in my house? > 29 books Julia has three brothers, each of them has two sisters. How many sisters does Julia have? > Three I…

My attempt had GPT4 fail on Julia, it was adamant that Julia has two sisters. It took couple of back and forths for it to understand.

Re: Google Gemini Pro API Available Through AI Studio

#103
post #89

I like that they have a "blog post creator"[1] in their examples. There's no hope for the future of the web when the self-proclaimed stewards of its quality encourage AI spam. [1] https://makersuite.google.com/app/prompts/blog-post-creator

There are legitimate use cases, like "create a press release with these facts".

I would take a list of the facts over garbage filler paragraphs any day.

This is a problem with human writers too.

Re: Google Gemini Pro API Available Through AI Studio

#105
Some thoughts comparing this to the GPT API (from a thread: https://hachyderm.io/@ianbicking/111574983914336748):

It looks like a fairly easy swap-in for GPT. "messages" becomes "content". Some of the configuration parameters are slightly different (topP/etc), but I have never put in the effort to understand the practical effect of those so I never tweak their values.

The messages themselves are a list of "parts", which allows mixed media messages. This feels a little cleaner than how GPT has handled messages being extended.

Instead of role: "assistant" they use role: "model". There's no role: "system" – presumably you just shove everything into user messages. You can also leave off the role... and I assume that means default to "user" but it's not clear if it's 100% equivalent...?

There's a bunch of moderation parameters, which seems like a good idea. OpenAI has a moderation endpoint you can use to preflight check your input, but doing it all at once makes more sense. There's four categories and you can adjust your sensitivity to each (and turn off blocking at entirely). The sensitivity is not about how extreme the violation is, but how likely it is a violation. So it's not like a G/PG/PG-13/etc rating. Just a question of how many false positives/negatives you want.

There's functions, though they are in beta (whatever that means): https://ai.google.dev/docs/function_calling – they look very very similar to GPT functions. They don't have the "JSON response" that GPT has, but that seems mostly redundant with functions anyway.

I have no idea how well prompts translate, but it feels like the API is an easy translation. And importantly everything is semantically equivalent, you don't have to make one pretend it is the other, like turning a completion API into a chat API.

Given the generous free tier I feel fairly motivated to swap in Gemini and try to ship experiments that I've sat on until now.

Re: Google Gemini Pro API Available Through AI Studio

#106

I'd like to know why the name of this AI product coincides with the alternative in-between-HTTP-and-Gopher Gemini protocol. I'm sure it's just an accident.

"Gemini" is a very common name (being the name of a constellation) which has been used by countless products, companies and endeavors over the years. Almost no one outside of Hacker News and a small core of misanthropic anarchists knows about, much less cares about, the Gemini protocol.

In the case of this specific Gemini, it's apparently the result of there being two teams involved, and it's a reference to the Gemini space program[0].

[0]https://twitter.com/JeffDean/status/1733580264859926941

Re: Google Gemini Pro API Available Through AI Studio

#107
post #54

Earlier quoted context omitted.

To the second question chatGPT answered : The orange is in the kitchen, as that is where the plate, along with the orange, was moved. Now a human can reason because a human can visualize in their mind that a plate is being moved without moving the orange. How is that kind of reasoning possible in LLMs which in my very basic understanding is predicting the next token.

Here's the response chatGPT 4 gave for me: > The orange remains in the living room. Moving the plate to the kitchen does not affect the location of the orange, since it was placed below the plate but not attached to it. Therefore, the orange stays where it was originally placed, which is in the living room. You don't need to visualize it in your mind to understand the relationship between being _below_ and being _mov…

I have wondered how do people blind from birth create their mental world? Is it all dark with no color or light and only sound? No shapes? Or do they still form mental images from non visual sensory inputs?

Re: Google Gemini Pro API Available Through AI Studio

#108
post #44

why on earth did they design the Node.js and Web APIs to be slightly different and incompatible? (edit: this might just be a bug/oversight on the landing page?) Node.js: const model = genAI.getGenerativeModel({ model: "gemini-pro-vision"}); const result = model.generateContent({ contents: [{parts: [ {text: "What’s in this photo?"}, {inlineData: {data: imgBase64, mimeType: 'image/png'}} ] }] }) Web: const model = genA…

What do you mean? They look exactly the same to me.

You may be a host

Re: Google Gemini Pro API Available Through AI Studio

#110
post #51

This is very good: - 60 queries per minute free - about 1/5th the price of GPT3.5 Turbo - priced per char, not per token - same image pricing as GPT4 150x150

60 QPM free is great, but the pay-as-you-go pricing is the same. Courtesy of GPT4: "To determine which option is cheaper, Gemini Pro or GPT-3.5 Turbo, we need to consider the average length difference between tokens and characters and the pricing structure for each. Gemini Pro Pricing: Input: $0.00025 per 1,000 characters Output: $0.0005 per 1,000 characters GPT-3.5 Turbo Pricing: Input: $0.0010 per 1,000 tokens Outp…

I am wondering why it would price them in characters but not tokens? Are they processing characters directly as tokens without tokenizer?
Post reply on HN