Mateus Z3
Mateus Z3
TTypebot
Created by Mateus Z3 on 4/26/2024 in #help-and-questions
Fetcher not running on changing option in a custom component
Current action code:
export const invoke = createAction({
name: 'Invoke',
baseOptions,
options: option.object({
chain: option.string.layout({
placeholder: 'Select a chain',
label: 'Chain',
isRequired: true,
fetcher: 'fetchChains',
}),
})
,
fetchers: [
{
"id": "fetchChains",
dependencies: ["baseUrl"],
fetch: async ({ credentials, options }) => {
return ["1", "2", "3", "4"]
}
}
],
})
export const invoke = createAction({
name: 'Invoke',
baseOptions,
options: option.object({
chain: option.string.layout({
placeholder: 'Select a chain',
label: 'Chain',
isRequired: true,
fetcher: 'fetchChains',
}),
})
,
fetchers: [
{
"id": "fetchChains",
dependencies: ["baseUrl"],
fetch: async ({ credentials, options }) => {
return ["1", "2", "3", "4"]
}
}
],
})
the return of the fetcher is static for now only for me to test, I change the baseURL and see the chain component blinking but no data is added to the dropdown, am I missing something?
7 replies
TTypebot
Created by Mateus Z3 on 4/23/2024 in #help-and-questions
Append JSON to variable
How do I append values to a variable without it converting to string? I need to have a list of json, I'm sending this to my endpoint:
{
"input": {
"messages": {{Chat history}}
}
}
{
"input": {
"messages": {{Chat history}}
}
}
tried to use the "custom" option for the variables but I still get a list of strings in the Chat history variable
4 replies
TTypebot
Created by Mateus Z3 on 1/25/2024 in #help-and-questions
React's Bubble component
I'm able to import the Standard component to use the chat but I'm unable to import the Bubble component, it results in the following:
Failed to compile.

./src/App.js
Module not found: Can't resolve '@typebot.io/react/dist/Bubble'
Failed to compile.

./src/App.js
Module not found: Can't resolve '@typebot.io/react/dist/Bubble'
7 replies