MCPcopy
hub / github.com/wavetermdev/waveterm / RunChatStep

Method RunChatStep

pkg/aiusechat/usechat-backend.go:24–24  ·  view source on GitHub ↗

RunChatStep executes a single step in the chat conversation with the AI backend. Returns the stop reason, native messages from the response, rate limit info, and any error. The cont parameter allows continuing from a previous response (e.g., after rate limiting).

(
		ctx context.Context,
		sseHandler *sse.SSEHandlerCh,
		chatOpts uctypes.WaveChatOpts,
		cont *uctypes.WaveContinueResponse,
	)

Source from the content-addressed store, hash-verified

22 // Returns the stop reason, native messages from the response, rate limit info, and any error.
23 // The cont parameter allows continuing from a previous response (e.g., after rate limiting).
24 RunChatStep(
25 ctx context.Context,
26 sseHandler *sse.SSEHandlerCh,
27 chatOpts uctypes.WaveChatOpts,

Callers 1

runAIChatStepFunction · 0.65

Implementers 4

openaiResponsesBackendpkg/aiusechat/usechat-backend.go
openaiCompletionsBackendpkg/aiusechat/usechat-backend.go
anthropicBackendpkg/aiusechat/usechat-backend.go
geminiBackendpkg/aiusechat/usechat-backend.go

Calls

no outgoing calls

Tested by

no test coverage detected