Skip to content

Commit

Permalink
fix(drivers): check existence of "audio" attribute (#1730)
Browse files Browse the repository at this point in the history
  • Loading branch information
collindutter authored Feb 13, 2025
1 parent 4fe4558 commit 23ca1c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion griptape/drivers/prompt/openai_chat_prompt_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def __to_prompt_stack_message_content(self, response: ChatCompletionMessage) ->

if response.content is not None:
content.append(TextMessageContent(TextArtifact(response.content)))
if response.audio is not None:
if hasattr(response, "audio") and response.audio is not None:
content.append(
AudioMessageContent(
AudioArtifact(
Expand Down

0 comments on commit 23ca1c5

Please sign in to comment.