https://www.boundaryml.com logo
BAML React Chatbot example - Issue with setup
# help
g
Hello, I'm new to the Typescript/React world, and am trying to use BAML for the first time. Not sure why I'm running into this issue for chat-interface.tsx. What's going on? https://cdn.discordapp.com/attachments/1446563694283587694/1446563694728445992/image.png?ex=69404e6c&is=693efcec&hm=d778b0bd63e5ada59a3979e9c69b7887ce8f616614cbffe75bcd598e5b91e231&
v
The function returns a string type
So this is just a type issue where your typescript is saying you have a string type and string types have no messages property
@GR™
g
Thanks for the chat!
Please do let me know when the documentation gets updated - I will work on fixing this in the meantime.
v
https://github.com/BoundaryML/baml/pull/2770 this is a preview url that should work! https://boundary-preview-858083ee-b4b0-4ebb-9f00-cd94619e6935.docs.buildwithfern.com/guide/framework-integration/react-next-js/building-a-chatbot very minor highlighting bug that i'm patching, but main docs will be live with this soon. This should work tho 🙂
thanks for flagging the bug and helping make BAML better 🙂
if it works for you as well let me know and i'll merge! 🙂
g
Errors have been cleared with this script, yes!
v
oh you will want to disable turbo!
g
Saw the shoutout in the thumbnail, appreciate it!

https://youtu.be/qoNEjSHaPwQ▾

v
thanks for helping with this and making BAML better for everyone 🙂