(openai) Add Messages sequence type

To make it easy to just plug a sequence of user / assistant messages to Chat completion task

Closes #387
This commit is contained in:
Baptiste Arnaud
2023-03-13 16:28:08 +01:00
parent 48db171c1b
commit c4db2f42a6
27 changed files with 468 additions and 153 deletions

View File

@@ -1,3 +1,4 @@
import { WithVariableContent } from '@/features/graph/components/Nodes/BlockNode/BlockNodeContent/WithVariableContent'
import { Text } from '@chakra-ui/react'
import { FileInputOptions } from 'models'
@@ -5,8 +6,13 @@ type Props = {
options: FileInputOptions
}
export const FileInputContent = ({ options: { isMultipleAllowed } }: Props) => (
<Text noOfLines={1} pr="6">
Collect {isMultipleAllowed ? 'files' : 'file'}
</Text>
)
export const FileInputContent = ({
options: { isMultipleAllowed, variableId },
}: Props) =>
variableId ? (
<WithVariableContent variableId={variableId} />
) : (
<Text noOfLines={1} pr="6">
Collect {isMultipleAllowed ? 'files' : 'file'}
</Text>
)