Skip to content

Conversation

@luojiyin1987
Copy link

Summary

Fixes #62 - Make ChatGPT_API_with_finish_reason return consistent tuple type on error.

Problem

The function returned (content, finish_reason) on success but "Error" string when max retries reached, causing unpacking errors.

Change

  • Return ("", "error") tuple instead of "Error" string
  • Maintains consistent return type for all code paths

Test

Manual testing of error scenarios.

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.

fix: ChatGPT_API_with_finish_reason returns inconsistent type on error

1 participant