-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Postprocessors #1715
Postprocessors #1715
Conversation
Removed the include/exclude word filter per @imartinez request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the comment I've added, it is good to go!
… of loading the settings function ()
Took me a second to follow the class structure, but I think I got it figured out. I added a commit to my branch and waiting for the post functions to run. |
I tried to add similarity_top_k from the vector stores file. I added this to the settings.py and the similarity_value worked as intended (I guess the python script doesn't want to load the yaml settings file with an empty value?) But I couldn't get similarity_top_k to access the settings file easily. I could add "self" to the class method and read the settings variable set in the init part of the class without changes in multiple places. I must be going about this the wrong way |
Added capability to use similarity match as well as keyword include/exclude.
Looking at:
SimilarityPostprocessor(similarity_cutoff=settings().llm.similarity_value)
The default value is none and you can look at how llama_index handles this:
https://github.com/run-llama/llama_index/blob/d33b789de9635dcf19e02050c6a0487fcfeb30ad/llama-index-core/llama_index/core/postprocessor/node.py#L64
This class automatically ignores it if set to None: