mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-04-22 10:46:12 +02:00
18 lines
558 B
Go
18 lines
558 B
Go
package multiagent
|
|
|
|
import (
|
|
"errors"
|
|
"testing"
|
|
)
|
|
|
|
func TestIsRecoverableToolCallArgumentsJSONError(t *testing.T) {
|
|
yes := errors.New(`failed to receive stream chunk: error, <400> InternalError.Algo.InvalidParameter: The "function.arguments" parameter of the code model must be in JSON format.`)
|
|
if !isRecoverableToolCallArgumentsJSONError(yes) {
|
|
t.Fatal("expected recoverable for function.arguments + JSON")
|
|
}
|
|
no := errors.New("unrelated network failure")
|
|
if isRecoverableToolCallArgumentsJSONError(no) {
|
|
t.Fatal("expected not recoverable")
|
|
}
|
|
}
|