Apps
OpenAI
35 min
discover how to effortlessly connect engini to openai engini’s openai connector enables seamless integration, allowing you to create chat completions, manage moderation tasks, and efficiently handle batch processing directly within your workflows enhance your content generation, moderation, and task automation with this powerful integration getting started with openai prerequisites an openai account active access token retrieve your openai access token create an openai account once you have an account, log in to the openai platform log in to openai once you have an account, log in to the openai platform navigate to the api key section after logging in, go to the api keys section in your openai account this is typically found under the dashboard or settings menu you will see an option to create a new api key click on it generate an api key once you click to create a new api key, a key will be generated this key is your access token copy the api key make sure to store it securely, as it provides access to your openai resources use the access token in your application or script, you’ll use this api key as the authorization header in your http requests to authenticate with openai’s api managing api keys you can manage, regenerate, or delete api keys from the same section in your openai account if your api key is compromised, regenerate it immediately connecting engini to openai enter your engini account at https //app engini io/ navigate to the connections page by clicking on connections in the left sidebar or by clicking docid click on the new integration option located in the top bar choose the openai option from the available applications enter the following details in the “add connection” form connection name api key – enter the access token you obtained from openai triggers the trigger is executed automatically in response to a specific event every workflow must start with a trigger you can use the “check for batches” trigger to initiate your workflow check for batches this trigger will check the batch processing logs in openai starting (utc) date and time specifies when the trigger should start in this example, it is set to start on september 8, 2024, at 00 00 utc recur every interval defines how often the trigger should recur in this case, it is set to recur every 15 minutes add time frame allows you to specify a time frame for which the logs should be checked actions add file to vector store this action allows you to upload a file to a specified vector store in openai vector store id enter the unique id of the vector store where you want to store the file file id provide the id of the file you wish to add to the vector store note make sure to have the correct vector store and file ids before executing this action to ensure proper file storage and retrieval analyze image (vision) this action allows you to analyze an image using openai’s vision model you can provide specific details about the image, such as its type and source, to generate insights model select the ai model that will be used for analyzing the image prompt enter any specific instructions or details for how you want the image to be analyzed image type define the type of image (e g , jpg, png, etc ) image source select the source of the image options include base64 string provide the image data encoded as a base64 string image url provide the url where the image is located image data provide the image data as a url or a base64 encoded string max tokens set the maximum number of tokensthe model can use to generate a response based on the image analysis the default is set to 300 tokens add field click add field to insert more fields to the item choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#wkcxk ) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate append to object array this action allows you to add a new item to an existing object array within your workflow variable select the variable that contains the object array you want to append to the chosen variable should already be defined in your workflow this action is useful for dynamically expanding arrays by adding new data points during the execution of your workflow cancel batch this action allows you to cancel an active or pending batch in openai batch id enter the unique id of the batch you want to cancel this id should correspond to a batch that is currently active or scheduled use this action when you need to stop a batch process before it completes create batch this action allows you to create a new batch of requests in openai input file id enter the id of an uploaded file that contains the requests for the new batch endpoint select the endpoint that will be used for all requests in the batch completion window specify the time window (e g , 24h) within which the batch should be completed add field click add field to insert more fields to the item choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#wkcxk ) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate create chat completion this action allows you to generate a chat completion based on the provided conversation history messages provide a list of messages comprising the conversation so far these messages should include both user and assistant inputs to maintain context model select the id of the model you want to use to generate the chat completion \ add field click add field to insert more fields to the item choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#wkcxk ) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate create moderation this action allows you to classify input text using openai’s moderation tools to determine if the content violates specific policies input enter the text you want to classify this text will be analyzed to check if it complies with moderation guidelines add field click add field to insert more fields to the item choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#wkcxk ) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate create transcription this action allows you to transcribe an audio file using openai’s transcription model filename enter the name of the audio file (in formats such as flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm) content provide the content of the audio file as a base64 encoded string properties model select the transcription model to be used (e g , whisper 1) request format choose the format for the transcription result (e g , text) add field click add field to insert more fields to the item choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#wkcxk ) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate create translation this action allows you to translate an audio file into english using openai’s translation model filename enter the name of the audio file (in formats such as flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm) content provide the content of the audio file as a base64 encoded string properties model select the translation model to be used (e g , whisper 1) response format choose the format for the translation result (e g , json) add field click add field to insert more fields to the item choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#wkcxk ) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate note the translation can only be performed into english generate audio from text this action allows you to convert text into audio using openai’s text to speech capabilities model select the model used to generate the audio from the input text input enter the text you want to convert into audio voice select the voice to be used when generating the audio add field click add field to insert more fields to the item choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#wkcxk ) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate delete file this action allows you to delete a file from openai’s system file id enter the unique id of the file you want to delete make sure you have the correct file id, as this action will permanently remove the file from the system delete vector store file this action allows you to delete a file from a specific vector store in openai vector store id enter the unique id of the vector store from which you want to delete the file file id enter the unique id of the file you want to delete from the vector store note ensure that both the vector store id and file id are correct, as this action will permanently remove the file from the specified vector store download file content this action allows you to download the content of a file from openai’s system file id enter the unique id of the file you want to download the file’s content will be retrieved based on this id note ensure that the correct file id is provided to successfully download the file content edit image this action allows you to edit an image using openai’s image editing capabilities prompt enter a description of the changes you want to apply to the image image filename provide the name of the image you want to edit content enter the content of the image as a base64 encoded string you can also click add mask image to include a mask that specifies which parts of the image should be edited generate image this action allows you to create an image using openai’s image generation capabilities prompt enter a detailed text description of the desired image(s) the ai will use this prompt to generate an image based on the provided description add field click add field to insert more fields to the item choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#wkcxk ) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate get batch info this action allows you to retrieve information about a specific batch in openai batch id enter the unique id of the batch for which you want to retrieve information the details of the batch will be fetched based on this id note ensure the correct batch id is provided to successfully retrieve the batch information get batches this action allows you to retrieve a list of batches stored in openai’s system you can use this to view all the batches that have been created and track their status initialize object array this activity initializes an object array in open ai, and stores a single structured entry based on the selected object type (e g assistant message, attachments, chat message) variable name enter the name of the variable that will hold the initialized object array this name will be used throughout the workflow whenever you refer to this object array object element type this field defines the type of data the array will store, such as assistant messages, attachments, or chat messages the selected type determines the structure of the array and its use in subsequent actions add field click add field to insert more fields to the item choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#wkcxk ) static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate list files this action allows you to retrieve a list of files stored in openai’s system add filter you can specify which records will be returned from the search results by utilizing the “add filter” button choose from the drop down the field you want to filter by select the condition you want the record to meet for the selected field you can populate the field in one of the following options static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a d for all the fields you want to populate list vector store files this action allows you to retrieve a list of files stored in a specific vector store in openai vector store id enter the unique id of the vector store from which you want to list the files order by created at select whether you want to order the files by the date they were created in ascending or descending order filter you can specify which records will be returned from the search results by utilizing the “add filter” button choose from the drop down the field you want to filter by select the condition you want the record to meet for the selected field you can populate the field in one of the following options static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a d for all the fields you want to populate message an assistant this action allows you to send a message to an assistant in openai assistant id enter the unique id of the assistant to which you want to send the message message provide the content of the message you want to send tools select any tools the assistant should use when processing the message add field click add field to insert more fields to the item choose from the drop down the field you want to fill click on the empty field to the right of the drop down to be shown the tooltip with all the options you can use to fill the field you can populate the field in one of the following options (depending on the column type, please refer to the https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview td33fdcyfx3ign84qa0pd#wkcxk static value – number / string when using strings, you need to surround them with single quotes (‘) property value from a previous activity (using the tooltip that opens when clicking on the field) expression – using https //app archbee com/public/preview ixqqblwfxopjg0nave78y/preview o3kkbgi5xnqf yvnuqkcv#ca 5p and/or previous activity properties and/or static values (using the tooltip that opens when clicking on the field) repeat steps a c for all the fields you want to populate upload file this action allows you to upload a file to openai’s system filename enter the name of the file you want to upload content provide the content of the file as a base64 encoded string purpose select the purpose of the uploaded file from the list purpose (e g , assistants, batch, embedding, fine tune, vision) note make sure to select the appropriate purpose to ensure the file is used correctly within openai’s system