aboutsummaryrefslogtreecommitdiffstats
path: root/main.go
diff options
context:
space:
mode:
authorterminaldweller <devi@terminaldweller.com>2024-05-10 17:05:53 +0000
committerterminaldweller <devi@terminaldweller.com>2024-05-10 17:05:53 +0000
commit895d3cc0fa4607b8d9b0a790b811b8e639c65246 (patch)
tree6de3fca67a95c6e0929af2b22c7fa7f63b99642a /main.go
parentWIP (diff)
downloadmilla-895d3cc0fa4607b8d9b0a790b811b8e639c65246.tar.gz
milla-895d3cc0fa4607b8d9b0a790b811b8e639c65246.zip
WIP
Diffstat (limited to 'main.go')
-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()))