Motivation

This module works pretty fine. It would be cool to be able to integrate it with existing views created by Solr so, along with the results, there appears an AI response.

A real example of this working is the 'AI overview' results that google provides.

This would help users to find a quick answer to a question they are searching, without needing to explore every result.

Proposed resolution

Automatically build a response by reading the search text provided by the user, in the fulltext search of the view, instead of the text search of the block. In this mode, the AI search textfield won't appear, there will only appear the AI response.

A use case would be:

- The user enters a search text
- Search API provides classical search results
- AI search block detects the search API text, and builds the response.

A complementary solution can be, allowing the user press a button named AI (or a button with the trending sparkles icon), that triggers an AJAX request and build the AI response.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

omarlopesino created an issue. See original summary.

keiserjb’s picture

Check this out, once I fix the patch again. https://www.drupal.org/project/ai_search_block/issues/3544712

wouters_f’s picture

Status: Active » Needs review

it's merged to I'm curious to Omarlopersino's feedback.

omarlopesino’s picture

Hi, thanks all!

I have used the functionality at rc13 and the solution looks fine for me.

The only issue I had is that when I add a display of a view of a different type than block, it shows a message indicating that there is a block missing. That's because it is assumed to only add block displays which makes sense. So I have created a MR that only lets adding block display.

Please review, thanks!

keiserjb’s picture

Yes, I remember when making this that I meant to clean that up!