This commit is contained in:
greeneclipse committed 2026-11-09 00:43:13 +01:00
1 parent 1ad180a052
commit eefb7e2b75
2 files changed
+5 -7

No files matched your search

+1
View File
@@ -183,6 +183,7 @@ func NewServer(
pipeline.Prompts = promptSvc
pipeline.Engine = &processing.Engine{
Vector: &platformsettings.DynamicPinecone{Settings: platformSettings},
EPREL: &platformsettings.DynamicEPREL{Settings: platformSettings},
ProviderMode: processing.AIProviderInternal,
}
s := &Server{
@@ -84,11 +84,13 @@ type EPRELOptions struct {
}
// ResolveEPREL merges Values over EnvConfig EPREL fields (when set) and defaults.
// Enrichment defaults on (EPREL_ENABLED env default true); admin eprel.enabled overrides when set.
// Enrichment is always on: EPREL is free public EU data, so there is no enable/disable
// toggle to misconfigure per environment — only connection details (base URL, timeout,
// fiche language, API key) are admin-configurable.
// API key is optional — the public EU EPREL API does not require authentication.
func (s *Service) ResolveEPREL(ctx context.Context) (EPRELOptions, error) {
out := EPRELOptions{
Enabled: s.Env.EPRELEnabled,
Enabled: true,
BaseURL: s.Env.EPRELBaseURL,
Timeout: s.Env.EPRELTimeout,
FicheLanguage: s.Env.EPRELFicheLanguage,
@@ -104,11 +106,6 @@ func (s *Service) ResolveEPREL(ctx context.Context) (EPRELOptions, error) {
out.FicheLanguage = "EN"
}
if v, ok, err := s.GetKV(ctx, KeyEPRELEnabled); err != nil {
return out, err
} else if ok {
out.Enabled = parseTruthy(v)
}
if v, ok, err := s.GetKV(ctx, KeyEPRELBaseURL); err != nil {
return out, err
} else if ok && strings.TrimSpace(v) != "" {