@ -1,10 +1,15 @@
|
||||
import { z } from 'zod'
|
||||
import { variableStringSchema } from '../../utils'
|
||||
import { blockBaseSchema, credentialsBaseSchema } from '../baseSchemas'
|
||||
import { IntegrationBlockType } from './enums'
|
||||
|
||||
export const openAITasks = ['Create chat completion', 'Create image'] as const
|
||||
|
||||
export const chatCompletionModels = [
|
||||
'gpt-4',
|
||||
'gpt-4-0314',
|
||||
'gpt-4-32k',
|
||||
'gpt-4-32k-0314',
|
||||
'gpt-3.5-turbo',
|
||||
'gpt-3.5-turbo-0301',
|
||||
] as const
|
||||
@ -58,6 +63,11 @@ const chatCompletionOptionsSchema = z
|
||||
messages: z.array(
|
||||
z.union([chatCompletionMessageSchema, chatCompletionCustomMessageSchema])
|
||||
),
|
||||
advancedSettings: z
|
||||
.object({
|
||||
temperature: z.number().or(variableStringSchema).optional(),
|
||||
})
|
||||
.optional(),
|
||||
responseMapping: z.array(
|
||||
z.object({
|
||||
id: z.string(),
|
||||
|
Reference in New Issue
Block a user