MCPcopy Create free account
hub / github.com/coder/coder / validatePromptParts

Function validatePromptParts

scaletest/chat/run_internal_test.go:363–368  ·  view source on GitHub ↗
(parts []codersdk.ChatInputPart, prompt string)

Source from the content-addressed store, hash-verified

361}
362
363func validatePromptParts(parts []codersdk.ChatInputPart, prompt string) error {
364 if len(parts) != 1 || parts[0].Type != codersdk.ChatInputPartTypeText || parts[0].Text != prompt {
365 return xerrors.Errorf("unexpected chat message content: %#v", parts)
366 }
367 return nil
368}
369
370func statusEvent(chatID uuid.UUID, status codersdk.ChatStatus) codersdk.ChatStreamEvent {
371 return codersdk.ChatStreamEvent{

Callers 1

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected