Skip to content

Commit f9e4a5d

Browse files
authored
Merge pull request #248 from trheyi/main
Add Azure support to OpenAI connector configuration
2 parents 155bd16 + 2273535 commit f9e4a5d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

connector/openai/openai.go

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type Options struct {
2020
Proxy string `json:"proxy,omitempty"`
2121
Model string `json:"model,omitempty"`
2222
Key string `json:"key"`
23+
Azure string `json:"azure,omitempty"` // "true" or "false"
2324
}
2425

2526
// Register the connections from dsl
@@ -34,6 +35,7 @@ func (o *Connector) Register(file string, id string, dsl []byte) error {
3435
o.Options.Proxy = helper.EnvString(o.Options.Proxy)
3536
o.Options.Model = helper.EnvString(o.Options.Model)
3637
o.Options.Key = helper.EnvString(o.Options.Key)
38+
o.Options.Azure = helper.EnvString(o.Options.Azure)
3739
return nil
3840
}
3941

@@ -74,5 +76,6 @@ func (o *Connector) Setting() map[string]interface{} {
7476
"host": host,
7577
"key": o.Options.Key,
7678
"model": o.Options.Model,
79+
"azure": o.Options.Azure,
7780
}
7881
}

0 commit comments

Comments
 (0)