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

Update ChatWithFunctions.kt #547

Merged
merged 4 commits into from
Nov 23, 2023
Merged

Update ChatWithFunctions.kt #547

merged 4 commits into from
Nov 23, 2023

Conversation

fedefernandez
Copy link
Contributor

@fedefernandez fedefernandez commented Nov 17, 2023

The current loop never gets if (currentAttempts == maxDeserializationAttempts) satisfied. This shifts the index to the right, so the condition is satisfied when the maximum is reached.

Copy link
Contributor

@raulraja raulraja left a comment

Choose a reason for hiding this comment

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

Maybe we should use here rangeTo https://kotlinlang.org/docs/ranges.html

@fedefernandez
Copy link
Contributor Author

Makes sense, I'll take a look and adapt the code 👍

@fedefernandez
Copy link
Contributor Author

@raulraja the code has been adapted. Thanks

@fedefernandez fedefernandez merged commit 0153cc9 into main Nov 23, 2023
6 checks passed
@fedefernandez fedefernandez deleted the fix/chat-with-functions branch November 23, 2023 08:38
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.

3 participants