26 lines
534 B
Go
26 lines
534 B
Go
package llm
|
|
|
|
import (
|
|
"os"
|
|
)
|
|
|
|
// Service defines the interface for connecting to LLMs
|
|
type Service interface {
|
|
SendOpenAIRequest(systemPrompt string, userPrompt string, model string) (string, error)
|
|
SendGeminiRequest(systemPrompt string, userPrompt string, model string) (string, error)
|
|
}
|
|
|
|
type llmService struct{}
|
|
|
|
// NewLLMService creates a new LLM service instance
|
|
func NewLLMService() Service {
|
|
return &llmService{}
|
|
}
|
|
|
|
func getEnvConfig(key string) string {
|
|
if val := os.Getenv(key); val != "" {
|
|
return val
|
|
}
|
|
return ""
|
|
}
|