Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Get by index from response wrapper #290

Merged
merged 5 commits into from
Nov 14, 2024
Merged

fix: Get by index from response wrapper #290

merged 5 commits into from
Nov 14, 2024

Conversation

ZhongpinWang
Copy link
Contributor

@ZhongpinWang ZhongpinWang commented Nov 13, 2024

Context

AI/gen-ai-hub-sdk-js-backlog#173.

Previously, if choice index is defined, we use the array index to fetch the choice. But the assumption that nth item in an array is the nth choice is invalid. We should use index in the choice instead.

Definition of Done

  • Code is tested (Unit, E2E)
  • [ ] Error handling created / updated & covered by the tests above
  • [ ] Documentation updated
  • [ ] (Optional) Aligned changes with the Java SDK
  • (Optional) Release notes updated

@ZhongpinWang ZhongpinWang marked this pull request as ready for review November 13, 2024 16:04
Copy link
Member

@tomfrenken tomfrenken left a comment

Choose a reason for hiding this comment

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

LGTM!

@tomfrenken tomfrenken merged commit 91df549 into main Nov 14, 2024
10 checks passed
@tomfrenken tomfrenken deleted the fix-get-by-index branch November 14, 2024 15:03
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.

2 participants