You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread '' panicked at 'assertion failed: encoder.len() == decoder.len()', src\lib.rs:458:9
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
Hi @hzhWord. It ran fine on my local machine. Do you have more information? It seems it is an error with tiktoken
Here is a suggestion from ChatGPT:
This error message suggests that there is an assertion failure in the Rust code at line 458 of the lib.rs file, indicating that the length of the encoder and decoder do not match.
It seems that this error is occurring within the context of a Python script, specifically in the step method of the chat_agent.py file. It's possible that the error is related to the interaction between the Python script and the Rust code it's using.
To further debug this error, you can try running the script with the RUST_BACKTRACE=1 environment variable to display a backtrace, which may provide additional information about the source of the problem. Additionally, you can try checking the input data and parameters passed to the Rust code and make sure they are formatted correctly.
thread '' panicked at 'assertion failed: encoder.len() == decoder.len()', src\lib.rs:458:9
note: run with
RUST_BACKTRACE=1
environment variable to display a backtraceFile ".\camel\agents\chat_agent.py", line 71, in step
num_tokens = num_tokens_from_messages(openai_messages, self.model)
encoding = tiktoken.encoding_for_model(model.value)
return get_encoding(encoding_name)
enc = Encoding(**constructor())
self._core_bpe = _tiktoken.CoreBPE(mergeable_ranks, special_tokens, pat_str)
The text was updated successfully, but these errors were encountered: