Close

Sign up to Gadget

Introducing vector data support and streaming responses

-

About

Build AI-powered apps leveraging Gadget’s vector data field and streaming responses

Problem

Solution

Result

Introducing vector data support and streaming responses

Ralf Elfving
May 11, 2023

As the popularity of building AI applications increases, so does the need for better tooling. We’re excited to bring two new capabilities to Gadget that will make building any AI-powered applications a walk in the park; vector database fields and web streaming.

Native vector data support

Many AI applications are built to generate and consume vector data, such as embeddings. Vectors are mathematical representations of content such as text, images, or sound and they allow AI applications to index, compare, and analyze large and complex data sets. Most AI-powered chatbots, document services, resource searches, and other tools, make use of vectors. In fact, the use has become so widespread that there are vector database companies like Pinecone valued at $750M that focus solely on this. 

But if you’re using Gadget, you don’t need a third-party vector database. With the new vector field type, every Gadget app has vector database support out of the box. Your app automatically has access to store and retrieve vector data at scale, without having to pay for an additional service or make calls to an external service. 

To learn more about how to use the vector field in your Gadget apps, you can read our documentation.

A vector field with an optional vector dimension validation.

Web streaming

If you’re building a chatbot, you don’t want to wait for the entire response to be generated before you start returning information to users. Similar to ChatGPT, you can return fragments of the response to users as soon as they are available. Developers can use web streaming to return responses back to users word by word, or token by token.

Because all new Gadget apps are now powered by Node 18, you can build applications that send “response streams” to the browser instead of sending the response all at once. This allows for long-running responses that send data as it is available, the option/ability to subscribe to upstream datastreams like Large Language Model APIs, or do anything else that produces data over time. 

To get started building with streaming replies, and learn more about how they work in Gadget, you can read the documentation.

Example of a Gadget app using web streaming

Need help building AI-powered apps?

We hope you’re as excited about building AI-powered apps and features as we are. To help you get started, we have added documentation for building AI apps that includes some sample code. If you have any questions, feel free to reach out to the team in Discord.

Interested in learning more about Gadget?

Join leading agencies making the switch to Gadget and experience the difference a fullstack platform can make.

Keep reading

No items found.
Keep reading to learn about how it's built

Under the hood

We're on Discord, drop in and say hi!
Join Discord
Bouncing Arrow