fix:
1、add model provider 2、add http defatult timeout 3、Optimize duplicate code
This commit is contained in:
parent
a19fdd89b6
commit
54ec4797e7
1 changed files with 1 additions and 2 deletions
|
|
@ -46,6 +46,7 @@ var vendorPrefixes = map[string]struct{}{
|
|||
"mistral": {},
|
||||
"vivgrid": {},
|
||||
"minimax": {},
|
||||
"novita": {},
|
||||
}
|
||||
|
||||
type Provider struct {
|
||||
|
|
@ -121,9 +122,7 @@ func NewProvider(apiKey, apiBase, proxy string, opts ...Option) *Provider {
|
|||
apiBase: strings.TrimRight(apiBase, "/"),
|
||||
httpClient: retryClient.StandardClient(),
|
||||
}
|
||||
|
||||
p.httpClient.Timeout = defaultRequestTimeout
|
||||
|
||||
for _, opt := range opts {
|
||||
if opt != nil {
|
||||
opt(p)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue