⚡ (openai) Add Messages sequence type
To make it easy to just plug a sequence of user / assistant messages to Chat completion task Closes #387
This commit is contained in:
@@ -3,7 +3,15 @@
|
||||
With the OpenAI block, you can create a chat completion based on your user queries and display the answer back to your typebot.
|
||||
|
||||
<img
|
||||
src="/img/blocks/integrations/openai.png"
|
||||
src="/img/blocks/integrations/openai/overview.png"
|
||||
width="600"
|
||||
alt="OpenAI block"
|
||||
/>
|
||||
|
||||
This integration comes with a convenient message type called **Messages sequence ✨**. It allows you to directly pass a sequence of saved assistant / user messages:
|
||||
|
||||
<img
|
||||
src="/img/blocks/integrations/openai/messages-sequence.png"
|
||||
width="600"
|
||||
alt="OpenAI messages sequence"
|
||||
/>
|
||||
|
||||
@@ -2957,27 +2957,62 @@
|
||||
"messages": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"system",
|
||||
"user",
|
||||
"assistant"
|
||||
]
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"system",
|
||||
"user",
|
||||
"assistant"
|
||||
]
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"Messages sequence ✨"
|
||||
]
|
||||
},
|
||||
"content": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"assistantMessagesVariableId": {
|
||||
"type": "string"
|
||||
},
|
||||
"userMessagesVariableId": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"role"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id"
|
||||
],
|
||||
"additionalProperties": false
|
||||
]
|
||||
}
|
||||
},
|
||||
"responseMapping": {
|
||||
|
||||
BIN
apps/docs/static/img/blocks/integrations/openai/messages-sequence.png
vendored
Normal file
BIN
apps/docs/static/img/blocks/integrations/openai/messages-sequence.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Reference in New Issue
Block a user