feat: implement multi-model service configuration support

- Support configuring multiple LLM services simultaneously
- Auto-derive model names from service types to simplify configuration
- Maintain backward compatibility with existing configurations
- Refactor configuration logic into dedicated env module
- Add comprehensive unit test coverage
- Update documentation with new configuration approach
This commit is contained in:
lilong.129
2025-06-06 22:17:59 +08:00
parent b642ea004e
commit 484eebdefd
9 changed files with 413 additions and 128 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ Here is the assertion. Please tell whether it is truthy according to the screens
logRequest(a.history)
startTime := time.Now()
message, err := a.model.Generate(ctx, a.history)
log.Info().Float64("elapsed(s)", time.Since(startTime).Seconds()).
log.Debug().Float64("elapsed(s)", time.Since(startTime).Seconds()).
Str("model", string(a.modelConfig.ModelType)).Msg("call model service for assertion")
if err != nil {
return nil, errors.Wrap(code.LLMRequestServiceError, err.Error())