Added chunking and saving embeddings

This commit is contained in:
Radu Macocian (admac)
2026-06-25 09:50:26 +02:00
parent 5d5351a459
commit 491510ca78
6 changed files with 116 additions and 54 deletions
+16 -14
View File
@@ -43,10 +43,11 @@ func (config DbConfig) ConnectionString() string {
}
type EmbeddingConfig struct {
Url string
Key string
Model string
Dim int
Url string
Key string
Model string
Dim int
BatchSize int
}
type MemoryConfig struct {
@@ -130,19 +131,20 @@ func defaultConfig() *Config {
LLMConfig{Model: ""},
[]LogConfig{{Level: slog.LevelInfo.Level(), Format: "text"}},
DbConfig{
Url: "localhost",
User: "psql",
Port: "54321",
Password: "",
DbName: "souvenir",
History: HistoryConfig{Enabled: true},
ChunkSize: 400,
Url: "localhost",
User: "psql",
Port: "54321",
Password: "",
DbName: "souvenir",
History: HistoryConfig{Enabled: true},
ChunkSize: 400,
ChunkOverlap: 40,
},
EmbeddingConfig{
Url: "",
Key: "",
Model: "",
Url: "",
Key: "",
Model: "",
BatchSize: 64,
},
}
}