Skip to content
Open
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/docs/content/docs/tools/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"perplexity",
"pinecone",
"reddit",
"rightbrain",
"s3",
"serper",
"slack",
Expand Down
524 changes: 524 additions & 0 deletions apps/docs/content/docs/tools/rightbrain.mdx

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions apps/sim/blocks/blocks/rightbrain.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { RightBrainIcon } from '@/components/icons'
import { RightBrainRunTaskResponse } from '@/tools/rightbrain/types'
import { BlockConfig } from '../types'

export const RightBrainBlock: BlockConfig<RightBrainRunTaskResponse> = {
type: 'rightbrain',
name: 'Rightbrain',
description: 'Run a Rightbrain AI task',
longDescription:
'Rightbrain lets you reliably deploy LLMs for specific tasks across any app or workflow by turning simple instructions into scalable APIs.',
docsLink: 'https://docs.rightbrain.ai/intro',
category: 'tools',
bgColor: '#E0E0E0',
icon: RightBrainIcon,
subBlocks: [
{
id: 'url',
title: 'Task URL',
type: 'short-input',
layout: 'full',
placeholder: 'Rightbrain task URL',
},
{
id: 'inputs',
title: 'Task inputs',
type: 'code',
layout: 'full',
placeholder: 'The task_input JSON object',
},
{
id: 'apiKey',
title: 'API Key',
type: 'short-input',
layout: 'full',
placeholder: 'Your Rightbrain API key',
password: true,
},
],
tools: {
access: ['rightbrain_run_task'],
},
inputs: {
url: { type: 'string', required: true },
inputs: { type: 'json', required: true },
apiKey: { type: 'string', required: true },
},
outputs: {
response: {
type: {
charged_credits: 'any',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: charged_credits type should be more specific than 'any' - based on the Rightbrain API docs this should be a number

created: 'string',
id: 'string',
input_processor_timing: 'any',
input_tokens: 'number',
llm_call_timing: 'any',
output_tokens: 'number',
response: 'json',
run_data: 'json',
task_id: 'string',
task_revision_id: 'string',
total_tokens: 'number',
is_error: 'any',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: is_error should be typed as boolean rather than 'any' for better type safety

Suggested change
is_error: 'any',
is_error: 'boolean',

},
},
},
}
2 changes: 2 additions & 0 deletions apps/sim/blocks/registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { OpenAIBlock } from './blocks/openai'
import { PerplexityBlock } from './blocks/perplexity'
import { PineconeBlock } from './blocks/pinecone'
import { RedditBlock } from './blocks/reddit'
import { RightBrainBlock } from './blocks/rightbrain'
import { RouterBlock } from './blocks/router'
import { S3Block } from './blocks/s3'
import { SerperBlock } from './blocks/serper'
Expand Down Expand Up @@ -91,6 +92,7 @@ export const registry: Record<string, BlockConfig> = {
perplexity: PerplexityBlock,
pinecone: PineconeBlock,
reddit: RedditBlock,
rightbrain: RightBrainBlock,
router: RouterBlock,
s3: S3Block,
serper: SerperBlock,
Expand Down
Loading