diff --git a/config.go b/config.go index 1347567d7..8a9183558 100644 --- a/config.go +++ b/config.go @@ -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 }