Move model definition into completion struct

This commit is contained in:
Claudio Ortolina
2024-12-29 20:58:09 +00:00
parent c7e1be2f2f
commit 85b403817f
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ defmodule OpenAI.API do
Req.post!("https://api.openai.com/v1/chat/completions",
json: %{
model: "gpt-4o-mini",
model: completion.model,
messages: [Map.take(completion, [:content, :role])],
response_format: %{type: "json_object"},
stream: true,