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

Function parseRequest

internal/toolinjection/observe.go:40–46  ·  view source on GitHub ↗

parseRequest extracts model, message count, last N messages, and tool results from a request. Deprecated: use Format.ParseRequest instead. Kept for any external callers.

(raw []byte, format string, ev *implantpb.LLMEvent)

Source from the content-addressed store, hash-verified

38// parseRequest extracts model, message count, last N messages, and tool results from a request.
39// Deprecated: use Format.ParseRequest instead. Kept for any external callers.
40func parseRequest(raw []byte, format string, ev *implantpb.LLMEvent) {
41 ev.Model = gjson.GetBytes(raw, "model").String()
42 f := GetFormat(format)
43 if f != nil {
44 f.ParseRequest(raw, ev)
45 }
46}
47
48func parseOpenAIRequest(raw []byte, ev *implantpb.LLMEvent) {
49 msgs := gjson.GetBytes(raw, "messages")

Callers

nothing calls this directly

Calls 3

GetFormatFunction · 0.85
ParseRequestMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected