Harden OpenAI api layer

- Support rate limiting
- Add proper error handling (don't rely on exceptions)

Closes #147
This commit is contained in:
Claudio Ortolina
2026-04-05 16:01:29 +01:00
parent a5df68c7ad
commit 7b5b7e68dd
4 changed files with 37 additions and 24 deletions
+3 -1
View File
@@ -72,7 +72,9 @@ config :music_library, BraveSearch,
user_agent: user_agent,
api_cooldown: 1000
config :music_library, OpenAI, api_key: "change me"
config :music_library, OpenAI,
api_key: "change me",
api_cooldown: 250
# Configure esbuild (the version is required)
config :esbuild,