RPA.OpenAI
Keyword for authorize to Azure OpenAI.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
api_key | str | null | Your Azure OpenAI API key |
api_base | str | null | Your Endpoint URL. Example: https://docs-test-001.openai.azure.com/ |
api_type | str, None | azure | "azure" |
api_version | str, None | 2023-05-15 | "2023-05-15" |
param api_key: | Your Azure OpenAI API key |
---|---|
param api_base: | Your Endpoint URL. Example: https://docs-test-001.openai.azure.com/ |
param api_type: | "azure" |
param api_version: | |
"2023-05-15" |
Robot Framework example:
Python example:
Keyword for authorize to OpenAI with your API key obtained from your account.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
api_key | str | null | Your OpenAI API key |
param api_key: | Your OpenAI API key |
---|
Robot Framework example:
Python example:
Keyword for creating ChatGPT text completions using OpenAI or Azure OpenAI. Keyword returns the response as a string and the message history as a list.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
user_content | str, None | None | Text submitted to ChatGPT to generate completions. |
conversation | List, None | None | List containing the conversation to be continued. Leave empty for a new conversation. |
model | str, None | gpt-3.5-turbo | For OpenAI the ID of the model to use, e.g. gpt-4 or gpt-3.5-turbo. For Azure OpenAI the Deployment name, e.g. myGPT4deployment. |
system_content | str, None | None | The system message helps set the behavior of the assistant. |
temperature | int, None | 1 | What sampling temperature to use between 0 to 2. Higher values means the model will take more risks. |
top_probability | int, None | 1 | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. |
frequency_penalty | int, None | 0 | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far. |
presence_penalty | int, None | 0 | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far. |
Note. When using Azure OpenAI you must provide the deployment_name as the model parameter instead of the model ID used with OpenAI.
param user_content: | |
---|---|
Text submitted to ChatGPT to generate completions. | |
param conversation: | |
List containing the conversation to be continued. Leave empty for a new conversation. | |
param model: | For OpenAI the ID of the model to use, e.g. gpt-4 or gpt-3.5-turbo. For Azure OpenAI the Deployment name, e.g. myGPT4deployment. |
param system_content: | |
The system message helps set the behavior of the assistant. | |
param temperature: | |
What sampling temperature to use between 0 to 2. Higher values means the model will take more risks. | |
param top_probability: | |
An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. | |
param frequency_penalty: | |
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far. | |
param presence_penalty: | |
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far. |
Robot Framework example:
Keyword for creating text completions in OpenAI and Azure OpenAI. Keyword returns a text string.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
prompt | str | null | Text submitted to OpenAI for creating natural language. |
model | str, None | text-davinci-003 | For OpenAI the ID of the model to use, e.g. text-davinci-003. For Azure OpenAI the Deployment name, e.g. myDavinci3deployment. |
temperature | int, None | 0.7 | What sampling temperature to use. Higher values means the model will take more risks.. |
max_tokens | int, None | 256 | The maximum number of tokens to generate in the completion.. |
top_probability | int, None | 1 | Controls diversity via nucleus sampling. 0.5 means half of all likelihood-weighted options are considered. |
frequency_penalty | int, None | 0 | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far. |
presence_penalty | int, None | 0 | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far. |
result_format | str, None | string | Result format (string / json). Return just a string or the default JSON response. |
Note. When using Azure OpenAI you must provide the deployment_name as the model parameter instead of the model ID used with OpenAI.
param prompt: | Text submitted to OpenAI for creating natural language. |
---|---|
param model: | For OpenAI the ID of the model to use, e.g. text-davinci-003. For Azure OpenAI the Deployment name, e.g. myDavinci3deployment. |
param temperature: | |
What sampling temperature to use. Higher values means the model will take more risks.. | |
param max_tokens: | |
The maximum number of tokens to generate in the completion.. | |
param top_probability: | |
Controls diversity via nucleus sampling. 0.5 means half of all likelihood-weighted options are considered. | |
param frequency_penalty: | |
Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far. | |
param presence_penalty: | |
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far. | |
param result_format: | |
Result format (string / json). Return just a string or the default JSON response. |
Robot Framework example:
Python example:
Keyword for creating one or more images using OpenAI. Keyword returns a list of urls for the images created.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
prompt | str | null | A text description of the desired image(s). The maximum length is 1000 characters. |
size | str, None | 512x512 | Size of the files to be created. 256x256, 512x512, 1024x1024 |
num_images | int, None | 1 | The number of images to generate. Must be between 1 and 10. |
result_format | str, None | list | Result format (list / json). |
Note. Keyword not supported in the Azure OpenAI service.
param prompt: | A text description of the desired image(s). The maximum length is 1000 characters. |
---|---|
param size: | Size of the files to be created. 256x256, 512x512, 1024x1024 |
param num_images: | |
The number of images to generate. Must be between 1 and 10. | |
param result_format: | |
Result format (list / json). |
Robot Framework example:
Python example:
Keyword for creating one or more variations of a image. Keyword returns a list of urls for the images created. Source file must be a valid PNG file, less than 4MB, and square.
Arguments
Argument | Type | Default value | Description |
---|---|---|---|
src_image | str | null | The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square. |
size | str, None | 512x512 | The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024. |
num_images | int, None | 1 | The number of images to generate. Must be between 1 and 10 |
result_format | str, None | list | Result format (list / json). |
Note. Keyword not supported in the Azure OpenAI service.
param src_image: | |
---|---|
The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square. | |
param size: | The size of the generated images. Must be one of 256x256, 512x512, or 1024x1024. |
param num_images: | |
The number of images to generate. Must be between 1 and 10 | |
param result_format: | |
Result format (list / json). |
Robot Framework example:
Python example: