MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / parseResponse

Function parseResponse

internal/toolinjection/observe.go:150–156  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

148// parseResponse extracts assistant content and tool calls from a response.
149// Deprecated: use Format.ParseResponse instead. Kept for any external callers.
150func 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
158func parseOpenAIResponse(raw []byte, ev *implantpb.LLMEvent) {
159 msg := gjson.GetBytes(raw, "choices.0.message")

Callers

nothing calls this directly

Calls 3

GetFormatFunction · 0.85
ParseResponseMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected