-
Notifications
You must be signed in to change notification settings - Fork 309
Update rtmt.py - pop gives the error when there are two message in the queue #73
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
base: main
Are you sure you want to change the base?
Conversation
…e queue and there will be index out of range index out of the range. consider two message are in the queue and poping both like total size is 2 pop(1) - it will remove the first element and size becomes 1 pop(2) - it will try to remove the 2nd element but size is 1 and it will be index out of bounds
@pamelafox - can you approve this ? |
if output["type"] == "function_call": | ||
message["response"]["output"].pop(i) | ||
original_index = output_len - 1 - reverse_index # Map reversed index to the original |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output_len ? where is it declared and initialized ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for reviewing my PR. Apologies missed to add the declaration earlier. Its now resolved. and updated my PR.
missed to add output_len variable declaration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated rtmt.py file with variable declaration.
Thank you in advance.
if output["type"] == "function_call": | ||
message["response"]["output"].pop(i) | ||
original_index = output_len - 1 - reverse_index # Map reversed index to the original |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for reviewing my PR. Apologies missed to add the declaration earlier. Its now resolved. and updated my PR.
Update rtmt.py - pop gives the error when there are two message in the queue and there will be index out of range
index out of the range.
Consider two message are in the queue and poping both like
total size is 2
pop(1) - it will remove the first element and size becomes 1
pop(2) - it will try to remove the 2nd element but size is 1 and it will be index out of bounds