feat: add configuration interface to support customer providers

Signed-off-by: Aris Boutselis <aris.boutselis@senseon.io>
This commit is contained in:
Aris Boutselis
2023-04-20 16:26:12 +01:00
parent bd4ab0e589
commit 84a3cc05fb
5 changed files with 31 additions and 14 deletions

View File

@@ -69,7 +69,7 @@ func NewAnalysis(backend string, language string, filters []string, namespace st
}
aiClient := ai.NewClient(aiProvider.Name)
if err := aiClient.Configure(aiProvider.Password, aiProvider.Model, language); err != nil {
if err := aiClient.Configure(&aiProvider, language); err != nil {
color.Red("Error: %v", err)
return nil, err
}