all: more gemini key plumbing
diff --git a/dockerimg/dockerimg.go b/dockerimg/dockerimg.go
index 611901a..7aecb16 100644
--- a/dockerimg/dockerimg.go
+++ b/dockerimg/dockerimg.go
@@ -430,7 +430,7 @@
"-i",
"--name", cntrName,
"-p", hostPort + ":80", // forward container port 80 to a host port
- "-e", "SKETCH_ANTHROPIC_API_KEY=" + config.ModelAPIKey,
+ "-e", "SKETCH_MODEL_API_KEY=" + config.ModelAPIKey,
}
if !config.OneShot {
cmdArgs = append(cmdArgs, "-t")
@@ -440,7 +440,7 @@
cmdArgs = append(cmdArgs, "-e", envVar)
}
if config.ModelURL != "" {
- cmdArgs = append(cmdArgs, "-e", "SKETCH_ANT_URL="+config.ModelURL)
+ cmdArgs = append(cmdArgs, "-e", "SKETCH_MODEL_URL="+config.ModelURL)
}
if config.SketchPubKey != "" {
cmdArgs = append(cmdArgs, "-e", "SKETCH_PUB_KEY="+config.SketchPubKey)
@@ -675,6 +675,7 @@
if model == "gemini" {
if strings.HasSuffix(modelURL, "/gemmsgs") {
// Horrible hack! Switch back to anthropic for container building.
+ // We can do this because we are talking to skaband and know the address.
modelURL = strings.Replace(modelURL, "/gemmsgs", "/antmsgs", 1)
} else {
return "", fmt.Errorf("building docker image with gemini model is not supported yet; start with -model=anthropic first then use gemini")
diff --git a/dockerimg/dockerimg_test.go b/dockerimg/dockerimg_test.go
index 7e41742..c48e96b 100644
--- a/dockerimg/dockerimg_test.go
+++ b/dockerimg/dockerimg_test.go
@@ -89,7 +89,7 @@
if err != nil {
t.Fatal(err)
}
- apiKey := cmp.Or(os.Getenv("OUTER_SKETCH_ANTHROPIC_API_KEY"), os.Getenv("ANTHROPIC_API_KEY"))
+ apiKey := cmp.Or(os.Getenv("OUTER_SKETCH_MODEL_API_KEY"), os.Getenv("ANTHROPIC_API_KEY"))
srv := &ant.Service{
APIKey: apiKey,
HTTPC: rr.Client(),