Skip to content

Commit cf013d3

Browse files
authored
Remove default timeout and search API (#51)
* remove 1 minute timeout * remove deprecated search api test * remove search api
1 parent 2c55a49 commit cf013d3

File tree

3 files changed

+1
-75
lines changed

3 files changed

+1
-75
lines changed

api.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ import (
44
"encoding/json"
55
"fmt"
66
"net/http"
7-
"time"
87
)
98

109
const apiURLv1 = "https://api.openai.com/v1"
1110

1211
func newTransport() *http.Client {
13-
return &http.Client{
14-
Timeout: time.Minute,
15-
}
12+
return &http.Client{}
1613
}
1714

1815
// Client is OpenAI GPT-3 API client.

api_test.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@ func TestAPI(t *testing.T) {
5353
}
5454
} // else skip
5555

56-
searchReq := SearchRequest{
57-
Documents: []string{"White House", "hospital", "school"},
58-
Query: "the president",
59-
}
60-
_, err = c.Search(ctx, "ada", searchReq)
61-
if err != nil {
62-
t.Fatalf("Search error: %v", err)
63-
}
64-
6556
embeddingReq := EmbeddingRequest{
6657
Input: []string{
6758
"The food was delicious and the waiter",

search.go

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)