Robot Framework's OpenAI Library
The OpenAI library of Robot Framework provides a set of keywords to leverage the capabilities of OpenAI and Azure OpenAI programmatically.
Prerequisites
Before using this library, please note the following points:
An OpenAI or Azure OpenAI account is required to use this library. It is essential to set up an API key in the corresponding account.
The use of the library is subject to the restrictions of the OpenAI subscription.
Available features are limited to data accessible through OpenAI.
Available Keywords
The Robot Framework OpenAI library offers the following keywords:
Authorize To Azure Openai
Authorizes access to Azure OpenAI.
Authorize To Openai
Authorizes access to OpenAI using your API key obtained from your account.
Chat Completion Create
Creates ChatGPT text completions using OpenAI or Azure OpenAI.
Returns the response as a string and message history as a list.
Completion Create
Creates text completions using OpenAI and Azure OpenAI.
Returns a text string.
Image Create
Creates one or more images using OpenAI.
Returns a list of URLs for the created images.
Not supported for Azure OpenAI.
Image Create Variation
Creates one or more variations of an image.
Returns a list of URLs for the created images.
The source file must be a valid PNG file, less than 4 MB, and square-shaped.
Not supported for Azure OpenAI.
Comprehensive documentation for this library is available on the Robot Framework website.
Usage
To use this feature, use the appropriate keywords from the Robot Framework OpenAI library to access the functionalities of OpenAI and Azure OpenAI.
Example Usage
Remember to create a secret variable in which you will put your OpenAI API key.
Related content
©️2023 Alithya GoTest - All Rights Reserved
Need Help? You have a suggestion?