Support http client middlewareing (#830)
This commit is contained in:
@@ -26,6 +26,10 @@ const AzureAPIKeyHeader = "api-key"
|
||||
|
||||
const defaultAssistantVersion = "v2" // upgrade to v2 to support vector store
|
||||
|
||||
type HTTPDoer interface {
|
||||
Do(req *http.Request) (*http.Response, error)
|
||||
}
|
||||
|
||||
// ClientConfig is a configuration of a client.
|
||||
type ClientConfig struct {
|
||||
authToken string
|
||||
@@ -36,7 +40,7 @@ type ClientConfig struct {
|
||||
APIVersion string // required when APIType is APITypeAzure or APITypeAzureAD
|
||||
AssistantVersion string
|
||||
AzureModelMapperFunc func(model string) string // replace model to azure deployment name func
|
||||
HTTPClient *http.Client
|
||||
HTTPClient HTTPDoer
|
||||
|
||||
EmptyMessagesLimit uint
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user