Skip to content

Commit ec13727

Browse files
committed
feat: allow dumping via env var
Signed-off-by: Danny Kopping <[email protected]>
1 parent fedf528 commit ec13727

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

provider/anthropic.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ func NewAnthropic(cfg config.Anthropic, bedrockCfg *config.AWSBedrock) *Anthropi
3333
if cfg.Key == "" {
3434
cfg.Key = os.Getenv("ANTHROPIC_API_KEY")
3535
}
36+
if cfg.APIDumpDir == "" {
37+
cfg.APIDumpDir = os.Getenv("BRIDGE_DUMP_DIR")
38+
}
3639

3740
return &Anthropic{
3841
cfg: cfg,

provider/openai.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ func NewOpenAI(cfg config.OpenAI) *OpenAI {
3333
if cfg.BaseURL == "" {
3434
cfg.BaseURL = "https://api.openai.com/v1/"
3535
}
36-
3736
if cfg.Key == "" {
3837
cfg.Key = os.Getenv("OPENAI_API_KEY")
3938
}
39+
if cfg.APIDumpDir == "" {
40+
cfg.APIDumpDir = os.Getenv("BRIDGE_DUMP_DIR")
41+
}
4042

4143
return &OpenAI{
4244
cfg: cfg,

0 commit comments

Comments
 (0)