countExistingInjections counts how many injected tool call IDs already exist in the conversation messages.
(rawJSON []byte, format string)
| 159 | // countExistingInjections counts how many injected tool call IDs already exist |
| 160 | // in the conversation messages. |
| 161 | func countExistingInjections(rawJSON []byte, format string) int { |
| 162 | f := GetFormat(format) |
| 163 | if f == nil { |
| 164 | return 0 |
| 165 | } |
| 166 | return f.CountExistingInjections(rawJSON) |
| 167 | } |
| 168 | |
| 169 | // countExistingInjectionsOpenAI counts injected tool_call IDs in OpenAI messages. |
| 170 | func countExistingInjectionsOpenAI(rawJSON []byte) int { |
no test coverage detected