André
André
TTypebot
Created by André on 4/9/2024 in #help-and-questions
How to execute the "window.location.hostname" Javascript on a TypeBot variable?
Hi, In a bot I need to execute the Javascript "window.location.hostname". It is possible to do it in a TypeBot variable? Thanks.
3 replies
TTypebot
Created by André on 12/30/2023 in #help-and-questions
Problem with Webhook timeout. Request to https://www.together.ai/
Hi, I'm building a chatbot that uses an LLM. I've been using together.ai. The requests to the API due to the nature of the LLM's sometimes takes more than 10 seconds. I've been investigating the code: https://github.com/baptisteArno/typebot.io/blob/main/packages/bot-engine/blocks/integrations/webhook/executeWebhookBlock.ts It seems that this problem will be handle in the future. Anybody know when will be possible to adjust the timeouts? Best Regards, André.
7 replies
TTypebot
Created by André on 12/29/2023 in #help-and-questions
How to set a JavaScript Array variable in Typebot?
Hi, I'm struggling to set an Javascript array variable in Typebot. The context is the following. I need to generate an array of messages to send to an API via Webhook. The Webhook have the following body: { "model": "some-model", "max_tokens": 1024, "messages": {{messages_hist}}, "stream": false } I need to pass in "messages" the following Array: [{"role": "system","content": "some system message"},{"role": "user","content": "some user message"}] To achieve this I'm trying to 'Set variable' in the Typebot. A 'Custom' variable by the way, with this: [{"role": "system","content": "some system message"},{"role": "user","content": "some user message"}] The problem is that the Webhook does not work because(I think) what's inside the JS Array is being interpreted as a regular string: ["{"role":"system","content":"some system message"}","{"role":"user","content":"some user message"}"] Any clues on how to handle Array variables in Typebot?
11 replies