Add domain filtering #40
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces enhancements to the
perplexity-asktool, adding new features like domain filtering and model selection, while also updating dependencies and documentation. The changes focus on improving functionality, flexibility, and developer usability.Tool Enhancements:
search_domain_filterinperplexity_ask,perplexity_research, andperplexity_reasontools to limit or denylist search domains. This parameter accepts up to 10 domains. [1] [2] [3]modelparameter forperplexity_askandperplexity_reasontools, allowing users to specify models likesonar,sonar-pro,sonar-reasoning, orsonar-reasoning-pro. Defaults are provided for each tool. [1] [2]Code Updates:
performChatCompletionfunction to handlesearch_domain_filterand validate the number of domains. Added logic to prioritize user input, environment variables, and defaults for domain filtering. [1] [2]Documentation Improvements:
README.mdto include details on domain filtering and model selection, along with environment variable setup instructions forPERPLEXITY_SEARCH_DOMAIN_FILTER. [1] [2]Dependency Updates:
axiosanddotenvto enhance API handling and environment variable support. Updated@types/nodeand other packages to their latest versions. [1] [2] [3]These changes collectively improve the functionality and usability of the
perplexity-asktool for developers and end-users.