|
123456789101112131415161718192021222324252627282930313233 |
- package gogpt
-
- import (
- "net/http"
- )
-
- const (
- apiURLv1 = "http://chatgpt.zhiyinos.cn/"
- defaultEmptyMessagesLimit uint = 300
- )
-
- // ClientConfig is a configuration of a client.
- type ClientConfig struct {
- authToken string
-
- HTTPClient *http.Client
-
- BaseURL string
- OrgID string
-
- EmptyMessagesLimit uint
- }
-
- func DefaultConfig(authToken string) ClientConfig {
- return ClientConfig{
- HTTPClient: &http.Client{},
- BaseURL: apiURLv1,
- OrgID: "",
- authToken: authToken,
-
- EmptyMessagesLimit: defaultEmptyMessagesLimit,
- }
- }
|