Skip to content

3.0.20 create a breaking change for StreamingTextResponse #1316

@arvinxx

Description

@arvinxx

Description

the correct response with ai@3.0.19:

image

the error response with ai@3.0.20:

image

it cause an issue with it: lobehub/lobehub#1945

Code example

import { OpenAIStream, StreamingTextResponse } from 'ai';
import OpenAI, { ClientOptions } from 'openai';

const response = await this.client.chat.completions.create(postPayload);

return new StreamingTextResponse(OpenAIStream(response));

Additional context

I check the update code, I think it's a breaking change for StreamingTextResponse :

image

please consider to revert it. Or I have to stay with 3.0.19.

a6b2500#diff-ee443c120877f90b068a98d03b338a35958a3953db7e0159035ae060b5b9052b

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions