i

Please enable JavaScript to view this site.

Documentation 8.7

Apart from the properties shared by adapters those specific to OpenAI are added.

 

 

MA-Area-OpenAI-001

 

An asterisk "*" on the label indicates that the property is required.

 

Web Service URL

Corresponds to the URL that handles requests for services that are made from the Deyel environment to the OpenAI platform.

 

API Key

It is the access key granted by OpenAI to perform user authentication.

 

Rules using this adapter

In this grid, the advanced rules used by the adapter are displayed and their definition can be shown from each line.

Built-in Rules

 

There are built-in rules to use the adapter in Deyel that perform operations using the OpenAI API.

 

 

Name

Description

Parameters

openAICreateEmbeddings

 

 

Given an input text generates the corresponding embedding.

Input

 

input: Text from which the embedding is generated.

 

model: Model identifier to use. It can use text-embedding-ada-002 or text-search-ada-doc-001. By default, text-embedding-ada-002 is used.

 

Output

 

response: Embedding generated.

openAIIntegrationRule

 

 

Given a text and additional parameters, a query is sent to ChatGPT and its answer is awaited.

 

Input

 

model: Model identifier to use. It can use any provided by OpenAI.

 

messages: List of messages indicating the context of the conversation. Each message should keep to the format required by OpenAI where the role and content must be specified.

 

name: Name of the author of the message.

 

temperature: Value indicating randomness in the response by OpenAI. Values correspond to those indicated in its API Reference.

 

topp: Alternative to the temperature parameter. Either one should be used.

 

n:  Indicates the number of possible answers for the chat indicated in the message list.

 

maxtokens: Maximum number of tokens to generate in the chat completion. It is limited by the model used.

 

presencepenalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the likelihood that the model will talk about new topics.

 

frequencypenalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, reducing the likelihood that the model will repeat the same line word for word.

 

user: Unique identifier representing the end user, which can help OpenAI monitor and detect abuse.

 

Output

 

completeResponse: Full answer by OpenAI.

 

listOfMessages:  List of messages generated by OpenAI.

 

listOfMessagesWithRoles: List of messages generated by OpenAI with roles included.

openAIModerationRule

Given an input text, it is checked for inappropriate content according to the OpenAI content policies.

 

Input

 

input: Input text to classify.

 

Output

 

hate: Represents whether or not the given text has hate content.

 

hatethreatening: Represents whether or not the given text has threatening or hate content.

 

selfharm: Represents whether or not the given text has self-harm content.

 

sexual: Represents whether or not the given text has sexual content.

 

sexualminors: Represents whether or not the given text has sexual content on minors.

 

violence: Represents whether or not the given text has violence content.

 

violencegraphic:  Represents whether or not the given text has violence graphic content.

 

 

These rules are in "Draft" state and they should be published by a user with administrator permissions, The OpenAI adapter should be previously published.

Send us your comments
Share on X Share on Linkedin Send by Email Print