-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚡ (bot) Use ky for queries in bot to improve reliability
- Loading branch information
1 parent
f2cccbd
commit a653646
Showing
11 changed files
with
167 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,34 @@ | ||
import { guessApiHost } from '@/utils/guessApiHost' | ||
import { isNotEmpty, sendRequest } from '@typebot.io/lib' | ||
import { isNotEmpty } from '@typebot.io/lib' | ||
import { ContinueChatResponse } from '@typebot.io/schemas' | ||
import ky from 'ky' | ||
|
||
export const continueChatQuery = ({ | ||
export const continueChatQuery = async ({ | ||
apiHost, | ||
message, | ||
sessionId, | ||
}: { | ||
apiHost?: string | ||
message: string | undefined | ||
sessionId: string | ||
}) => | ||
sendRequest<ContinueChatResponse>({ | ||
method: 'POST', | ||
url: `${ | ||
isNotEmpty(apiHost) ? apiHost : guessApiHost() | ||
}/api/v1/sessions/${sessionId}/continueChat`, | ||
body: { | ||
message, | ||
}, | ||
}) | ||
}) => { | ||
try { | ||
const data = await ky | ||
.post( | ||
`${ | ||
isNotEmpty(apiHost) ? apiHost : guessApiHost() | ||
}/api/v1/sessions/${sessionId}/continueChat`, | ||
{ | ||
json: { | ||
message, | ||
}, | ||
timeout: false, | ||
} | ||
) | ||
.json<ContinueChatResponse>() | ||
|
||
return { data } | ||
} catch (error) { | ||
return { error } | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
import { guessApiHost } from '@/utils/guessApiHost' | ||
import type { ChatLog } from '@typebot.io/schemas' | ||
import { isNotEmpty, sendRequest } from '@typebot.io/lib' | ||
import { isNotEmpty } from '@typebot.io/lib' | ||
import ky from 'ky' | ||
|
||
export const saveClientLogsQuery = ({ | ||
export const saveClientLogsQuery = async ({ | ||
apiHost, | ||
sessionId, | ||
clientLogs, | ||
}: { | ||
apiHost?: string | ||
sessionId: string | ||
clientLogs: ChatLog[] | ||
}) => | ||
sendRequest({ | ||
method: 'POST', | ||
url: `${ | ||
isNotEmpty(apiHost) ? apiHost : guessApiHost() | ||
}/api/v1/sessions/${sessionId}/clientLogs`, | ||
body: { | ||
clientLogs, | ||
}, | ||
}) | ||
}) => { | ||
try { | ||
await ky.post( | ||
`${ | ||
isNotEmpty(apiHost) ? apiHost : guessApiHost() | ||
}/api/v1/sessions/${sessionId}/clientLogs`, | ||
{ | ||
json: { | ||
clientLogs, | ||
}, | ||
} | ||
) | ||
} catch (e) { | ||
console.log(e) | ||
} | ||
} |
Oops, something went wrong.
a653646
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
landing-page-v2 – ./apps/landing-page
landing-page-v2-git-main-typebot-io.vercel.app
landing-page-v2-typebot-io.vercel.app
home.typebot.io
a653646
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
viewer-v2 – ./apps/viewer
sacnext.com
team.cr8.ai
triprint.my
wolf.cr8.ai
ai.meant.com
alphamen.pro
bet7k.online
bot.afric.ai
bot.grace.bj
bot.tobb.pro
chatgov.site
cinecorn.com
ezbooking.ai
gniorder.com
help.taxt.co
kusamint.com
p18bm940.fun
psmix.online
receita.info
rhino.cr8.ai
sheep.cr8.ai
snake.cr8.ai
svhm.mprs.in
tiger.cr8.ai
video.cr8.ai
webwhats.fun
webwhats.pro
whatsapp.web
yoda.riku.ai
zebra.cr8.ai
1nkagency.com
akademicq.com
alvodelas.com
atendente.org
bemestar.club
bot.goafk.com
bot.krdfy.com
cat.hidden.sg
cgcassets.com
chat.linky.li
cnvhub.com.br
drapamela.com
event24.store
facelabko.com
filmylogy.com
gikpro.online
goldorayo.com
govsaques.com
www.classmate.africa
www.epicbrain.com.br
www.professory.co.za
www.teachmate.africa
83701274.21000000.lol
87186327.21000000.one
90945247.21000000.one
97320578.21000000.one
98650901.21000000.one
viewer-v2-typebot-io.vercel.app
mdb.assessoria.desideri.progenbr.com
mdb.assessoria.fernanda.progenbr.com
mdb.assessoria.jbatista.progenbr.com
mdb.assessoria.mauricio.progenbr.com
mdb.evento.autocadastro.progenbr.com
form.shopmercedesbenzsouthorlando.com
mdb.evento.equipeinterna.progenbr.com
bot.studiotecnicoimmobiliaremerelli.it
mdb.assessoria.boaventura.progenbr.com
mdb.assessoria.jtrebesqui.progenbr.com
pesquisa.escolamodacomproposito.com.br
anamnese.clinicaramosodontologia.com.br
gabinete.baleia.formulario.progenbr.com
mdb.assessoria.carreirinha.progenbr.com
chrome-os-inquiry-system.itschromeos.com
mdb.assessoria.paulomarques.progenbr.com
viewer-v2-git-main-typebot-io.vercel.app
main-menu-for-itschromeos.itschromeos.com
mdb.assessoria.qrcode.ademir.progenbr.com
mdb.assessoria.qrcode.arthur.progenbr.com
mdb.assessoria.qrcode.danilo.progenbr.com
mdb.assessoria.qrcode.marcao.progenbr.com
mdb.assessoria.qrcode.marcio.progenbr.com
mdb.assessoria.qrcode.aloisio.progenbr.com
mdb.assessoria.qrcode.girotto.progenbr.com
mdb.assessoria.qrcode.marinho.progenbr.com
mdb.assessoria.qrcode.rodrigo.progenbr.com
mdb.assessoria.carlosalexandre.progenbr.com
mdb.assessoria.qrcode.desideri.progenbr.com
mdb.assessoria.qrcode.fernanda.progenbr.com
mdb.assessoria.qrcode.jbatista.progenbr.com
mdb.assessoria.qrcode.mauricio.progenbr.com
mdb.assessoria.fernanda.regional.progenbr.com
mdb.assessoria.qrcode.boaventura.progenbr.com
mdb.assessoria.qrcode.jtrebesqui.progenbr.com
mdb.assessoria.qrcode.carreirinha.progenbr.com
mdb.assessoria.qrcode.paulomarques.progenbr.com
mdb.assessoria.qrcode.carlosalexandre.progenbr.com
mdb.assessoria.qrcode.fernanda.regional.progenbr.com
www.typebot.io
get-typebot.com
www.get-typebot.com
a653646
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
builder-v2 – ./apps/builder
app.typebot.io
builder-v2-git-main-typebot-io.vercel.app
builder-v2-typebot-io.vercel.app