stream

package
v2026.930.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStreamAccumulatorRejected = errors.New("chat completion stream accumulator rejected chunk")

Functions

func AggregateConsecutiveTurnUsage

func AggregateConsecutiveTurnUsage(usages []apitype.UsageStats) apitype.UsageStats

func ParseCursorToolEventFromChunkRawJSON

func ParseCursorToolEventFromChunkRawJSON(raw string) string

func StreamAssistantTurn

func StreamAssistantTurn(ctx context.Context, client openai.Client, params openai.ChatCompletionNewParams, contentOut io.Writer, opts apitype.StreamOpts) (apitype.AssistantTurnResult, error)

func StreamText

func StreamText(ctx context.Context, client openai.Client, params openai.ChatCompletionNewParams, contentOut io.Writer, opts apitype.StreamOpts) (string, apitype.UsageStats, error)

func UsageTokensDisplayParts

func UsageTokensDisplayParts(system string, msgs []chatstore.Message, u apitype.UsageStats, turnCount int) (contextTok, lastUserTok int64, contextEstimated bool, reasoningTok, responseTok, totalTok int64)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL