Add tests (#171)
* test models listing * remove non-needed method * test for .streamFinished * add more error tests * improve stream testing * fix typo
This commit is contained in:
@@ -116,6 +116,11 @@ func TestCreateChatCompletionStream(t *testing.T) {
|
||||
if !errors.Is(streamErr, io.EOF) {
|
||||
t.Errorf("stream.Recv() did not return EOF in the end: %v", streamErr)
|
||||
}
|
||||
|
||||
_, streamErr = stream.Recv()
|
||||
if !errors.Is(streamErr, io.EOF) {
|
||||
t.Errorf("stream.Recv() did not return EOF when the stream is finished: %v", streamErr)
|
||||
}
|
||||
}
|
||||
|
||||
// Helper funcs.
|
||||
|
||||
Reference in New Issue
Block a user