Documentation
¶
Index ¶
- Variables
- func AggregateConsecutiveTurnUsage(usages []apitype.UsageStats) apitype.UsageStats
- func ParseCursorToolEventFromChunkRawJSON(raw string) string
- func StreamAssistantTurn(ctx context.Context, client openai.Client, ...) (apitype.AssistantTurnResult, error)
- func StreamText(ctx context.Context, client openai.Client, ...) (string, apitype.UsageStats, error)
- func UsageTokensDisplayParts(system string, msgs []chatstore.Message, u apitype.UsageStats, turnCount int) (contextTok, lastUserTok int64, contextEstimated bool, ...)
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 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)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.