A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Welcome to the Perplexity API Add-on for Google Sheets! | |||||||||||||||||||||||||
2 | This quick start guide will help you get up and running with the add-on. | |||||||||||||||||||||||||
3 | ⚠️ MAKE A COPY OF THIS FILE ⚠️ | |||||||||||||||||||||||||
4 | ||||||||||||||||||||||||||
5 | This script allows you to use Perplexity's AI models directly in your Google Sheets. | |||||||||||||||||||||||||
6 | ||||||||||||||||||||||||||
7 | How to Use: | |||||||||||||||||||||||||
8 | 1. Use the 'Set API Key' menu item to enter your Perplexity API key. | |||||||||||||||||||||||||
9 | 2. Use the 'Enable API Calls' and 'Disable API Calls' menu items to control API access. | |||||||||||||||||||||||||
10 | 3. Use the '=PERPLEXITY(prompt, [model], [maxTokens], [temperature], [topP], [frequencyPenalty], [presencePenalty])' function in any cell. | |||||||||||||||||||||||||
11 | ||||||||||||||||||||||||||
12 | Models: | |||||||||||||||||||||||||
13 | You can specify the model to use as the second argument to the PERPLEXITY function. | |||||||||||||||||||||||||
14 | - sonar-pro: (Recommended) Perplexity's most capable model. | |||||||||||||||||||||||||
15 | - sonar: A faster, less computationally intensive model. | |||||||||||||||||||||||||
16 | - If no model is specified, 'sonar' is used as the default. | |||||||||||||||||||||||||
17 | ||||||||||||||||||||||||||
18 | Parameters: | |||||||||||||||||||||||||
19 | The PERPLEXITY function accepts several optional parameters to customize the AI's response: | |||||||||||||||||||||||||
20 | - prompt (Required): The text prompt you want to send to the AI. | |||||||||||||||||||||||||
21 | - model (Optional): The name of the model to use (see above). | |||||||||||||||||||||||||
22 | - maxTokens (Optional): The maximum number of tokens the AI should generate. The higher this number, the longer the response can be. Default is determined by the model. | |||||||||||||||||||||||||
23 | - temperature (Optional): Controls the randomness of the AI's response. Ranges from 0.0 to 2.0. Higher values (e.g., 1.5) make the output more random and creative, while lower values (e.g., 0.5) make it more focused and deterministic. | |||||||||||||||||||||||||
24 | - topP (Optional): Also known as nucleus sampling. Ranges from 0.0 to 1.0. The AI will only consider the most likely tokens whose probabilities add up to this value. Lower values (e.g., 0.5) make the output more focused. | |||||||||||||||||||||||||
25 | - frequencyPenalty (Optional): A number greater than or equal to 0. Higher values (e.g., 1.0) discourage the AI from repeating the same words or phrases in the response. | |||||||||||||||||||||||||
26 | - presencePenalty (Optional): A number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. | |||||||||||||||||||||||||
27 | ||||||||||||||||||||||||||
28 | Notes: | |||||||||||||||||||||||||
29 | - The script uses Script Properties to store your API key and the API Calls status. | |||||||||||||||||||||||||
30 | - The script uses a basic rate limiting mechanism. | |||||||||||||||||||||||||
31 | ||||||||||||||||||||||||||
32 | Using the PERPLEXITY Function | |||||||||||||||||||||||||
33 | Basic Usage: | =PERPLEXITY(A10) | ← This formula will use the text in cell A10 as the prompt | |||||||||||||||||||||||
34 | ||||||||||||||||||||||||||
35 | Advanced Usage: | =PERPLEXITY(A11, "sonar", 1000) | ← This specifies the model and max tokens | |||||||||||||||||||||||
36 | ||||||||||||||||||||||||||
37 | Example Prompts: | Your Prompt | PERPLEXITY Function | Result | ||||||||||||||||||||||
38 | What is the capital of France? | =PERPLEXITY(B21) | Error: API Key not set. Use 'Set API Key' in the menu. | |||||||||||||||||||||||
39 | Explain quantum computing in simple terms. | =PERPLEXITY(B22) | Error: API Key not set. Use 'Set API Key' in the menu. | |||||||||||||||||||||||
40 | Write a short poem about spring. | =PERPLEXITY(B23) | Error: API Key not set. Use 'Set API Key' in the menu. | |||||||||||||||||||||||
41 | ||||||||||||||||||||||||||
42 | To use a formula, remove the apostrophe (') at the beginning when you type it into a cell. | |||||||||||||||||||||||||
43 | ||||||||||||||||||||||||||
44 | Tips: | |||||||||||||||||||||||||
45 | • The function may take a few seconds to return results | |||||||||||||||||||||||||
46 | • If you hit rate limits, wait a minute before trying again | |||||||||||||||||||||||||
47 | ||||||||||||||||||||||||||
48 | Need Help? | |||||||||||||||||||||||||
49 | If you encounter any issues, check the 'Perplexity API' menu for troubleshooting options. | |||||||||||||||||||||||||
50 | ||||||||||||||||||||||||||
51 | ||||||||||||||||||||||||||
52 | ||||||||||||||||||||||||||
53 | ||||||||||||||||||||||||||
54 | ||||||||||||||||||||||||||
55 | ||||||||||||||||||||||||||
56 | ||||||||||||||||||||||||||
57 | ||||||||||||||||||||||||||
58 | ||||||||||||||||||||||||||
59 | ||||||||||||||||||||||||||
60 | ||||||||||||||||||||||||||
61 | ||||||||||||||||||||||||||
62 | ||||||||||||||||||||||||||
63 | ||||||||||||||||||||||||||
64 | ||||||||||||||||||||||||||
65 | ||||||||||||||||||||||||||
66 | ||||||||||||||||||||||||||
67 | ||||||||||||||||||||||||||
68 | ||||||||||||||||||||||||||
69 | ||||||||||||||||||||||||||
70 | ||||||||||||||||||||||||||
71 | ||||||||||||||||||||||||||
72 | ||||||||||||||||||||||||||
73 | ||||||||||||||||||||||||||
74 | ||||||||||||||||||||||||||
75 | ||||||||||||||||||||||||||
76 | ||||||||||||||||||||||||||
77 | ||||||||||||||||||||||||||
78 | ||||||||||||||||||||||||||
79 | ||||||||||||||||||||||||||
80 | ||||||||||||||||||||||||||
81 | ||||||||||||||||||||||||||
82 | ||||||||||||||||||||||||||
83 | ||||||||||||||||||||||||||
84 | ||||||||||||||||||||||||||
85 | ||||||||||||||||||||||||||
86 | ||||||||||||||||||||||||||
87 | ||||||||||||||||||||||||||
88 | ||||||||||||||||||||||||||
89 | ||||||||||||||||||||||||||
90 | ||||||||||||||||||||||||||
91 | ||||||||||||||||||||||||||
92 | ||||||||||||||||||||||||||
93 | ||||||||||||||||||||||||||
94 | ||||||||||||||||||||||||||
95 | ||||||||||||||||||||||||||
96 | ||||||||||||||||||||||||||
97 | ||||||||||||||||||||||||||
98 | ||||||||||||||||||||||||||
99 | ||||||||||||||||||||||||||
100 |