Skip to content

Commit

Permalink
fixed cases where choices are undefined (Helicone#514)
Browse files Browse the repository at this point in the history
  • Loading branch information
chitalian authored Jun 26, 2023
1 parent 8a33b3a commit f66f6ae
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class ChatGPTBuilder extends AbstractRequestBuilder {
<Chat
chatProperties={{
request: this.response.request_body.messages,
response: this.response.response_body?.choices[0]?.message || "",
response:
this.response.response_body?.choices?.[0]?.message || "",
}}
status={this.response.response_status}
/>
Expand Down

0 comments on commit f66f6ae

Please sign in to comment.