llm_client.go 352 B

123456789101112131415161718192021222324
  1. package llm
  2. import (
  3. "net/http"
  4. "time"
  5. )
  6. type LLMClient struct {
  7. BaseURL string
  8. HttpClient *http.Client
  9. }
  10. func NewLLMClient(baseURL string, timeout time.Duration) *LLMClient {
  11. return &LLMClient{
  12. BaseURL: baseURL,
  13. HttpClient: &http.Client{
  14. Timeout: timeout * time.Second,
  15. },
  16. }
  17. }
  18. type LLMService interface {
  19. AskQuestion() string
  20. }