https://discord.gg/botpress logo
#🤝help
Assistant Api
# 🤝help
b

best-army-74344

12/14/2023, 4:54 PM
Hey guys, I'm getting this went I recieve the assistant Api response Does someone have solve this issue.
Also, can i integrate different assistants api in the same botpress bot??
p

proud-memory-60003

12/14/2023, 5:02 PM
To avoid this, you can add an AI task in before the message is given to the user to remove an references / citations.
And yes you can add different assistants into the same botpress bot.
You can copy the code cards but replace the assistant ID and add it elsewhere to the bot.
b

best-army-74344

12/15/2023, 1:26 PM
Thankss @proud-memory-60003
Is there´s any other method to fix this?
@User
m

microscopic-shampoo-2255

12/15/2023, 7:49 PM
All I know in spanish is Dos Cervasais por favor
b

best-army-74344

12/18/2023, 1:34 PM
cheers 🍻
m

microscopic-shampoo-2255

12/18/2023, 1:41 PM
a

able-rocket-15603

01/05/2024, 5:18 AM
@best-army-74344 This can be fixed using a bit of code. In your Assistant API, under SRC folder >> handle response, head to the execute code card in the screenshot and slot in this code below after the line "let responseText". > // delete everything between and including【】 > responseText = responseText.replace(/【.*?】/g, "")
b

best-army-74344

01/08/2024, 4:30 PM
Heyy @able-rocket-15603
if i send u my code could you help?
This is how is build the assistant API part
Do u have a better way than this to handle assistant API?
a

able-rocket-15603

01/09/2024, 12:08 AM
Have you tried the template by botpress? https://botpress.com/templates/deploy-openai-gpts