mobarski / ask-my-pdf

Question answering system for PDF files
MIT License
583 stars 289 forks source link

AttributeError: module 'tiktoken' has no attribute 'encoding_for_model' #45

Open swamichandra opened 1 year ago

swamichandra commented 1 year ago

Getting the following error when launching the app

File "C:\Users\xxx\Anaconda3\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script exec(code, module.__dict__) File "C:\Users\xxx\ask-my-pdf\src\gui.py", line 20, in <module> import model File "C:\Users\xxx\ask-my-pdf\src\model.py", line 12, in <module> import ai File "C:\Users\xxx\ask-my-pdf\src\ai.py", line 39, in <module> tokenizer_model = openai.model('text-davinci-003') File "C:\Users\xxx\Anaconda3\lib\site-packages\ai_bricks\api\openai.py", line 30, in model return _class(name, **kwargs) File "C:\Users\xxx\Anaconda3\lib\site-packages\ai_bricks\api\openai.py", line 57, in __init__ self.encoder = tiktoken.encoding_for_model(name)