aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.go34
1 files changed, 17 insertions, 17 deletions
diff --git a/main.go b/main.go
index 86c0919..a5ffbdd 100644
--- a/main.go
+++ b/main.go
@@ -241,24 +241,24 @@ func runIRC(appConfig TomlConfig, ircChan chan *girc.Client) {
ctx, cancel := context.WithTimeout(context.Background(), time.Duration(appConfig.RequestTimeout)*time.Second)
defer cancel()
- httpClient := http.Client{}
- allProxy := os.Getenv("ALL_PROXY")
- if allProxy != "" {
- proxyUrl, err := url.Parse(allProxy)
- if err != nil {
- client.Cmd.ReplyTo(event, fmt.Sprintf("error: %s", err.Error()))
-
- return
- }
- transport := &http.Transport{
- Proxy: http.ProxyURL(proxyUrl),
- }
-
- httpClient.Transport = transport
- }
+ // httpClient := http.Client{}
+ // allProxy := os.Getenv("ALL_PROXY")
+ // if allProxy != "" {
+ // proxyUrl, err := url.Parse(allProxy)
+ // if err != nil {
+ // client.Cmd.ReplyTo(event, fmt.Sprintf("error: %s", err.Error()))
+
+ // return
+ // }
+ // transport := &http.Transport{
+ // Proxy: http.ProxyURL(proxyUrl),
+ // }
+
+ // httpClient.Transport = transport
+ // }
- clientGemini, err := genai.NewClient(ctx, option.WithAPIKey(appConfig.Apikey), option.WithHTTPClient(&httpClient))
- // clientGemini, err := genai.NewClient(ctx, option.WithAPIKey(appConfig.Apikey))
+ // clientGemini, err := genai.NewClient(ctx, option.WithAPIKey(appConfig.Apikey), option.WithHTTPClient(&httpClient))
+ clientGemini, err := genai.NewClient(ctx, option.WithAPIKey(appConfig.Apikey))
if err != nil {
client.Cmd.ReplyTo(event, fmt.Sprintf("error: %s", err.Error()))