2
0
Files
bot/packages/forge/blocks/openai/shared/getChatCompletionSetVarIds.ts

6 lines
272 B
TypeScript
Raw Normal View History

import { isDefined } from '@typebot.io/lib'
import { ChatCompletionOptions } from './parseChatCompletionOptions'
export const getChatCompletionSetVarIds = (options: ChatCompletionOptions) =>
options.responseMapping?.map((res) => res.variableId).filter(isDefined) ?? []