Where possible, use built-in JSON instead of Jason
Note that it's not possible to replace any call where we encode and pretty print, as JSON doesn't have such functionality.
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@ defmodule OpenAI.API do
|
||||
|
||||
defp decode_body("", _), do: :ok
|
||||
defp decode_body("[DONE]", _), do: :ok
|
||||
defp decode_body(json, cb), do: cb.(Jason.decode!(json))
|
||||
defp decode_body(json, cb), do: cb.(JSON.decode!(json))
|
||||
|
||||
defp api_key do
|
||||
Application.get_env(:music_library, OpenAI)
|
||||
|
||||
Reference in New Issue
Block a user