(raw json.RawMessage)
| 958 | } |
| 959 | |
| 960 | func hasErrorField(raw json.RawMessage) bool { |
| 961 | var payload map[string]any |
| 962 | if err := json.Unmarshal(raw, &payload); err != nil { |
| 963 | return false |
| 964 | } |
| 965 | _, ok := payload["error"] |
| 966 | return ok |
| 967 | } |
| 968 | |
| 969 | func injectMissingToolResults(prompt []fantasy.Message) []fantasy.Message { |
| 970 | result := make([]fantasy.Message, 0, len(prompt)) |
no test coverage detected