BuildShip Logo
BuildShip Community

Streaming AI Chatbot

Create a Streaming AI Chatbot with BuildShip and OpenAI Assistant.

267

Report this template

Select the reason for reporting

Describe the issue in detail

Share template

Link to template

https://templates.buildship.com/template/1BPxpYySG1Ng/

Select an example

Inputs

message

Who was Leonardo da Vinci?

threadId

This is a static example using sample inputs. Remix the template to run it with your own values.

Output

Read me

🤖 Streaming AI Chatbot

A simple AI Assistant with conversational memory that you can chat with, that returns a stream response.

In this example of a personal history tutor AI Assistant, it helps you answer questions quickly or give you interesting historical facts.

✅ Prerequisites

This template uses the OpenAI Assistant (Stream Response). Here's what you'll need to successfully test out the template:

  • [ ] Your OpenAI API Key

You can get your OpenAI API Key from the OpenAI Developer Dashboard.

  • [ ] OpenAI Assistant ID

Create an OpenAI Assistant on the OpenAI Developer Dashboard > Assistants, and copy the Assistant ID.

🧪 Testing

The OpenAI Assistant (Stream Response) node can't be tested in a traditional manner. When tested, it will return an object as output, which can be read to generate a stream. However, it will appear to be a regular javascript object when viewed in the test panel. You may, however, test it out from the Usage tab of the Chatbot Widget trigger that the template comes with.

✍️ How to Use

Once the API Key and the Assistant ID is added, the workflow is ready to be used.

The template comes with a Chatbot Widget trigger which makes it super easy to test the functionality with a chat-like interface.

🌟BONUS: Here's how you can easily embed an AI chat widget on your website or app. Use the configuration script provided in the usage section to use your own AI Assistant Chatbot.

NOTE: You MUST Ship your workflow before testing out the functionality on the chat widget.

🎨 Customization

The default template uses the OpenAI Assistant node. To customize, click on the Additional settings to reveal additional customizable options, like the Thread ID, the Stream Content Form (regular text chunks or server-sent-events) and the Built-in Tools provided by OpenAI, like File Search and Code Interpreter.

🔗 Resources

  • How to set up an OpenAI Assistant (Stream Response): here