Feat: tools
This commit is contained in:
3
main.go
3
main.go
@@ -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)
|
||||
|
Reference in New Issue
Block a user