Skip to content

token usage not right in stream mode #1357

@hzxuzhonghu

Description

@hzxuzhonghu
	if strings.Contains(responseText, streamingEndMsg) {
		resp := parseRespForUsage(ctx, responseText)

Actually streamingEndMsg = "data: [DONE]", it does not include tokeusage.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions