- A pipeline over the facts about a list of songs (up to 5 genres, up to 8 artist names, how many songs, a few words about the rules of a smart playlist, the language). A local namer builds a name from the genres and the artists on this server and is always there; Claude is asked first only when an admin turned the new anthropic provider on with an API key. A failure or a refusal gives the local name. What Claude answers is kept under a hash of the facts, so the same question is not asked or paid twice.
- The anthropic provider: a write-only key (kept as typed, it is case-sensitive), a test that reads one model and sends no text, and a plain statement of what is sent. It uses the official Go SDK with nothing taken from the environment of the server (no key, profile, base URL or extra headers), no redirects, no system headers, and an answer that is cleaned and bounded.
- POST /playlists/{id}/suggest-name, POST /mixes/{id}/suggest-name and POST /smart-playlists/{id}/suggest-name answer with a name, a description and where it came from.
88 lines
3.8 KiB
Modula-2
88 lines
3.8 KiB
Modula-2
module codeberg.org/squidd/sonda
|
|
|
|
go 1.27.1
|
|
|
|
require (
|
|
github.com/anthropics/anthropic-sdk-go/v2 v2.9.0
|
|
github.com/getkin/kin-openapi v0.153.0
|
|
github.com/gin-gonic/gin v1.12.0
|
|
github.com/golang-jwt/jwt/v5 v5.3.1
|
|
github.com/jackc/pgx/v5 v5.12.0
|
|
github.com/pelletier/go-toml/v2 v2.4.3
|
|
github.com/swaggest/swgui v1.8.9
|
|
github.com/uptrace/bun v1.3.0
|
|
github.com/uptrace/bun/dialect/pgdialect v1.3.0
|
|
github.com/uptrace/bun/dialect/sqlitedialect v1.3.0
|
|
go.senan.xyz/taglib v0.15.0
|
|
go.uber.org/zap v1.28.0
|
|
golang.org/x/crypto v0.58.0
|
|
golang.org/x/sync v0.24.0
|
|
golang.org/x/text v0.43.0
|
|
modernc.org/sqlite v1.62.0
|
|
)
|
|
|
|
require (
|
|
github.com/bahlo/generic-list-go v0.2.0 // indirect
|
|
github.com/buger/jsonparser v1.1.2 // indirect
|
|
github.com/bytedance/gopkg v0.1.3 // indirect
|
|
github.com/bytedance/sonic v1.15.0 // indirect
|
|
github.com/bytedance/sonic/loader v0.5.0 // indirect
|
|
github.com/cloudwego/base64x v0.1.6 // indirect
|
|
github.com/dustin/go-humanize v1.1.0 // indirect
|
|
github.com/gabriel-vasile/mimetype v1.4.12 // indirect
|
|
github.com/gin-contrib/sse v1.1.0 // indirect
|
|
github.com/go-logr/logr v1.4.2 // indirect
|
|
github.com/go-logr/stdr v1.2.2 // indirect
|
|
github.com/go-openapi/jsonpointer v0.22.5 // indirect
|
|
github.com/go-openapi/swag/jsonname v0.25.5 // indirect
|
|
github.com/go-playground/locales v0.14.1 // indirect
|
|
github.com/go-playground/universal-translator v0.18.1 // indirect
|
|
github.com/go-playground/validator/v10 v10.30.1 // indirect
|
|
github.com/goccy/go-json v0.10.5 // indirect
|
|
github.com/goccy/go-yaml v1.19.2 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/invopop/jsonschema v0.14.0 // indirect
|
|
github.com/jackc/pgpassfile v1.0.0 // indirect
|
|
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
|
|
github.com/jackc/puddle/v2 v2.2.3 // indirect
|
|
github.com/jinzhu/inflection v1.0.0 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
|
github.com/leodido/go-urn v1.4.0 // indirect
|
|
github.com/mattn/go-isatty v0.0.24 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/ncruces/go-strftime v1.1.0 // indirect
|
|
github.com/pb33f/ordered-map/v2 v2.3.1 // indirect
|
|
github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect
|
|
github.com/quic-go/qpack v0.6.0 // indirect
|
|
github.com/quic-go/quic-go v0.59.0 // indirect
|
|
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
|
|
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 // indirect
|
|
github.com/standard-webhooks/standard-webhooks/libraries v0.0.1 // indirect
|
|
github.com/tetratelabs/wazero v1.11.1-0.20260428013916-2bbd517b7633 // indirect
|
|
github.com/tidwall/gjson v1.18.0 // indirect
|
|
github.com/tidwall/match v1.1.1 // indirect
|
|
github.com/tidwall/pretty v1.2.1 // indirect
|
|
github.com/tidwall/sjson v1.2.5 // indirect
|
|
github.com/tmthrgd/go-hex v0.0.0-20190904060850-447a3041c3bc // indirect
|
|
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
|
|
github.com/ugorji/go/codec v1.3.1 // indirect
|
|
github.com/vearutop/statigz v1.4.0 // indirect
|
|
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
|
|
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
|
|
go.mongodb.org/mongo-driver/v2 v2.5.0 // indirect
|
|
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
|
|
go.opentelemetry.io/otel v1.33.0 // indirect
|
|
go.opentelemetry.io/otel/metric v1.33.0 // indirect
|
|
go.opentelemetry.io/otel/trace v1.33.0 // indirect
|
|
go.uber.org/multierr v1.11.0 // indirect
|
|
go.yaml.in/yaml/v4 v4.0.0 // indirect
|
|
golang.org/x/arch v0.22.0 // indirect
|
|
golang.org/x/net v0.60.0 // indirect
|
|
golang.org/x/sys v0.49.0 // indirect
|
|
google.golang.org/protobuf v1.36.10 // indirect
|
|
modernc.org/libc v1.80.1 // indirect
|
|
modernc.org/mathutil v1.7.1 // indirect
|
|
modernc.org/memory v1.12.1 // indirect
|
|
)
|