本页还没有译文
本页 8 段还没译成日本語,下面显示的是英文原文。Azure OpenAI Slow to Stream
还没翻译译自英文(ai-sdk.dev)本页 8 段都还没译
Issue
When using OpenAI hosted on Azure, streaming is slow and in big chunks.
Cause
This is a Microsoft Azure issue. Some users have reported the following solutions:
- Update Content Filtering Settings: Inside Azure AI Studio, within "Shared resources" > "Content filters", create a new content filter and set the "Streaming mode (Preview)" under "Output filter" from "Default" to "Asynchronous Filter".
Solution
You can use the smoothStream transformation to stream each word individually.
import { smoothStream, streamText } from 'ai';
const result = streamText({
model,
prompt,
experimental_transform: smoothStream(),
});AI 翻译查看英文原文