From 2079215587e14a37ece0c23675dcb1d2fbeb24c9 Mon Sep 17 00:00:00 2001 From: jueli12 Date: Sun, 25 Aug 2024 16:52:52 +0800 Subject: [PATCH] fix: api --- pkg/infra/ai/huggingface.go | 2 +- pkg/infra/ai/types.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/infra/ai/huggingface.go b/pkg/infra/ai/huggingface.go index edd5e6eb..b61e28fe 100644 --- a/pkg/infra/ai/huggingface.go +++ b/pkg/infra/ai/huggingface.go @@ -34,7 +34,7 @@ func (c *HuggingfaceClient) Configure(cfg AIConfig) error { return nil } -func (c *HuggingfaceClient) Generate(ctx context.Context, prompt string, serviceType string) (string, error) { +func (c *HuggingfaceClient) Generate(ctx context.Context, prompt string) (string, error) { resp, err := c.client.TextGeneration(ctx, &huggingface.TextGenerationRequest{ Inputs: prompt, Parameters: huggingface.TextGenerationParameters{ diff --git a/pkg/infra/ai/types.go b/pkg/infra/ai/types.go index 0d2025eb..61cd369f 100644 --- a/pkg/infra/ai/types.go +++ b/pkg/infra/ai/types.go @@ -37,7 +37,7 @@ type AIProvider interface { Configure(config AIConfig) error // Generate generates a response from the AI service based on // the provided prompt and service type. - Generate(ctx context.Context, prompt string, serviceType string) (string, error) + Generate(ctx context.Context, prompt string) (string, error) } // AIConfig represents the configuration settings for an AI client.