mirror of
https://gh-proxy.org/https://github.com/klinsmaya/CLIProxyAPI.git
synced 2026-11-08 09:26:52 +08:00
perf(xai): reuse parsed input array
This commit is contained in:
@@ -1479,8 +1479,9 @@ func normalizeXAIInputCustomToolCalls(body []byte) []byte {
|
||||
}
|
||||
|
||||
changed := false
|
||||
items := make([]json.RawMessage, 0, len(input.Array()))
|
||||
for _, item := range input.Array() {
|
||||
inputArray := input.Array()
|
||||
items := make([]json.RawMessage, 0, len(inputArray))
|
||||
for _, item := range inputArray {
|
||||
var normalized []byte
|
||||
switch item.Get("type").String() {
|
||||
case "custom_tool_call":
|
||||
|
||||
Reference in New Issue
Block a user