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:
lilong.129
2025-06-13 17:06:28 +08:00
parent 409cd693f0
commit b271e655b1
15 changed files with 490 additions and 259 deletions

View File

@@ -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)