fbd74a37b5
clustering: enrich Item with timestamp and engagement fields
...
Carry post metadata (timestamp, likes, reposts, replies, quotes) through
the clustering pipeline so analytics compute functions can use real values
instead of placeholders. The clustering algorithm only consumes Text and
Embedding, so this is backward-compatible.
2026-09-02 23:49:41 +02:00
877f839926
test: add clustering KMeans tests and ollama client tests
...
- clustering/kmeans_test.go: TestKMeans (basic, empty, k>n, identical, single, deterministic, high-dim), TestCosineSimilarity, TestNormalize, TestInitializeKMeansPlusPlus
- ollama/client_test.go: TestEmbedTexts, TestSummarizeStyle (streaming, errors, empty input), TestNew_UsesProvidedModels
- ollama/client.go: early return for empty input in EmbedTexts/SummarizeStyle
2026-09-02 00:30:19 +02:00
d3845671b4
ollama: fix EmbedTexts signature, add model config, use clustering package
...
- ollama/client.go: EmbedTexts accepts []clustering.Item, returns [][]float64
- backends.go: ollamaBackend interface uses clustering.Item
- utils/styleProfiles.go: remove duplicate KMeans, normalize, cosineSimilarity
- clustering/: new package with Item, Result types and KMeans
- config.go: add EmbeddingModel, StyleModel env vars
- main.go: pass model config to ollama.New()
- go.mod: add github.com/ethereum/go-ethereum for test client
2026-09-01 23:40:21 +02:00