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.go b/dockerimg/dockerimg.go
index 292c8b6..1486435 100644
--- a/dockerimg/dockerimg.go
+++ b/dockerimg/dockerimg.go
@@ -21,6 +21,7 @@
"time"
"sketch.dev/browser"
+ "sketch.dev/llm/ant"
"sketch.dev/loop/server"
"sketch.dev/skribe"
"sketch.dev/webui"
@@ -654,7 +655,12 @@
}
start := time.Now()
- dockerfile, err := createDockerfile(ctx, http.DefaultClient, antURL, antAPIKey, initFiles, subPathWorkingDir)
+ srv := &ant.Service{
+ URL: antURL,
+ APIKey: antAPIKey,
+ HTTPC: http.DefaultClient,
+ }
+ dockerfile, err := createDockerfile(ctx, srv, initFiles, subPathWorkingDir)
if err != nil {
return "", fmt.Errorf("create dockerfile: %w", err)
}