feat: add e2e tests + benchmarks, fix config API

- e2e_test.go: full pipeline tests (LLM-only, RAG, TTS, timeout)
- main.go: fix config field->method references (EmbeddingsURL() etc.)
- Benchmarks: LLMOnly 136µs/op, RAGFlow 496µs/op
This commit is contained in:
2026-02-20 06:45:21 -05:00
parent adcdb87b9a
commit 609b44de83
4 changed files with 253 additions and 4 deletions

View File

@@ -32,14 +32,14 @@ func main() {
// Service clients
timeout := 60 * time.Second
embeddings := clients.NewEmbeddingsClient(cfg.EmbeddingsURL, timeout, "")
reranker := clients.NewRerankerClient(cfg.RerankerURL, timeout)
llm := clients.NewLLMClient(cfg.LLMURL, timeout)
embeddings := clients.NewEmbeddingsClient(cfg.EmbeddingsURL(), timeout, "")
reranker := clients.NewRerankerClient(cfg.RerankerURL(), timeout)
llm := clients.NewLLMClient(cfg.LLMURL(), timeout)
milvus := clients.NewMilvusClient(cfg.MilvusHost, cfg.MilvusPort, ragCollection)
var tts *clients.TTSClient
if enableTTS {
tts = clients.NewTTSClient(cfg.TTSURL, timeout, ttsLanguage)
tts = clients.NewTTSClient(cfg.TTSURL(), timeout, ttsLanguage)
}
h := handler.New("ai.chat.user.*.message", cfg)