Skip to content

feat: expose searchDomainFilter and searchRecencyFilter in Perplexity…#6300

Closed
PythonToGo wants to merge 1 commit intoFlowiseAI:mainfrom
PythonToGo:feature/perplexity-expose-search-options
Closed

feat: expose searchDomainFilter and searchRecencyFilter in Perplexity…#6300
PythonToGo wants to merge 1 commit intoFlowiseAI:mainfrom
PythonToGo:feature/perplexity-expose-search-options

Conversation

@PythonToGo
Copy link
Copy Markdown

Problem

The Perplexity node had searchDomainFilter and searchRecencyFilter UI fields commented out, making them inaccessible to users despite being fully supported by both the LangChain wrapper and the Perplexity API.

The init() function already reads and passes these fields to the model — only the UI definitions were missing.

Changes

Uncommented the two UI input fields in ChatPerplexity.ts:

  • Search Domain Filter (searchDomainFilter): Allows users to restrict citations to specific domains (e.g., ["example.com", "docs.mycompany.com"])
  • Search Recency Filter (searchRecencyFilter): Allows users to filter search results by time interval — hour, day, week, or month

returnImages and returnRelatedQuestions remain disabled as their output is stored in additional_kwargs and not yet handled by Flowise's response pipeline.

Why no backend changes

The LangChain PerplexityChatInput interface already declares both fields, and invocationParams() already maps them to the Perplexity API (search_domain_filter, search_recency_filter). The init() function in Flowise also already reads and passes them. This PR only restores the UI exposure.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request uncomments and enables the 'Search Domain Filter' and 'Search Recency Filter' configuration options for the ChatPerplexity component. A review comment suggests improving the user experience for the domain filter by using a string list type instead of a raw JSON field.

@PythonToGo
Copy link
Copy Markdown
Author

Regarding the Gemini suggestion to use type: 'string' with list: true
I kept type: 'json' because this combination doesn't appear anywhere in the
existing chatmodel nodes, and the init() logic was written specifically for
JSON input. Happy to change it if you prefer a different approach.

@PythonToGo PythonToGo closed this Apr 28, 2026
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