fix: 修复CVService为空报错

This commit is contained in:
余泓铮
2025-06-30 19:46:15 +08:00
parent 6e8edcaa53
commit f0ddd357ef
2 changed files with 12 additions and 12 deletions
+1 -4
View File
@@ -1,9 +1,7 @@
package option
func NewAIServiceOptions(opts ...AIServiceOption) *AIServiceOptions {
services := &AIServiceOptions{
Enable: true,
}
services := &AIServiceOptions{}
for _, option := range opts {
option(services)
}
@@ -11,7 +9,6 @@ func NewAIServiceOptions(opts ...AIServiceOption) *AIServiceOptions {
}
type AIServiceOptions struct {
Enable bool `json:"enable,omitempty" yaml:"enable,omitempty"`
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