mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-11 18:59:39 +08:00
feat: add MCP plugin support and optimize AI service configuration
- Add UIXT runner with MCP plugin support - Refactor AI service options handling - Optimize configuration parsing for LLM and CV services - Update dependencies to latest versions
This commit is contained in:
@@ -9,9 +9,23 @@ func NewAIServiceOptions(opts ...AIServiceOption) *AIServiceOptions {
|
||||
}
|
||||
|
||||
type AIServiceOptions struct {
|
||||
CVService CVServiceType
|
||||
LLMService LLMServiceType
|
||||
LLMConfig *LLMServiceConfig // New field for advanced LLM configuration
|
||||
CVService CVServiceType `json:"cv_service,omitempty" yaml:"cv_service,omitempty"`
|
||||
LLMService LLMServiceType `json:"llm_service,omitempty" yaml:"llm_service,omitempty"`
|
||||
LLMConfig *LLMServiceConfig `json:"llm_config,omitempty" yaml:"llm_config,omitempty"` // advanced LLM configuration
|
||||
}
|
||||
|
||||
func (opts *AIServiceOptions) Options() []AIServiceOption {
|
||||
aiOpts := []AIServiceOption{}
|
||||
if opts.CVService != "" {
|
||||
aiOpts = append(aiOpts, WithCVService(opts.CVService))
|
||||
}
|
||||
if opts.LLMService != "" {
|
||||
aiOpts = append(aiOpts, WithLLMService(opts.LLMService))
|
||||
}
|
||||
if opts.LLMConfig != nil {
|
||||
aiOpts = append(aiOpts, WithLLMConfig(opts.LLMConfig))
|
||||
}
|
||||
return aiOpts
|
||||
}
|
||||
|
||||
type AIServiceOption func(*AIServiceOptions)
|
||||
|
||||
Reference in New Issue
Block a user