* Serve LLM instructions at `/llm` * Include markdown content for memory instructions * Update README with LLM integration details * Add tests for LLM instructions handler * Modify database migrations to use GUIDs for thoughts and projects
23 lines
439 B
Go
23 lines
439 B
Go
package app
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
amcsllm "git.warky.dev/wdevs/amcs/llm"
|
|
)
|
|
|
|
func serveLLMInstructions(w http.ResponseWriter, r *http.Request) {
|
|
if r.URL.Path != "/llm" {
|
|
http.NotFound(w, r)
|
|
return
|
|
}
|
|
|
|
w.Header().Set("Content-Type", "text/markdown; charset=utf-8")
|
|
w.Header().Set("Cache-Control", "no-cache")
|
|
w.WriteHeader(http.StatusOK)
|
|
if r.Method == http.MethodHead {
|
|
return
|
|
}
|
|
_, _ = w.Write(amcsllm.MemoryInstructions)
|
|
}
|