From c9a1814601bbff6331eb6bfef8432fe12d37add9 Mon Sep 17 00:00:00 2001 From: genglixia Date: Tue, 22 Oct 2024 16:49:58 +0800 Subject: [PATCH] fix lint --- chat_stream_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chat_stream_test.go b/chat_stream_test.go index 9d01faa6..a5d7859a 100644 --- a/chat_stream_test.go +++ b/chat_stream_test.go @@ -366,15 +366,19 @@ func TestCreateChatCompletionStreamWithRefusal(t *testing.T) { dataBytes := []byte{} + //nolint:lll dataBytes = append(dataBytes, []byte(`data: {"id":"1","object":"chat.completion.chunk","created":1729585728,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_d9767fc5b9","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"finish_reason":null}]}`)...) dataBytes = append(dataBytes, []byte("\n\n")...) + //nolint:lll dataBytes = append(dataBytes, []byte(`data: {"id":"2","object":"chat.completion.chunk","created":1729585728,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_d9767fc5b9","choices":[{"index":0,"delta":{"refusal":"Hello"},"finish_reason":null}]}`)...) dataBytes = append(dataBytes, []byte("\n\n")...) + //nolint:lll dataBytes = append(dataBytes, []byte(`data: {"id":"3","object":"chat.completion.chunk","created":1729585728,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_d9767fc5b9","choices":[{"index":0,"delta":{"refusal":" World"},"finish_reason":null}]}`)...) dataBytes = append(dataBytes, []byte("\n\n")...) + //nolint:lll dataBytes = append(dataBytes, []byte(`data: {"id":"4","object":"chat.completion.chunk","created":1729585728,"model":"gpt-4o-mini-2024-07-18","system_fingerprint":"fp_d9767fc5b9","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}`)...) dataBytes = append(dataBytes, []byte("\n\n")...)