Use map_join instead of map+join
This commit is contained in:
@@ -147,10 +147,7 @@ defmodule MusicLibrary.Records do
|
||||
end
|
||||
|
||||
def populate_genres(record) do
|
||||
artists =
|
||||
record.artists
|
||||
|> Enum.map(fn a -> a.name end)
|
||||
|> Enum.join(",")
|
||||
artists = Enum.map_join(record.artists, ",", fn a -> a.name end)
|
||||
|
||||
completion = %OpenAI.Completion{
|
||||
content: """
|
||||
|
||||
Reference in New Issue
Block a user