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

there exists memeory leak in this package #6

Closed
assmdx opened this issue May 10, 2023 · 5 comments
Closed

there exists memeory leak in this package #6

assmdx opened this issue May 10, 2023 · 5 comments

Comments

@assmdx
Copy link

assmdx commented May 10, 2023

No description provided.

@assmdx
Copy link
Author

assmdx commented May 10, 2023

image image I use deepClone to make a new msg object, however memory leak still exits.

@assmdx
Copy link
Author

assmdx commented May 10, 2023

@RuslanMikailov
Copy link

+1

@assmdx
Copy link
Author

assmdx commented May 11, 2023

maybe here should invoke encoding.free() everytime in for loop

for (const [key, value] of Object.entries(message)) {
                num_tokens += encoding.encode(value).length;
                if (key === 'name') {
                    num_tokens += tokens_per_name;
                }
            }

@Cainier
Copy link
Owner

Cainier commented May 11, 2023

Ok, thanks for the bug feedback

I fixed this bug in v1.0.7

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

No branches or pull requests

3 participants