SAMMI Extensions
ChatGPT
Integrate ChatGPT directly into SAMMI, allowing for both single queries and continuous conversations. Track your token usage, switch between multiple conversations, and maintain flexibility with ChatGPT's capabilities.
Features
- Ask ChatGPT once: Send a single prompt to ChatGPT. You can specify the completion choice amount and the maximum tokens for the response.
- Chat with ChatGPT: Have continuous conversations with ChatGPT. It remembers previous discussions and allows you to switch between multiple conversation threads.
Cost and Token Usage
- ChatGPT is a paid service and requires an OpenAI account with a credit card.
- Users must monitor their own token usage and set usage limits (described in the setup guide).
- By installing this extension, you agree to monitor your token usage and uninstall it if you notice high token usage. In that case, report it to Christina via Itch or Discord.
Setup
Token Usage Responsibility
This extension requires an OpenAI account and a credit card. You are responsible for monitoring your own token usage and setting limits on the OpenAI dashboard.
- Install the extension. You can follow the Extension Install Guide.
- Set up the INIT button with the following steps:
- API Key:
- Go to OpenAI's signup page.
- Log in or create a new account.
- Click on 'Personal' in the top-right corner, select "View API Keys."
- Generate a new secret key and paste it into the API Key box in the INIT button.
- Set up your payment method (required for functionality).
- Set your token usage limits on the OpenAI Billing Limits page.
- Token Usage Session Limit:
- SAMMI can limit the number of tokens used per session (from loading to reloading Bridge).
- When the session limit is reached, no more messages can be sent to ChatGPT until reset.
- The session limit is informative; you still need to set your total limits on the OpenAI dashboard.
- API Key:
Commands
Command Usage Reminder
These commands require a waiting period of 10-30s before 'Save Variable As' is populated. Use the Wait Until Variable Exists command, and remember to delete the variable you're waiting for beforehand.
ChatGPT Ask
Send a single prompt to ChatGPT without remembering any previous conversations. Ideal for simple queries as it uses fewer tokens than ongoing chats.
Box Name | Description |
---|---|
Prompt | The prompt or question to send to ChatGPT. |
Maximum Tokens | Max number of tokens to be used in the response. Defaults to 4096 if unset, where one token is around 4 characters in English. You might need to experiment a bit to avoid incomplete sentences. |
Completion Amount | Number of completions (answers) ChatGPT provides. Defaults to 1. Higher numbers increase cost. |
Save Variable As | Variable name to save the response. If Completion Amount is more than 1, the variable will be an array containing all responses. |
ChatGPT Chat
Use this command for continuous conversations with ChatGPT. This method remembers previous interactions, but it can be costly as it sends the entire chat history each time.
For simple one time queries you should use 'ChatGPT Ask' command instead which uses less tokens.
Box Name | Description |
---|---|
Conversation Type | Whether to continue an existing chat or create a new one. |
Conversation Name | Select from existing conversations or create a new one by typing in the name. |
Maximum Tokens | Maximum amount of tokens to be in the response. One token is around 4 characters in English. You might need to experiment a bit to avoid incomplete sentences. |
Message | The prompt to send to ChatGPT. |
Save Variable As | Variable name to save the response. |
ChatGPT Get Token Usage
Retrieve the current session's token usage and the approximate cost.
Informational Only
This is purely for guidance and should not be 100% relied upon. Always cross-check your usage on the OpenAI dashboard.
Box Name | Description |
---|---|
Save Variable As | Variable name to save the token usage. |
ChatGPT Reset Token Usage
Reset the session's token usage counter for SAMMI. Note that this is separate from limits set on OpenAI's dashboard.
Separate from OpenAI Limits
Setting or resetting the session token limit in SAMMI does not impact your OpenAI dashboard limits. Use it only as guidance.
Get Help
Please see Troubleshooting for common extensions issues.