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

@@ -17,10 +17,11 @@ type NoOpAIClient struct {
model string
}
func (c *NoOpAIClient) Configure(token string, model string, language string) error {
func (c *NoOpAIClient) Configure(config IAIConfig, language string) error {
token := config.GetPassword()
c.language = language
c.client = fmt.Sprintf("I am a noop client with the token %s ", token)
c.model = model
c.model = config.GetModel()
return nil
}