mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 07:26:55 +08:00
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:
+2
-3
@@ -89,7 +89,6 @@ func (p *Planner) Call(ctx context.Context, opts *PlanningOptions) (*PlanningRes
|
||||
// reset conversation history if requested
|
||||
if opts.ResetHistory {
|
||||
p.history.Clear() // Clear everything including system message for complete isolation
|
||||
log.Info().Msg("conversation history reset for planner")
|
||||
}
|
||||
|
||||
// prepare prompt
|
||||
@@ -109,8 +108,8 @@ func (p *Planner) Call(ctx context.Context, opts *PlanningOptions) (*PlanningRes
|
||||
logRequest(p.history)
|
||||
startTime := time.Now()
|
||||
message, err := p.model.Generate(ctx, p.history)
|
||||
log.Info().Float64("elapsed(s)", time.Since(startTime).Seconds()).
|
||||
Str("model", string(p.modelConfig.ModelType)).Msg("call model service")
|
||||
log.Debug().Float64("elapsed(s)", time.Since(startTime).Seconds()).
|
||||
Str("model", string(p.modelConfig.ModelType)).Msg("call model service for planning")
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(code.LLMRequestServiceError, err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user