Skip to content

Add domain filtering #40

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sanyamjain47
Copy link

This pull request introduces enhancements to the perplexity-ask tool, 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:

  • Added support for search_domain_filter in perplexity_ask, perplexity_research, and perplexity_reason tools to limit or denylist search domains. This parameter accepts up to 10 domains. [1] [2] [3]
  • Introduced optional model parameter for perplexity_ask and perplexity_reason tools, allowing users to specify models like sonar, sonar-pro, sonar-reasoning, or sonar-reasoning-pro. Defaults are provided for each tool. [1] [2]

Code Updates:

  • Updated performChatCompletion function to handle search_domain_filter and validate the number of domains. Added logic to prioritize user input, environment variables, and defaults for domain filtering. [1] [2]
  • Improved error handling and validation for tool arguments, ensuring robust input checks for models and domain filters. [1] [2]

Documentation Improvements:

  • Expanded README.md to include details on domain filtering and model selection, along with environment variable setup instructions for PERPLEXITY_SEARCH_DOMAIN_FILTER. [1] [2]

Dependency Updates:

  • Added new dependencies like axios and dotenv to enhance API handling and environment variable support. Updated @types/node and other packages to their latest versions. [1] [2] [3]

These changes collectively improve the functionality and usability of the perplexity-ask tool for developers and end-users.

@sanyamjain47 sanyamjain47 marked this pull request as draft June 26, 2025 07:22
@sanyamjain47 sanyamjain47 marked this pull request as draft June 26, 2025 07:22
@sanyamjain47 sanyamjain47 marked this pull request as ready for review June 26, 2025 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant