Configure API Keys for Google Gemini

:bookmark: This guide explains how to configure API keys for Google Gemini to enable Discourse AI features that require 3rd party LLM keys.

:person_raising_hand: Required user level: Administrator

Google Gemini

In this example, we are using Google Gemini to generate the keys.

:information_source: In order to use certain AI feature, users must have an API Key from a 3rd party provider such as OpenAI (ChatGPT), Anthropic (Claude), Stability AI (Stable Diffusion), etc.

Please check each AI feature to see which 3rd party providers can be used for it.

Note: Please see here for up-to-date details and pricing .

:partying_face: AI Bot can now use Gemini 1.5 Pro while Gemini Flash is supported for Summarization

Platforms will always change so this guide may not reflect 100% process.

Generate the API key

  1. Log in to Google AI Studio. Follow the instructions in their documentation to get an API key
  2. Generate the API Key
  3. Once the key is generated, store it in a safe and secure place and copy it

Using API key for Discourse AI

  1. Go to Admin settings-> PluginsAILLMs tab
  2. Click on the + New Model button.
  3. Select the appropriate Gemini model from the list.

  1. Paste the API key into the API Key of the service hosting the model field.
  2. Save the LLM.

Additional resources

Last edited by @Lilly 2024-08-08T08:11:35Z

Check documentPerform check on document:
7 Likes

I’ve added the Google Gemini Api key in the Discourse settings (AI Plugin is working ok, at lease showing so). Also enabled the ‘Ai_Bot’ in settings.

But am not feeling any change in my site anywhere. I was expecting that may be I’d be perhaps able to create auto caption for any picture I load in composer window. Or … see below:

1 Like

Is the following configured accurately for AI Bot?

1 Like

Thanks @Saif
I’m taking the hint that I should check this check list sent by you, and if any difficulty, I should better get involved myself under that topic only.
If I’m wrong in understanding this, Pls tell me and I’ll follow up here, under this topic only.

1 Like

Assuming the API key is working as intended then I would recommend checking with each of the configurations of the Discourse AI features you have enabled to ensure they are working appropriately.

Sure you can post in that topic

1 Like