πππππππππππππSet-Upππππππππππππππ
We have detailed video tutorials for each of the actions/elements we have in this plugin. Watch them to understand and use it at ease.
ππππππππππInstalling the Pluginππππππππππ
β Log in to your Bubble account
β Go to Plugins
β Search for βOpen AI by_Ritz7β
β Install the plugin
πππππππππππUsing the Pluginπππππππππππ
ππ Note: In all the actions, we have a field named "Authorization". This field should be in the following format: Bearer <OPENAI_API_KEY> or just <OPENAI_API_KEY>.ππ
ππ Actions ππ
β½ Create Text Completion
β Inputs:
β» Authorization: It is the API key
β» Model: ID of the model to use. You can use the List models API to see all of your available models.
β» Prompt: The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Ex - "text" or "text1","text2".
β» Temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
β» Max_Tokens : The maximum number of tokens to generate in the completion. The token count of your prompt plus max_tokens cannot exceed the model's context length. Most models have a context length of 2048 tokens (except for the newest models, which support 4096).
β» No_of_Completions: How many completions to generate for each prompt.
β Outputs:
β» Details of completion with generated texts, model used, total tokens etc.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=zqBkQRV2CIgβ½ Create chat completions
β Inputs:
β» Authorization: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Model: ID of the model to use. Use "gpt-3.5-turbo". See the model endpoint compatibility table for details on which models work with the Chat API.
β» Messages: The messages to generate chat completions. Check the documentation for the message format.
β» Temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
β» n : How many chat completion choices to generate for each input message.
β Outputs:
β» List all models with its details such as id, permissions.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=1F21BntGMa0β½ Edit Texts
β Inputs:
β» Authorization: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Model: ID of the model to use. You can use the text-davinci-edit-001 or code-davinci-edit-001 model with this endpoint.
β» Input: The input text to use as a starting point for the edit.
β» Instruction: The instruction that tells the model how to edit the prompt.
β» Temperature: What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
β» n : How many edits to generate for the input and instruction.
β Outputs:
β» Details of text edited by Open AI.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=EJSc-ADWPXsβ½ Generate Images
β Inputs:
β» Authorization: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Prompt: A text description of the desired image(s). The maximum length is 1000 characters.
β» Size: The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.
β» No_of_Images: The number of images to generate. Must be between 1 and 10.
β» Image_Format: The format in which the generated images are returned. Must be one of url or b64_json.
β Outputs:
β» URL of images as described in the prompt.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=gFhNz6C7WNAβ½ Create image variations
β Inputs:
β» Authorization: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» Image: The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
β» No_of_Images: The number of images to generate. Must be between 1 and 10.
β» Size: The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024.
β» Image_Format: The format in which the generated images are returned. Must be one of url or b64_json.
β Outputs:
β» URL of images as described in the prompt.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=tSbicE62hOQβ½ Create transcriptions from audio file
β Inputs:
β» Authorization: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» File: The audio file to transcribe, in one of these formats: mpeg, mpga, m4a, wav, or webm.
β» Language: The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency. ISO-639-1 URL -
https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes β» No_of_Images: The number of images to generate. Must be between 1 and 10.
β» Image_Format: The format in which the generated images are returned. Must be one of url or b64_json.
β Outputs:
β» Transcript text generated from audio file in the language mentioned in the input.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=ZoRREo12hT0β½ Create translations from audio file
β Inputs:
β» Authorization: It is received from "Get Access Token from Auth Code" or "Get Access Token from Refresh Token" API response.
β» File: The audio file to transcribe, in one of these formats: mpeg, mpga, m4a, wav, or webm.
β» Prompt: An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language.
β Outputs:
β» Translated text generated from audio file.
βΈ Watch the video for the above action here:
https://www.youtube.com/watch?v=0ML-94MWuAw