X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/cb514b662bcf9d90b2cf02789c989f777d774d3f..087d725b5ab41ad34ffd24938482d45a8b99a080:/model_test.go diff --git a/model_test.go b/model_test.go index 11a7d00..e932107 100644 --- a/model_test.go +++ b/model_test.go @@ -104,7 +104,7 @@ func TestClientSendsTheSessionHeaderToChatGPT(t *testing.T) { func TestClientReadsTheStream(t *testing.T) { server := newModelFake(t) - server.reply = func(w http.ResponseWriter, call ModelFakeCall) { + server.reply = func(w http.ResponseWriter, _ ModelFakeCall) { modelWriteEvents(w, map[string]any{"type": "response.created", "response": map[string]any{}}, map[string]any{"type": "response.output_item.done", "item": map[string]any{"type": "reasoning", "encrypted_content": "opaque"}}, @@ -129,7 +129,7 @@ func TestClientReadsTheStream(t *testing.T) { func TestClientTakesTheOutputOfTheCompletedResponse(t *testing.T) { server := newModelFake(t) - server.reply = func(w http.ResponseWriter, call ModelFakeCall) { + server.reply = func(w http.ResponseWriter, _ ModelFakeCall) { modelWriteEvents(w, modelCompletedEvent([]any{modelMessageItem("only here")}, 10, 0, 2)) } @@ -255,7 +255,7 @@ func TestClientFailsWhenTheResponseFails(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { server := newModelFake(t) - server.reply = func(w http.ResponseWriter, call ModelFakeCall) { + server.reply = func(w http.ResponseWriter, _ ModelFakeCall) { modelWriteEvents(w, tc.events...) }