Skip to main content

Documentation Index

Fetch the complete documentation index at: https://sambanova-systems.mintlify.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

This integration allows users with SambaCloud API keys to seamlessly integrate LLMs into Google Workspace applications. Enhance your productivity by adding AI-powered grammar correction, text rephrasing, formula generation, and intelligent question answering directly within Google Docs and Sheets.

Prerequisites

Before you begin, ensure you have:
  • A SambaCloud account with an API key
  • Access to Google Workspace (Google Docs and/or Google Sheets)

Setup

  1. Get Your SambaNova API Key Sign up for a free API key at SambaCloud. The free tier provides access to powerful models like Llama 3 405B.
  2. Access Google Apps Script Open your Google Document or Google Sheet and navigate to Extensions → Apps Script.
  3. Add the Integration Script
  4. Configure Your API Key
    • In the script, locate the line:
      api_key = 0
      
    • Replace 0 with your SambaNova API key:
      api_key = "your_api_key_here"
      
      Save the script and you’re ready to use the integration.

Google Docs features

Once configured, you’ll have access to AI-powered text editing tools through the SambaAI menu.

Clean grammar

  1. Highlight any text in your document
  2. Navigate to SambaAI → Clean Grammar
  3. The selected text will be automatically corrected for grammar issues in place

Rephrase text

  1. Highlight the text you want to rephrase
  2. Navigate to SambaAI → Rephrase
  3. A new paragraph with a concise and professional rephrasing will be appended below your selection

Google Sheets features1

The integration provides two custom functions for use in your spreadsheets:
  1. =SAMBA_AI_QUESTION() Use this function for general AI queries and text analysis. Example Use Cases:
    =SAMBA_AI_QUESTION("What is the RSVP of this person: yes, no, or maybe? she said "&A10)
    
    =SAMBA_AI_QUESTION("Which essay is more compelling? Prompt 1:"&A13&" Prompt 2:"&B13)
    
    =SAMBA_AI_QUESTION("Summarize the following customer feedback: "&B5)
    
  2. =SAMBA_AI_FORMULA() Use this function when requesting specific Excel/Sheets formulas from the model. Example Use Cases:
    =SAMBA_AI_FORMULA("take B1 if A1 is true, but otherwise take C1, and add that result to D1")
    
    =SAMBA_AI_FORMULA("calculate the percentage change between last month's sales in C2 and this month's sales in C3")
    
    =SAMBA_AI_FORMULA("find the average of all values in column D that correspond to 'approved' status in column E")
    

Benefits

By integrating SambaNova with Google Workspace, you can:
  • Improve writing quality with instant grammar corrections and professional rephrasing
  • Automate formula creation by describing what you need in plain English
  • Analyze data intelligently with natural language queries directly in your spreadsheets
  • Boost productivity by reducing context switching between applications
  • Leverage state-of-the-art models like Llama-3.1-405B without leaving your documents

Additional resources


1 Inspired by SheetAI for the custom function implementation approach.