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

Function InjectNonStream

internal/toolinjection/inject_response.go:14–20  ·  view source on GitHub ↗

InjectNonStream dispatches to the format-specific non-streaming injection function.

(resp []byte, rule *config.ToolCallInjectionRule, format string)

Source from the content-addressed store, hash-verified

12
13// InjectNonStream dispatches to the format-specific non-streaming injection function.
14func InjectNonStream(resp []byte, rule *config.ToolCallInjectionRule, format string) []byte {
15 f := GetFormat(format)
16 if f == nil {
17 return resp
18 }
19 return f.InjectNonStream(resp, rule)
20}
21
22// InjectOpenAINonStream appends a tool_call to a real OpenAI chat completion response
23// and sets finish_reason to "tool_calls".

Calls 2

GetFormatFunction · 0.85
InjectNonStreamMethod · 0.65