feat: add DB_TIMEZONE configuration and update logging for PostgreSQL timezone
This commit is contained in:
@@ -17,6 +17,7 @@ type Config struct {
|
||||
RequestTimeoutSeconds int
|
||||
OpenAIModel string // default model when client omits it
|
||||
Streaming bool // enable/disable SSE streaming responses
|
||||
DBTimezone string // PostgreSQL session timezone (e.g. "Europe/Istanbul")
|
||||
}
|
||||
|
||||
// Load reads environment variables and returns a populated Config.
|
||||
@@ -51,6 +52,7 @@ func Load() *Config {
|
||||
|
||||
openAIApiKey := os.Getenv("OPENAI_KEY")
|
||||
openAIModel := os.Getenv("OPENAI_MODEL")
|
||||
dbTimezone := os.Getenv("DB_TIMEZONE")
|
||||
|
||||
streaming := true
|
||||
if v := os.Getenv("STREAMING"); v != "" {
|
||||
@@ -70,5 +72,6 @@ func Load() *Config {
|
||||
RequestTimeoutSeconds: timeoutSec,
|
||||
OpenAIModel: openAIModel,
|
||||
Streaming: streaming,
|
||||
DBTimezone: dbTimezone,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user