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:
sashabaranov
2023-03-16 19:10:27 +04:00
committed by GitHub
parent fd44d3665e
commit a8acb5f63b
6 changed files with 23 additions and 5 deletions

View File

@@ -40,7 +40,7 @@ type ModelsList struct {
// ListModels Lists the currently available models,
// and provides basic information about each model such as the model id and parent.
func (c *Client) ListModels(ctx context.Context) (models ModelsList, err error) {
req, err := http.NewRequestWithContext(ctx, http.MethodGet, c.fullURL("/models"), nil)
req, err := c.requestBuilder.build(ctx, http.MethodGet, c.fullURL("/models"), nil)
if err != nil {
return
}