Skip to content

Commit

Permalink
📝 Add OpenAI Dialogue option in breaking change doc
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Nov 13, 2023
1 parent 06065c3 commit c59df18
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 14 deletions.
13 changes: 0 additions & 13 deletions apps/docs/docs/breaking-changes.md

This file was deleted.

38 changes: 38 additions & 0 deletions apps/docs/docs/breaking-changes.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Breaking changes

## Typebot v6

- List variables now don't automatically display the last item when inserted into a bubble. It was too "magical". Now you can leverage the inline code feature to easily get the last element of a list:

```
{{={{List var}}.at(-1)=}}
```

Check out the new [Inline variable formatting section](./editor/variables) for more information.

- Input prefill is now disabled by default. You can still enable it in the [Settings](./editor/settings) tab of your bot.

- `Message sequence` option in the OpenAI block was removed because it was also too "magical" and it. Now I've introduced the `Dialogue` option. For more information:

<div
style={{
position: 'relative',
paddingBottom: '64.5933014354067%',
height: 0,
}}
>
<iframe
src="https://www.loom.com/embed/df5d64dd01ca47daa5b7acd18b05a725?sid=e6df2f5b-643c-4175-8351-03e1726b2749"
frameBorder={0}
webkitallowfullscreen
mozallowfullscreen
allowFullScreen
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
}}
/>
</div>
7 changes: 6 additions & 1 deletion packages/bot-engine/startSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { defaultSettings } from '@typebot.io/schemas/features/typebot/settings/c
import { IntegrationBlockType } from '@typebot.io/schemas/features/blocks/integrations/constants'
import { defaultTheme } from '@typebot.io/schemas/features/typebot/theme/constants'
import { VisitedEdge } from '@typebot.io/prisma'
import { env } from '@typebot.io/env'

type StartParams =
| ({
Expand Down Expand Up @@ -273,7 +274,11 @@ const getTypebot = async (startParams: StartParams): Promise<StartTypebot> => {
if (startParams.type === 'preview' && startParams.typebot)
return startParams.typebot

if (startParams.type === 'preview' && !startParams.userId)
if (
startParams.type === 'preview' &&
!startParams.userId &&
!env.NEXT_PUBLIC_E2E_TEST
)
throw new TRPCError({
code: 'UNAUTHORIZED',
message: 'You need to be authenticated to perform this action',
Expand Down

0 comments on commit c59df18

Please sign in to comment.