@@ -46,12 +46,12 @@ func TestCreateChatCompletionStream(t *testing.T) {
46
46
dataBytes := []byte {}
47
47
dataBytes = append (dataBytes , []byte ("event: message\n " )... )
48
48
//nolint:lll
49
- data := `{"id":"1","object":"completion","created":1598069254,"model":"gpt-3.5-turbo","choices":[{"index":0,"delta":{"content":"response1"},"finish_reason":"max_tokens"}]}`
49
+ data := `{"id":"1","object":"completion","created":1598069254,"model":"gpt-3.5-turbo","system_fingerprint": "fp_d9767fc5b9"," choices":[{"index":0,"delta":{"content":"response1"},"finish_reason":"max_tokens"}]}`
50
50
dataBytes = append (dataBytes , []byte ("data: " + data + "\n \n " )... )
51
51
52
52
dataBytes = append (dataBytes , []byte ("event: message\n " )... )
53
53
//nolint:lll
54
- data = `{"id":"2","object":"completion","created":1598069255,"model":"gpt-3.5-turbo","choices":[{"index":0,"delta":{"content":"response2"},"finish_reason":"max_tokens"}]}`
54
+ data = `{"id":"2","object":"completion","created":1598069255,"model":"gpt-3.5-turbo","system_fingerprint": "fp_d9767fc5b9"," choices":[{"index":0,"delta":{"content":"response2"},"finish_reason":"max_tokens"}]}`
55
55
dataBytes = append (dataBytes , []byte ("data: " + data + "\n \n " )... )
56
56
57
57
dataBytes = append (dataBytes , []byte ("event: done\n " )... )
@@ -77,10 +77,11 @@ func TestCreateChatCompletionStream(t *testing.T) {
77
77
78
78
expectedResponses := []openai.ChatCompletionStreamResponse {
79
79
{
80
- ID : "1" ,
81
- Object : "completion" ,
82
- Created : 1598069254 ,
83
- Model : openai .GPT3Dot5Turbo ,
80
+ ID : "1" ,
81
+ Object : "completion" ,
82
+ Created : 1598069254 ,
83
+ Model : openai .GPT3Dot5Turbo ,
84
+ SystemFingerprint : "fp_d9767fc5b9" ,
84
85
Choices : []openai.ChatCompletionStreamChoice {
85
86
{
86
87
Delta : openai.ChatCompletionStreamChoiceDelta {
@@ -91,10 +92,11 @@ func TestCreateChatCompletionStream(t *testing.T) {
91
92
},
92
93
},
93
94
{
94
- ID : "2" ,
95
- Object : "completion" ,
96
- Created : 1598069255 ,
97
- Model : openai .GPT3Dot5Turbo ,
95
+ ID : "2" ,
96
+ Object : "completion" ,
97
+ Created : 1598069255 ,
98
+ Model : openai .GPT3Dot5Turbo ,
99
+ SystemFingerprint : "fp_d9767fc5b9" ,
98
100
Choices : []openai.ChatCompletionStreamChoice {
99
101
{
100
102
Delta : openai.ChatCompletionStreamChoiceDelta {
0 commit comments