parseResponse extracts assistant content and tool calls from a response. Deprecated: use Format.ParseResponse instead. Kept for any external callers.
(raw []byte, format string, ev *implantpb.LLMEvent)
| 148 | // parseResponse extracts assistant content and tool calls from a response. |
| 149 | // Deprecated: use Format.ParseResponse instead. Kept for any external callers. |
| 150 | func parseResponse(raw []byte, format string, ev *implantpb.LLMEvent) { |
| 151 | ev.Model = gjson.GetBytes(raw, "model").String() |
| 152 | f := GetFormat(format) |
| 153 | if f != nil { |
| 154 | f.ParseResponse(raw, ev) |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | func parseOpenAIResponse(raw []byte, ev *implantpb.LLMEvent) { |
| 159 | msg := gjson.GetBytes(raw, "choices.0.message") |
nothing calls this directly
no test coverage detected