Skip to content

Commit

Permalink
✨ Add Perplexity block (#2022)
Browse files Browse the repository at this point in the history
Closes: #1982 

---------

Co-authored-by: Baptiste Arnaud <[email protected]>
  • Loading branch information
Nil2000 and baptisteArno authored Feb 26, 2025
1 parent de6ae74 commit 172e17d
Show file tree
Hide file tree
Showing 24 changed files with 1,921 additions and 815 deletions.
324 changes: 323 additions & 1 deletion apps/docs/openapi/builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -15677,6 +15677,9 @@
},
{
"$ref": "#/components/schemas/posthogBlock"
},
{
"$ref": "#/components/schemas/perplexityBlock"
}
],
"discriminator": {
Expand All @@ -15696,7 +15699,8 @@
"segment": "#/components/schemas/segmentBlock",
"groq": "#/components/schemas/groqBlock",
"zendesk": "#/components/schemas/zendeskBlock",
"posthog": "#/components/schemas/posthogBlock"
"posthog": "#/components/schemas/posthogBlock",
"perplexity": "#/components/schemas/perplexityBlock"
}
}
}
Expand Down Expand Up @@ -20350,6 +20354,324 @@
],
"title": "Posthog"
},
"perplexityBlock": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"outgoingEdgeId": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"perplexity"
]
},
"options": {
"oneOf": [
{
"type": "object",
"properties": {
"credentialsId": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"credentialsId": {
"type": "string"
},
"action": {
"type": "string",
"enum": [
"Create chat completion"
]
},
"model": {
"type": "string",
"enum": [
"sonar-deep-research",
"sonar-reasoning-pro",
"sonar-reasoning",
"sonar-pro",
"sonar"
]
},
"messages": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {}
},
{
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"system"
]
},
"content": {
"type": "string"
}
},
"required": [
"role"
]
},
{
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"user"
]
},
"content": {
"type": "string"
}
},
"required": [
"role"
]
},
{
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"assistant"
]
},
"content": {
"type": "string"
}
},
"required": [
"role"
]
},
{
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"Dialogue"
]
},
"dialogueVariableId": {
"type": "string"
},
"startsBy": {
"type": "string",
"enum": [
"user",
"assistant"
]
}
},
"required": [
"role"
]
}
]
}
},
"tools": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"function"
]
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"parameters": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {}
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"string"
]
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"number"
]
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"boolean"
]
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"enum"
]
},
"values": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"required": {
"type": "boolean"
}
},
"required": [
"type"
]
}
]
}
},
"code": {
"type": "string"
}
},
"required": [
"type"
]
}
]
}
},
"temperature": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
}
]
},
"responseMapping": {
"type": "array",
"items": {
"type": "object",
"properties": {
"item": {
"type": "string",
"enum": [
"Message content",
"Total tokens"
]
},
"variableId": {
"type": "string"
}
}
}
}
},
"required": [
"action"
]
}
]
}
},
"required": [
"id",
"type"
],
"title": "Perplexity"
},
"error.BAD_REQUEST": {
"type": "object",
"properties": {
Expand Down
Loading

0 comments on commit 172e17d

Please sign in to comment.