Skip to content

Conversation

darkthread
Copy link
Contributor

The debug logging will cause an exception when the response contains no choice. Adding check logic before using response.Choices[0] can prevent errors.

@cjellick
Copy link
Contributor

cjellick commented Mar 5, 2024

Do you have a usecase that reproduces?

Co-authored-by: Nick Hale <[email protected]>
Signed-off-by: Jeffrey Lee <[email protected]>
Copy link
Member

@njhale njhale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@njhale njhale requested review from thedadams and tylerslaton March 6, 2024 17:34
@njhale njhale linked an issue Mar 6, 2024 that may be closed by this pull request
Copy link
Contributor

@tylerslaton tylerslaton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution @darkthread 👍🏻

@njhale njhale merged commit a3cbe20 into gptscript-ai:main Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

debug message caused program to panic on any gptscript
4 participants