...
Code Block | ||
---|---|---|
| ||
{ "base_url": "https://api.openai.com/v1", "model": "gpt-3.5-turbo", "api_token": "your_token", "max_token": 800 } |
Send a prompt to the AI - [ai.prompt.send]
One of the simple most generic an simplest use cases is to send a prompt (= a request) to the AI and use the response data in your pipeline. For this you can use the ai.prompt.send
command. Here is an example to return some data from the AI:
...
The result in the body is then:
Code Block | ||
---|---|---|
| ||
[ "Beijing", "Cairo", "Delhi", "Dhaka", "Mexico City", "Mumbai", "Osaka", "Sao Paulo", "Shanghai", "Tokyo" ] |
...
Code Block | ||
---|---|---|
| ||
pipeline:
- ai.prompt.send:
input: |
{
"person": {
"firstName": "Max",
"lastName": "Smith",
"age": 36
}
}
prompt: |
Remove all personal data because of privacy and
replace by randomized names and add prefix p_ |
...
Code Block | ||
---|---|---|
| ||
{ "person": { "firstName": "p_Alex", "lastName": "p_Johnson", "age": 48 } } |
Text-to-Command
...
Send multiple messages
In you need to send multiple messages, you can use the messages parameter like this:
Code Block | ||
---|---|---|
| ||
pipeline:
- ai.prompt.send:
messages:
- role: system
content: Tell me a joke based on given user input.
- role: user
content: I'm a 28 year old man living in New York. |
The result could be like this in the body:
Code Block |
---|
Why did the New York man bring a ladder to his job interview?
Because he wanted to climb the corporate ladder! |
If messages
and prompt
is given, the prompt will be automatically added as message of role system
at the very end.
Text-to-Command - [ai.command.detect]
This powerful feature of the AI Studio takes a non-structured text such as an email, a chat message or a PDF document for example, analyses it using AI and then automatically detects and executes the according PIPEFORCE command including its parameters which must be executed in order to take action and fulfill the user’s request.
...
Automatically forward emails with a summary to the responsible internal team
Scan any email sent to a given inbox such as info@mycompany.tld for example, find out the intention of the sender, then forward the email to the internal team such as support, sales, … which can handle the request. The AI can find out the type of request, whether it is a support request, an order request, a question regarding an invoice or any other type just by writing an advice to the AI and without any programming. It can also detect and extract all required data such ascustomerId
,invoiceNumber
and more from the sender’s email. Furthermore, it can also create a short summary about what the core intent of the sender is to make it easier for the internal team to process the request.Automatically validate and start an internal workflow by email
Scan any email sent to a given inbox such as invoice@mycompany.tld for example and if this email matches to an existing workflow, extract all variables required for this workflow from the email, start the workflow and pass these variables along with it. For example to start an accounts payable workflow based on an given payable invoice. The AI can validate whether all required data exist and is valid in order to start the workflow.Automatically call endpoints of other systems by email
Scan any email sent to a given inbox such as info@mycompany.tld for example and if this email is related to a service, offered by a third party system which provides an remote API, call this remote API (for example REST) and pass along parameters extracted from the email. For example create a new ticket on an external ticket system.
Using the command ai.command.detect
In order to integrate Text-to-Command functionality into your automation pipelines, you can use the command ai.command.detect
. It will
...