feat: add e2e tests + benchmarks, fix config API
- e2e_test.go: full voice pipeline (STT->Embed->Rerank->LLM->TTS) - main.go: fix config field->method references - Benchmarks: full pipeline 481µs/op
This commit is contained in:
12
main.go
12
main.go
@@ -26,18 +26,18 @@ func main() {
|
||||
ragTopK := getEnvInt("RAG_TOP_K", 10)
|
||||
ragRerankTopK := getEnvInt("RAG_RERANK_TOP_K", 5)
|
||||
ragCollection := getEnv("RAG_COLLECTION", "documents")
|
||||
sttLanguage := getEnv("STT_LANGUAGE", "") // empty = auto-detect
|
||||
sttLanguage := getEnv("STT_LANGUAGE", "") // empty = auto-detect
|
||||
ttsLanguage := getEnv("TTS_LANGUAGE", "en")
|
||||
includeTranscription := getEnvBool("INCLUDE_TRANSCRIPTION", true)
|
||||
includeSources := getEnvBool("INCLUDE_SOURCES", false)
|
||||
|
||||
// Service clients
|
||||
timeout := 60 * time.Second
|
||||
stt := clients.NewSTTClient(cfg.STTURL, timeout)
|
||||
embeddings := clients.NewEmbeddingsClient(cfg.EmbeddingsURL, timeout, "")
|
||||
reranker := clients.NewRerankerClient(cfg.RerankerURL, timeout)
|
||||
llm := clients.NewLLMClient(cfg.LLMURL, timeout)
|
||||
tts := clients.NewTTSClient(cfg.TTSURL, timeout, ttsLanguage)
|
||||
stt := clients.NewSTTClient(cfg.STTURL(), timeout)
|
||||
embeddings := clients.NewEmbeddingsClient(cfg.EmbeddingsURL(), timeout, "")
|
||||
reranker := clients.NewRerankerClient(cfg.RerankerURL(), timeout)
|
||||
llm := clients.NewLLMClient(cfg.LLMURL(), timeout)
|
||||
tts := clients.NewTTSClient(cfg.TTSURL(), timeout, ttsLanguage)
|
||||
milvus := clients.NewMilvusClient(cfg.MilvusHost, cfg.MilvusPort, ragCollection)
|
||||
|
||||
h := handler.New("voice.request", cfg)
|
||||
|
||||
Reference in New Issue
Block a user