Home Artists Posts Import Register

Downloads

Content

UPDATE: Fixed the error in streamlit version for combined index selection (thanks to Shubham184 from discord!) Also included all requirements now.

PAY attention to the size of your pdf files as it will cost tokens to embed them!!!

you might want to implement a button to the querry as everytime the script refreshes currently it will rerun the script.

I believe by default the current implementation is using text-davinci-003 as it is not the chat endpoint. You might want to set the temperature to 0 For the model.

search all echohive videos and patreon code: https://www.echohive.live/

this is for video: https://youtu.be/qiRSx7RnGjA

NOTE: this code is a bit rough around the edges but here it is anyways. Expect some errors to debug.

Files

Comments

Greg Meadows

ModuleNotFoundError: No module named 'langchain'

echohive42

This usually means “langchain” is not pip installed in the environment you are running the python file from.

Greg Meadows

File "/Users/greg/Downloads/downloads-2TB/code-repos/app-pdf/modify.py", line 157, in OpenAIEmbeddings @root_validator() ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pydantic/deprecated/class_validators.py", line 228, in root_validator raise PydanticUserError( pydantic.errors.PydanticUserError: If you use `@root_validator` with pre=False (the default) you MUST specify `skip_on_failure=True`. Note that `@root_validator` is deprecated and should be replaced with `@model_validator`. For further information visit https://errors.pydantic.dev/2.4/u/root-validator-pre-skip