mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-05-04 21:20:51 +08:00
fix: format ingress continuation test
This commit is contained in:
@@ -238,85 +238,85 @@ func TestShouldInferIngressFunctionCallOutputPreviousResponseID(t *testing.T) {
|
||||
want bool
|
||||
}{
|
||||
{
|
||||
name: "infer_when_all_conditions_match",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
name: "infer_when_all_conditions_match",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
expectedPrevious: "resp_1",
|
||||
want: true,
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "skip_when_store_enabled",
|
||||
storeDisabled: false,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
name: "skip_when_store_enabled",
|
||||
storeDisabled: false,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
expectedPrevious: "resp_1",
|
||||
want: false,
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "skip_on_first_turn",
|
||||
storeDisabled: true,
|
||||
turn: 1,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
name: "skip_on_first_turn",
|
||||
storeDisabled: true,
|
||||
turn: 1,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
expectedPrevious: "resp_1",
|
||||
want: false,
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "skip_without_function_call_output",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{},
|
||||
name: "skip_without_function_call_output",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{},
|
||||
expectedPrevious: "resp_1",
|
||||
want: false,
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "skip_when_request_already_has_previous_response_id",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
name: "skip_when_request_already_has_previous_response_id",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
currentPreviousResponse: "resp_client",
|
||||
expectedPrevious: "resp_1",
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "skip_when_last_turn_response_id_missing",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
name: "skip_when_last_turn_response_id_missing",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
expectedPrevious: "",
|
||||
want: false,
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "trim_whitespace_before_judgement",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
name: "trim_whitespace_before_judgement",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true},
|
||||
expectedPrevious: " resp_2 ",
|
||||
want: true,
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "skip_when_tool_call_context_already_present",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true, HasToolCallContext: true},
|
||||
name: "skip_when_tool_call_context_already_present",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true, HasToolCallContext: true},
|
||||
expectedPrevious: "resp_2",
|
||||
want: false,
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "skip_when_item_reference_already_covers_all_call_ids",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true, HasItemReferenceForAllCallIDs: true},
|
||||
name: "skip_when_item_reference_already_covers_all_call_ids",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true, HasItemReferenceForAllCallIDs: true},
|
||||
expectedPrevious: "resp_2",
|
||||
want: false,
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "skip_when_function_call_output_missing_call_id",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true, HasFunctionCallOutputMissingCallID: true},
|
||||
name: "skip_when_function_call_output_missing_call_id",
|
||||
storeDisabled: true,
|
||||
turn: 2,
|
||||
signals: ToolContinuationSignals{HasFunctionCallOutput: true, HasFunctionCallOutputMissingCallID: true},
|
||||
expectedPrevious: "resp_2",
|
||||
want: false,
|
||||
want: false,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user