Avanzado

Streaming

La transmisión en tiempo real (streaming) permite a NovaAI devolver el contenido generado al instante, en lugar de esperar a que se complete toda la respuesta. Esto mejora la capacidad de respuesta y crea una experiencia de usuario más fluida para aplicaciones de chat, asistentes de IA e interfaces interactivas.

Overview

With streaming enabled, the model sends small chunks of generated text as they become available. Your application can display these chunks immediately, reducing perceived latency and making conversations feel more natural.

Note: Streaming is supported by compatible NovaAI chat and agent models. Check the model documentation before enabling this feature.

Note: Streaming is supported by compatible NovaAI chat and agent models. Check the model documentation before enabling this feature.

How Streaming Works

Rendering diagram…

Enable Streaming

const stream = await client.chat.create({
model: "nova-chat-4",
stream: true,
messages: [
{
role: "user",
content: "Write a short introduction to artificial intelligence."
}
]
});
 
for await (const chunk of stream) {
process.stdout.write(chunk.delta);
}

Streaming Properties

stream

boolean

requerido

Enables real-time response streaming.

model

string

requerido

Model used for generation.

messages

array

requerido

Conversation history sent to the model.

Common Use Cases

  • AI chat interfaces

  • Writing assistants

  • Live code generation

  • Customer support bots

  • Real-time content generation

Tip: Streaming provides a better user experience for long responses by displaying content as it's generated rather than waiting for the complete output.

Tip: Streaming provides a better user experience for long responses by displaying content as it's generated rather than waiting for the complete output.

Next Step

Continue to Function Calling to learn how NovaAI models can invoke external tools and APIs to perform actions beyond text generation.

¿Te resultó útil?

¿Te resultó útil?

Create a free website with Framer, the website builder loved by startups, designers and agencies.