2
0

Add Together AI block (#1304)

Closes #1253
This commit is contained in:
Baptiste Arnaud
2024-03-01 15:33:22 +01:00
committed by GitHub
parent 275ba1b1c4
commit 648ec08a10
27 changed files with 623 additions and 361 deletions

View File

@ -61,6 +61,8 @@ export const ZodFieldLayout = ({
const innerSchema = getZodInnerSchema(schema)
const layout = innerSchema._def.layout
if (layout?.isHidden) return null
switch (innerSchema._def.typeName) {
case 'ZodObject':
return (

View File

@ -9,6 +9,7 @@ import {
Text,
} from '@chakra-ui/react'
import { z } from '@typebot.io/forge/zod'
import React from 'react'
import { ZodLayoutMetadata } from '@typebot.io/forge/zod'
import { ReactNode } from 'react'
import { ZodTypeAny } from 'zod'
@ -32,7 +33,9 @@ export const ZodObjectLayout = ({
blockDef?: ForgedBlockDefinition
blockOptions?: ForgedBlock['options']
onDataChange: (value: any) => void
}) => {
}): ReactNode[] => {
const layout = getZodInnerSchema(schema)._def.layout
if (layout?.isHidden) return []
return Object.keys(schema.shape).reduce<{
nodes: ReactNode[]
accordionsCreated: string[]
@ -43,6 +46,8 @@ export const ZodObjectLayout = ({
const layout = keySchema._def.layout as
| ZodLayoutMetadata<ZodTypeAny>
| undefined
if (layout?.isHidden) return nodes
if (
layout &&
layout.accordion &&

View File

@ -18792,7 +18792,8 @@
"qr-code",
"dify-ai",
"mistral",
"elevenlabs"
"elevenlabs",
"together-ai"
]
},
"options": {}

View File

@ -9413,7 +9413,8 @@
"qr-code",
"dify-ai",
"mistral",
"elevenlabs"
"elevenlabs",
"together-ai"
]
},
"options": {}