( ctx context.Context, systemPrompt string, messages []map[string]any, tools []map[string]any, options *LLMRequestOptions, )
| 922 | mapped = finishReason |
| 923 | } |
| 924 | } |
| 925 | |
| 926 | out <- EventResult{Event: map[string]any{"type": "stop_reason", "stop_reason": mapped}} |
| 927 | }() |
| 928 | |
| 929 | return out |
| 930 | } |
| 931 | |
| 932 | func collectCompletionStream(stream <-chan EventResult) (Response, error) { |
| 933 | response := Response{} |
| 934 | var text strings.Builder |
| 935 | for item := range stream { |
nothing calls this directly
no test coverage detected