Skip to content

Commit

Permalink
🐛 (openai) Fix incompatible OpenAI types
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Jul 12, 2023
1 parent ba3a2b7 commit 6565fcc
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { SessionState } from '@typebot.io/schemas'
import {
ChatCompletionOpenAIOptions,
OpenAICredentials,
chatCompletionMessageRoles,
} from '@typebot.io/schemas/features/blocks/integrations/openai'
import { isEmpty } from '@typebot.io/lib'
import { decrypt, isCredentialsV2 } from '@typebot.io/lib/api/encryption'
Expand Down Expand Up @@ -61,7 +62,16 @@ export const createChatCompletionOpenAI = async (
newSessionState.isStreamEnabled
)
return {
clientSideActions: [{ streamOpenAiChatCompletion: { messages } }],
clientSideActions: [
{
streamOpenAiChatCompletion: {
messages: messages as {
content?: string
role: (typeof chatCompletionMessageRoles)[number]
}[],
},
},
],
outgoingEdgeId,
newSessionState,
}
Expand Down

4 comments on commit 6565fcc

@vercel
Copy link

@vercel vercel bot commented on 6565fcc Jul 12, 2023

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

rhino.cr8.ai
sheep.cr8.ai
snake.cr8.ai
svhm.mprs.in
tiger.cr8.ai
video.cr8.ai
yoda.riku.ai
zebra.cr8.ai
alvodelas.com
bemestar.club
bergamo.store
bot.krdfy.com
brainplay.fun
cgcassets.com
cnvhub.com.br
facelabko.com
filmylogy.com
goldorayo.com
rabbit.cr8.ai
shop.mexwa.my
signup.cr8.ai
start.taxt.co
turkey.cr8.ai
vhpage.cr8.ai
vitamyway.com
am.nigerias.io
an.nigerias.io
app.yvon.earth
ar.nigerias.io
bot.enreso.org
bot.mail2wa.me
bot.rslabs.pro
bots.bng.tools
bots.bridge.ai
chad.gocto.com
chat.hayuri.id
chat.uprize.hu
chatgpt.lam.ee
chicken.cr8.ai
drayumi.social
gollum.riku.ai
gsbulletin.com
journey.cr8.ai
panther.cr7.ai
panther.cr8.ai
pay.sifuim.com
penguin.cr8.ai
segredomeu.com
bots.robomotion.io
cadu.uninta.edu.br
chat.hand-made.one
chat.tuanpakya.com
manualhandlingcourse.ie
mdb.baleia.progenbr.com
mdb.equipe.progenbr.com
mdb.evento.progenbr.com
prebook.enthrallart.com
primitive-shapes.cr8.ai
register.kandabrand.com
sell.sellitwithgary.com
signup.hypemarketing.in
sistemacanadense.online
subfooter.wpwakanda.com
survey.hypemarketing.in
testbot.afterorigin.com
typebot.influencer.love
www.chatgpt-biliran.com
91181264.your-access.one
abg-assistent.m-vogel.de
ai.chromebookstoreph.com
bot.ativandograna.online
chat.ambassadorelena.com
chat.hiabhaykulkarni.com
concept.socialcliques.me
contextone.wpwakanda.com
form.sergiolimajr.com.br
hunterbot.saleshunter.ai
invite.bridesquadapp.com
link.cascadigital.com.br
login.algorithmpress.com
mail2wa.barrettamario.it
onboarding.growthside.io
reward.onlinebotdemo.xyz
stap.venturemarketing.in
type.opaulovieira.com.br
aibot.angrybranding.co.uk
app.photosbackupin1.click
bot.aidigitalmarketing.kr
bot.amicidisanfaustino.it
bot.arraesecenteno.com.br
bot.blackboxsports.com.br
bot.cabinrentalagency.com
bot.fusionstarreviews.com
bot.ristorantekintsugi.it
boyfriend-breakup.riku.ai
brigadeirosemdrama.com.br
budget.pizzeriaforno89.it
chat.ertcrebateportal.com
chat.thehomebuyersusa.com
chat.thisiscrushhouse.com

@vercel
Copy link

@vercel vercel bot commented on 6565fcc Jul 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 6565fcc Jul 12, 2023

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:

docs – ./apps/docs

docs-typebot-io.vercel.app
docs.typebot.io
docs-git-main-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 6565fcc Jul 12, 2023

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

builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app
app.typebot.io

Please sign in to comment.