Generative AI-Gemini

Overview

Zenphi's Generative AI-Gemini action allows users to leverage advanced AI capabilities to generate content, insights, and perform various tasks based on provided inputs by providing access to Google's AI model suite. This action is designed to integrate seamlessly within your Zenphi workflows, automating content creation, data analysis, and more from text.

Key Features

  1. View prompt gallery: The "View Prompt Gallery" feature in the Gemini action in Zenphi provides users with a three pre-designed prompts that can be used or adapted within the Generative AI-Gemini action. This gallery serves as a resource to help users quickly create effective prompts for content generation.

    1. Tech specs: The prompts can be utilized to automatically generate detailed technical specifications, including complex data structures in JSON format. This functionality ensures that precise and structured information is produced, making it easier to integrate with other systems, streamline configuration processes, and maintain consistency across various platforms.

    2. Title generation: Leverage AI to create compelling and relevant titles for articles by analyzing examples and understanding context. This feature ensures that generated titles are not only catchy and engaging but also aligned with the content and target audience, optimizing for search engines (SEO) and enhancing the overall effectiveness of your content strategy.

    3. Transcript summary: Utilize AI to efficiently condense lengthy transcripts into concise summaries by analyzing key points and patterns within the text. This feature allows for the generation of clear and accurate summaries using examples as reference, ensuring that the essential information is captured and presented in a way that's easy to understand, making it ideal for meeting notes, interviews, and other documentation purposes.













  1. Model: The Model Field in Zenphi's Generative Gemini AI Action allows users to select the specific AI model that will be used to generate content, summaries, or perform other AI-driven tasks within a workflow. The choice of model determines the AI's behavior, output quality, and capabilities, tailoring the response to meet the specific needs of the task at hand.
    1. Gemini 1.0 Pro: is an NLP model designed for advanced chat and code generation, offering robust language understanding and generation capabilities.
    2. Gemini 1.5 Flash: is an ultra-fast multimodal AI model with stringent input and output limits for optimized performance and precision.
    3. Gemini 1.5 Pro: is a multimodal AI model with a 1 million token context window, enabling comprehensive and detailed analysis across diverse data types.
    4. Gemini Pro Vision: leverages advanced AI to automate image recognition and visual data extraction, enhancing workflows with precise visual analysis.


  1. Gemini API key: The Gemini API Key provides secure access to Gemini AI's features for seamless integration into your applications.

    1. How to get a Gemini API key: Learn the steps to quickly generate and securely obtain your Gemini API key for integration.

      1. Create a Google AI Studio account: Visit the Gemini API website and select "Sign In" to access Google AI Studio. Follow the prompts to either create a new account or log in using your existing Google credentials.


      2. Open the API documentation and reference: Every API functions uniquely, so it's essential to consult the documentation to grasp its features and use cases. The API reference provides a comprehensive technical guide, including commands, parameters, and setup instructions, to assist with project implementation.
        Here are the links to the Gemini API documentation and the generate content API reference.

      3. Get a Gemini API key: After logging into Google AI Studio, review and accept the informational pop-ups, then close them. You can experiment with the Gemini models by adjusting the basic settings on the right side.

        1. To obtain your API key, click the "Get API Key" button located at the top left of the screen.

        2. Click on the "Create API key" button.

        3. Acknowledge and dismiss the safety setting reminder. Then, proceed by clicking the "Create API Key in New Project" button. Google will generate a new API key for you. Copy the key, and then close the pop-up window.

    🚧

    It's crucial to keep your API key secure at all times. If someone else gains access to it, they could misuse it, potentially disabling the endpoint for you. Avoid sharing the key with anyone who doesn't require it, and if you're deploying an app publicly, ensure you're familiar with API security best practices.

    📘

    You can use Zenphi Vault to store your API Key safe and secure. Here is the article for more information on Vault: Zenphi Vault

  2. Examples: The Example Section of the Zenphi Gemini Action is designed to showcase how Gemini can generate output content based on provided input examples. This section includes a variety of examples that demonstrate the AI's ability to create content from both text and image inputs. Users can view these examples by selecting a prompt from the prompt gallery, which will automatically display relevant input-output pairs. Additionally, users have the flexibility to add more examples or create new ones from scratch by clicking the "Add New Example" button, allowing for a more customized and precise content generation experience.


  3. System Instructions: This field allows you to provide optional guidance on the tone and style of the content generated by the model. This field is where you can specify how you want the AI to tailor its responses, such as making them formal, casual, concise, or elaborate. The instructions help the AI understand the desired approach, ensuring the output aligns with your specific needs or preferences.

  4. Input: This is where you provide the core content or prompt that you want the AI model to process. This input serves as the foundation for the AI's response, guiding it on what to generate or how to transform the data. The Input can include text, questions, or specific commands, and the AI will use this information to produce the desired output based on the instructions you’ve given.

  5. Use Photo: The Use Photo feature in the Zenphi Gemini action allows you to include an image as part of the input for the AI model to process. When you upload a photo, the AI can analyze and incorporate it alongside any text input, helping to generate a more contextually relevant or visually informed response. This is particularly useful when you need the AI to create content or insights that take both visual and textual elements into account, ensuring the output aligns accurately with the combined input provided.



  1. Generation Config: The Generate Config section in the Zenphi Gemini action allows you to fine-tune how the AI generates content. This section includes four key fields:
    1. Temperature: Controls the randomness of the AI's output. A higher temperature (closer to 2.0) results in more varied and creative responses, while a lower temperature (closer to 0.0) makes the output more deterministic and repetitive. Adjusting this setting lets you balance between creativity and predictability.
    2. Maximum Length: Defines the maximum number of tokens the AI can generate, which includes the prompt, examples, and the final output. One token generally equals about four characters in standard English text. This setting helps you control the length of the generated content.
    3. TopP: Sets the maximum cumulative probability of tokens to consider during sampling. It ensures that only the most likely tokens (based on their probabilities) are considered for generation, allowing for more focused and high-quality outputs. This method, known as Nucleus sampling, limits the tokens based on cumulative probability.
    4. TopK: Determines the maximum number of tokens to consider when sampling, based on their likelihood. This setting directly limits the number of potential tokens, making the output more controlled. If Nucleus sampling is used, TopK cannot be adjusted, as Nucleus sampling automatically manages the token selection based on probability.


      These configurable options give you precise control over the AI's content generation, helping you tailor the output to your specific needs. Also you can choose to have the output in JSON format


  1. Safety Settings:
    The Safety Settings part of the Zenphi Gemini action allows you to control how the AI filters potentially harmful or inappropriate content. These settings cover four specific categories:
    1. Harassment: Controls the level of filtering for content that could be considered harassing or bullying.
    2. Hate: Manages the filtering of hate speech or content that could be deemed offensive or discriminatory.
    3. Sexually Explicit: Regulates the filtering of sexually explicit material to prevent inappropriate content.
    4. Dangerous Content: Filters content that may promote or suggest dangerous activities or behaviors.
      Each category offers four levels of filtering:
    • Block None: No content is filtered out, allowing all generated content, regardless of its nature.
    • Block a Few: Filters out only the most extreme or obvious cases within the category.
    • Block Some: Applies a moderate level of filtering to block a broader range of potentially harmful content.
    • Block Most: Implements the strictest filtering, blocking nearly all content that might be considered problematic in the given category.


      These settings help ensure that the content generated by the AI aligns with your safety and appropriateness standards.