fix: check LLM env

This commit is contained in:
lilong.129
2025-03-19 22:28:42 +08:00
parent 55acaceb09
commit a4d3c08a6a
8 changed files with 44 additions and 16 deletions
+5
View File
@@ -53,6 +53,11 @@ const (
)
func WithLLMService(service LLMServiceType) AIServiceOption {
if err := checkEnvLLM(); err != nil {
log.Error().Err(err).Msg("check LLM env failed")
os.Exit(code.GetErrorCode(err))
}
return func(opts *AIServices) {
if service == LLMServiceTypeGPT4o {
var err error