ML-21: Classify API errors as transient vs permanent

This commit is contained in:
Claudio Ortolina
2026-04-24 13:55:00 +01:00
parent be4f4686f8
commit a1c665b490
43 changed files with 1429 additions and 135 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ defmodule OpenAI do
API.gpt(completion, config())
end
@spec chat_stream([map()], chat_stream_opts()) :: :ok | {:error, String.t()}
@spec chat_stream([map()], chat_stream_opts()) :: :ok | {:error, term()}
def chat_stream(messages, opts \\ []) when is_list(messages) do
model = Keyword.get(opts, :model, "gpt-4.1")
temperature = Keyword.get(opts, :temperature, 0.7)