Skip to content

Commit

Permalink
Support http client middlewareing (#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
michurin authored Aug 23, 2024
1 parent 6d02119 commit 5162adb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}
Expand Down

0 comments on commit 5162adb

Please sign in to comment.