2
0
Commit Graph

1113 Commits

Author SHA1 Message Date
2fcf83c529 Introduce a new high-performing standalone chat API (#1200)
Closes #1154

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
	- Added authentication functionality for user sessions in chat API.
- Introduced chat-related API endpoints for starting, previewing, and
continuing chat sessions, and streaming messages.
- Implemented WhatsApp API webhook handling for receiving and processing
messages.
- Added environment variable `NEXT_PUBLIC_CHAT_API_URL` for chat API URL
configuration.

- **Bug Fixes**
	- Adjusted file upload logic to correctly determine the API host.
	- Fixed message streaming URL in chat integration with OpenAI.

- **Documentation**
- Updated guides for creating blocks, local installation, self-hosting,
and deployment to use `bun` instead of `pnpm`.

- **Refactor**
	- Refactored chat API functionalities to use modular architecture.
- Simplified client log saving and session update functionalities by
using external functions.
	- Transitioned package management and workflow commands to use `bun`.

- **Chores**
- Switched to `bun` for package management in Dockerfiles and GitHub
workflows.
	- Added new Dockerfile for chat API service setup with Bun framework.
	- Updated `.prettierignore` and documentation with new commands.

- **Style**
	- No visible changes to end-users.

- **Tests**
	- No visible changes to end-users.

- **Revert**
	- No reverts in this release.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-21 10:23:23 +01:00
dbc875448b 🛂 (radar) Improve radar regex 2024-03-20 17:01:53 +01:00
9c86c5e76f 🐛 (pictureChoice) Fix dynamic image only variable saving 2024-03-19 14:02:53 +01:00
a4c865ca26 💚 Fix embeds build and create-block CLI 2024-03-19 10:38:55 +01:00
ed5096e2b6 ♻️ Include forged blocks schema in typebot schema
Closes #1364
2024-03-19 08:31:36 +01:00
26a9282c20 🐛 (fileUpload) Handle duplicate names properly
Closes #1366
2024-03-18 18:22:45 +01:00
782c08b15e 🐛 Fix retry message variable parsing
Closes #1369
2024-03-18 18:10:17 +01:00
e035a54cfc 🐛 (difyAi) Fix chunk parsing
Closes #1370
2024-03-18 18:05:35 +01:00
3ac211d74a 🐛 (anthropic) Upgrade sdk to fix stream issue 2024-03-18 10:29:37 +01:00
5073be2439 ♻️ Remove @typebot.io/schemas from @typebot.io/lib 2024-03-15 16:32:29 +01:00
b53242ce6a 🐛 (bot) Fix await processClientActio… 2024-03-15 15:56:04 +01:00
7d11a7dbc8 🐛 (anthropic) Fix transform functions when response mapping has Message content 2024-03-15 15:18:16 +01:00
663653ec9a 🐛 (bubble) Fix bubble bot window left overflow
Closes #1362
2024-03-15 15:18:16 +01:00
e9011aefd0 🐛 (wait) Parse wait seconds as float instead of int
Closes #1355
2024-03-15 15:17:07 +01:00
cdbdb3546c 🚸 Remove debounce on forged block credentials…
Closes #1357
2024-03-15 15:17:07 +01:00
1202f09802 🐛 (anthropic) Fix turn into other blocks
Closes #1356
2024-03-15 15:17:07 +01:00
968abf5243 🚸 (calCom) Fix embed responsivity
Closes #1210
2024-03-15 15:16:53 +01:00
3f294c9093 ⬇️ Downgrade anthropic sdk to make it compatible with ai sdk 2024-03-15 08:50:07 +01:00
ff3807a265 ⬆️ Upgrade ai package 2024-03-14 19:40:40 +01:00
ecec7023b9 Add Anthropic block (#1336)
Hello @baptisteArno,

As we discussed in issue #1315 we created a basic implementation of
Anthropic’s Claude AI block.
This block is based on the OpenAI block and shares a similar structure.

The most notable changes in this PR are:
- Added the Claude AI block.
- Added relevant documentation for the new block.
- Formatted some other source files in order to pass git pre-hook
checks.

Some notes to be made:
- Currently there is no way to dynamically fetch the model’s versions
since there is no endpoint provided by the SDK.
  - All pre version-3 Claude models are hard-coded constant variables.
- We have opened an issue for that on the SDK repository
[here](https://github.com/anthropics/anthropic-sdk-typescript/issues/313).
- We can implement in a new PR Claude’s new [Vision
system](https://docs.anthropic.com/claude/docs/vision) which allows for
image analysis and understanding.
  - This can be done in a later phase, given that you agree of course.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Introduced the Anthropic block for creating chat messages with Claude
AI in Typebot.
- Added functionality to create chat messages using Anthropic AI SDK
with configurable options.
	- Implemented encrypted credentials for Anthropic account integration.
- Added constants and helpers for better handling of chat messages with
Anthropic models.
- Included Anthropic block in the list of enabled and forged blocks for
broader access.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Retr0-01 <contact@retr0.dev>
Co-authored-by: Baptiste Arnaud <baptiste.arnaud95@gmail.com>
Co-authored-by: Baptiste Arnaud <contact@baptiste-arnaud.fr>
2024-03-12 17:53:33 +00:00
a9daac68ba 🚸 Add aria-label on Bubble close button (#1344)
Fix Issue
[#1321](https://github.com/baptisteArno/typebot.io/issues/1321) Preview
Message button's accessibility issue
2024-03-12 13:12:38 +00:00
bbeb12cad2 🐛 Fix progress bar crash when input is undefined 2024-03-11 08:56:50 +01:00
0dc276c18f Restore chat state when user is remembered (#1333)
Closes #993

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Added a detailed explanation page for the "Remember user" setting in
the app documentation.
- Introduced persistence of chat state across sessions, with options for
local or session storage.
- Enhanced bot functionality to store and retrieve initial chat replies
and manage bot open state with improved storage handling.
- Added a new callback for chat state persistence to bot component
props.

- **Improvements**
- Updated the general settings form to clarify the description of the
"Remember user" feature.
- Enhanced custom CSS handling and progress value persistence in bot
components.
- Added conditional transition disabling in various components for
smoother user experiences.
- Simplified the handling of `onTransitionEnd` across multiple bubble
components.

- **Refactor**
- Renamed `inputIndex` to `chunkIndex` or `index` in various components
for consistency.
	- Removed unused ESLint disable comments related to reactivity rules.
	- Adjusted import statements and cleaned up code across several files.

- **Bug Fixes**
- Fixed potential issues with undefined callbacks by introducing
optional chaining in component props.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-07 15:39:09 +01:00
583294f90c 🐛 (whatsapp) Fix auto start when first input is file
Closes #1246
2024-03-07 14:26:48 +01:00
59cf993146 🐛 Fix back button refreshing the page when typebot in folder
Closes #1297
2024-03-07 14:26:48 +01:00
c2003dab91 ⬆️ Upgrade ai and openai packages 2024-03-07 14:26:48 +01:00
b05fafe518 🐛 Fix progress bar fixed position on Bubble embed
Closes #1328
2024-03-07 14:26:48 +01:00
df209a8e9d 🧑‍💻 (whatsapp) Option to modify the default interactive split message number (#1296)
When using the whatsapp oficial api or another that use the same schema,
with env we can modify the number of groups that the interactive group
will be split.

---------

Co-authored-by: Baptiste Arnaud <baptiste.arnaud95@gmail.com>
Co-authored-by: Baptiste Arnaud <contact@baptiste-arnaud.fr>
2024-03-07 08:05:08 +00:00
0f96440cf9 (calCom) Add additional notes prefill option 2024-03-06 10:11:49 +01:00
2fb379b102 Add "turn into" option in block context menu
Closes #1302
2024-03-05 15:46:28 +01:00
84d6c594af Add OpenRouter block
Closes #1254
2024-03-05 10:56:54 +01:00
77bc138c38 🚸 (results) Improve submitted at field parsing 2024-03-05 10:06:42 +01:00
022a320e7e 🚸 (elevenLabs) Only show text-to-speech compatible models 2024-03-05 09:50:33 +01:00
daaca9f817 🐛 (textBubble) Fix variable with text styles unwanted break lines 2024-03-04 16:21:06 +01:00
ef69b5b77c 📝 Add v2.23 newsletter 2024-03-04 15:16:30 +01:00
4ca613e83a ♻️ Use at function instead of dangerous direct lookup array index 2024-03-04 14:14:06 +01:00
f14eb91d2a 🐛 (fileUpload) Fix files deletion on result delete 2024-03-04 11:38:20 +01:00
434b06767d 📈 (posthog) Send user last login event 2024-03-04 10:04:48 +01:00
8846cdbf6b 💄 (bot) Show only loading bubble when current block only has messages 2024-03-02 14:43:38 +01:00
fee6b2d151 🧐 Add deleteChatSession script 2024-03-02 09:07:55 +01:00
3037771d1c 💚 Remove unused mp4 url check 2024-03-01 18:05:04 +01:00
3971e4a888 🚸 (whatsapp) Remove .mp4 regex restriction for video URLs
Closes #1282
2024-03-01 16:24:36 +01:00
dd9b7eebb5 🐛 (bot) Remove SendButton disable state
It did not turn enable on some browser when input is autofilled

Closes #878
2024-03-01 16:02:16 +01:00
648ec08a10 Add Together AI block (#1304)
Closes #1253
2024-03-01 15:33:22 +01:00
275ba1b1c4 🚑 (whatsapp) Fix broken preview 2024-02-28 15:49:18 +01:00
060c49dcde 🔊 (whatsapp) Improve phone ID verification error details 2024-02-28 15:19:30 +01:00
9b656214d1 🐛 (chat) Enable prefilledVariables in preview mode
Also make list values compatible
2024-02-28 14:49:04 +01:00
229453d3d3 💄 Improve progress bar UI and make avoid starting at 0 2024-02-27 14:22:46 +01:00
0b193101b9 🐛 (theme) Fix custom bg color when type is undefined 2024-02-27 11:34:12 +01:00
33d0fcd842 🚸 (theme) Improve custom font flow by asking for font-face props directly 2024-02-27 11:28:37 +01:00