From 78aee154a9b86d967464e46cbc9a50d130781840 Mon Sep 17 00:00:00 2001 From: vallyenfail Date: Tue, 20 Jan 2026 11:21:34 +0300 Subject: [PATCH] add service --- internal/ai/openai.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/ai/openai.go b/internal/ai/openai.go index 7278e29..622f2c5 100644 --- a/internal/ai/openai.go +++ b/internal/ai/openai.go @@ -41,9 +41,17 @@ type tzResponse struct { } func NewOpenAIClient(apiKey string) *OpenAIClient { + transport := &http.Transport{ + Proxy: http.ProxyFromEnvironment, + } + + client := &http.Client{ + Transport: transport, + } + return &OpenAIClient{ apiKey: apiKey, - client: &http.Client{}, + client: client, } }