@ -8,6 +8,7 @@ import { ChatNodeResponse } from '../types'
|
||||
export const sendMessage = createAction({
|
||||
auth,
|
||||
name: 'Send Message',
|
||||
turnableInto: undefined,
|
||||
options: option.object({
|
||||
botId: option.string.layout({
|
||||
label: 'Bot ID',
|
||||
|
@ -67,6 +67,15 @@ export const createChatCompletion = createAction({
|
||||
name: 'Create chat completion',
|
||||
auth,
|
||||
options,
|
||||
turnableInto: [
|
||||
{
|
||||
blockType: 'openai',
|
||||
},
|
||||
{
|
||||
blockType: 'together-ai',
|
||||
},
|
||||
{ blockType: 'open-router' },
|
||||
],
|
||||
getSetVariableIds: (options) =>
|
||||
options.responseMapping?.map((res) => res.variableId).filter(isDefined) ??
|
||||
[],
|
||||
|
@ -9,7 +9,7 @@ export const auth = {
|
||||
isRequired: true,
|
||||
inputType: 'password',
|
||||
helperText:
|
||||
'You can generate an API key [here](https://console.mistral.ai/user/api-keys/).',
|
||||
'You can generate an API key [here](https://console.mistral.ai/api-keys).',
|
||||
}),
|
||||
}),
|
||||
} satisfies AuthDefinition
|
||||
|
@ -12,6 +12,15 @@ import { ModelsResponse } from '../types'
|
||||
export const createChatCompletion = createAction({
|
||||
name: 'Create chat completion',
|
||||
auth,
|
||||
turnableInto: [
|
||||
{
|
||||
blockType: 'openai',
|
||||
},
|
||||
{
|
||||
blockType: 'together-ai',
|
||||
},
|
||||
{ blockType: 'mistral' },
|
||||
],
|
||||
options: parseChatCompletionOptions({
|
||||
modelFetchId: 'fetchModels',
|
||||
}),
|
||||
|
@ -19,6 +19,15 @@ export const createChatCompletion = createAction({
|
||||
modelFetchId: 'fetchModels',
|
||||
}),
|
||||
getSetVariableIds: getChatCompletionSetVarIds,
|
||||
turnableInto: [
|
||||
{
|
||||
blockType: 'open-router',
|
||||
},
|
||||
{
|
||||
blockType: 'together-ai',
|
||||
},
|
||||
{ blockType: 'mistral' },
|
||||
],
|
||||
fetchers: [
|
||||
{
|
||||
id: 'fetchModels',
|
||||
|
@ -14,6 +14,15 @@ export const createChatCompletion = createAction({
|
||||
modelHelperText:
|
||||
'You can find the list of all the models available [here](https://docs.together.ai/docs/inference-models#chat-models). Copy the model string for API.',
|
||||
}),
|
||||
turnableInto: [
|
||||
{
|
||||
blockType: 'openai',
|
||||
},
|
||||
{
|
||||
blockType: 'open-router',
|
||||
},
|
||||
{ blockType: 'mistral' },
|
||||
],
|
||||
getSetVariableIds: getChatCompletionSetVarIds,
|
||||
run: {
|
||||
server: (params) =>
|
||||
|
Reference in New Issue
Block a user