all: support openai-compatible models
The support is rather minimal at this point:
Only hard-coded models, only -unsafe, only -skabandaddr="".
The "shared" LLM package is strongly Claude-flavored.
We can fix all of this and more over time, if we are inspired to.
(Maybe we'll switch to https://github.com/maruel/genai?)
The goal for now is to get the rough structure in place.
I've rebased and rebuilt this more times than I care to remember.
diff --git a/dockerimg/dockerimg_test.go b/dockerimg/dockerimg_test.go
index 9e39e9c..7e41742 100644
--- a/dockerimg/dockerimg_test.go
+++ b/dockerimg/dockerimg_test.go
@@ -13,6 +13,7 @@
gcmp "github.com/google/go-cmp/cmp"
"sketch.dev/httprr"
+ "sketch.dev/llm/ant"
)
var flagRewriteWant = flag.Bool("rewritewant", false, "rewrite the dockerfiles we want from the model")
@@ -89,7 +90,11 @@
t.Fatal(err)
}
apiKey := cmp.Or(os.Getenv("OUTER_SKETCH_ANTHROPIC_API_KEY"), os.Getenv("ANTHROPIC_API_KEY"))
- result, err := createDockerfile(ctx, rr.Client(), "", apiKey, initFiles, "")
+ srv := &ant.Service{
+ APIKey: apiKey,
+ HTTPC: rr.Client(),
+ }
+ result, err := createDockerfile(ctx, srv, initFiles, "")
if err != nil {
t.Fatal(err)
}