Feat: tools

This commit is contained in:
Grail Finder
2025-08-27 10:03:09 +03:00
parent 975183d684
commit 57b808cb31
3 changed files with 107 additions and 2 deletions

View File

@@ -218,7 +218,6 @@ func callLLM(prompt string, apiURL string) ([]byte, error) {
}
}
client := &http.Client{}
maxRetries := 6
baseDelay := 2 * time.Second
@@ -234,7 +233,7 @@ func callLLM(prompt string, apiURL string) ([]byte, error) {
req.Header.Add("Authorization", "Bearer "+cfg.APIToken)
}
resp, err := client.Do(req)
resp, err := httpClient.Do(req)
if err != nil {
if attempt == maxRetries-1 {
return nil, fmt.Errorf("LLM call failed after %d retries on client.Do: %w", maxRetries, err)