Description
Hi, The following problem occurred when i try to run python case.
Could you help me check it? thank you.
I have installed tiktoken package.
Here is my Python code.
import tiktoken
enc = tiktoken.get_encoding("cl100k_base")
assert enc.decode(enc.encode("hello world")) == "hello world"
enc = tiktoken.encoding_for_model("gpt-4")
When I run it, console report an error as follows:
Traceback (most recent call last):
File "/PycharmProjects/pythonProjectStudy/tokencount/tiktoken.py", line 1, in <module>
import tiktoken
File "/PycharmProjects/pythonProjectStudy/tokencount/tiktoken.py", line 2, in <module>
enc = tiktoken.get_encoding("cl100k_base")
AttributeError: partially initialized module 'tiktoken' has no attribute 'get_encoding' (most likely due to a circular import)
Thank you.