Skip to content
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

Add feature "Ask a question" using semantic search API #1652

Merged
merged 11 commits into from
Aug 2, 2023

Conversation

Gauravjeetsingh
Copy link
Collaborator

@Gauravjeetsingh Gauravjeetsingh commented Jun 2, 2023

  • Passed sanity tests.
  • Ran npm test & fixed newly introduced lint errors.
  • Checked console for errors.

Used the /shabads endpoint of banidb API and parsed the data to only what's required. We can update it once we have a separate endpoint to load just the verses we need.

Here is it in action:
gurbanibot1
gurbanibot2

Deployment link: https://khalis-herok-gurbanibot-6k71ha.herokuapp.com/

- Add another search type to ask a question
- Uses semantic search API to load the response
- Use baniDB API /shabads endpoint to get the missing data
src/js/components/Autocomplete.js Show resolved Hide resolved
src/js/components/Autocomplete.js Show resolved Hide resolved
src/js/pages/Search/index.js Outdated Show resolved Hide resolved
src/js/pages/Search/index.js Outdated Show resolved Hide resolved
src/js/pages/Search/index.js Outdated Show resolved Hide resolved
src/js/pages/Search/utils/parseSemantic.js Outdated Show resolved Hide resolved
- Also, few code optimizations and error handling based on the PR review
@Gauravjeetsingh Gauravjeetsingh temporarily deployed to khalis-herok-gurbanibot-6k71ha June 9, 2023 17:38 Inactive
@Gauravjeetsingh Gauravjeetsingh temporarily deployed to khalis-herok-gurbanibot-6k71ha June 9, 2023 18:03 Inactive
@Gauravjeetsingh Gauravjeetsingh temporarily deployed to khalis-herok-gurbanibot-6k71ha June 14, 2023 21:46 Inactive
- also switch to newer search result endpoint of baniDB API instead of /shabads
@Gauravjeetsingh Gauravjeetsingh temporarily deployed to khalis-herok-gurbanibot-6k71ha June 21, 2023 19:29 Inactive
@Gauravjeetsingh
Copy link
Collaborator Author

Home page and disclaimer message
gurbanibot-welcome

Pagination in search results
gurbanibot-scroll

@Gauravjeetsingh
Copy link
Collaborator Author

In order for this code to work, we need to merge the BaniDB endpoint and deploy it to production
KhalisFoundation/banidb-api#268

@Gauravjeetsingh Gauravjeetsingh temporarily deployed to khalis-herok-gurbanibot-sqwtic July 5, 2023 17:33 Inactive
@Gauravjeetsingh Gauravjeetsingh temporarily deployed to khalis-herok-gurbanibot-sqwtic July 6, 2023 02:47 Inactive
@saintsoldierx
Copy link
Collaborator

image I see this issue of the dropdown not appearing correctly on subpages. @Gauravjeetsingh

@saintsoldierx
Copy link
Collaborator

saintsoldierx commented Jul 14, 2023

image

I would like the "let us know" to be linked to our contact page (https://support.khalisfoundation.org/support/tickets/new)

The link should not be underlined.

@saintsoldierx
Copy link
Collaborator

saintsoldierx commented Jul 14, 2023

NEW Click here to get your questions answered from the Gurbani.

I would like this to read:

NEW Get your questions answered by our AI Gurbani bot! Try it now.

Try it now should be the link, not underlined. AI is quite a buzzword right now so I think it will attract people.

@Gauravjeetsingh Gauravjeetsingh temporarily deployed to khalis-herok-gurbanibot-sqwtic July 17, 2023 13:49 Inactive
@Gauravjeetsingh
Copy link
Collaborator Author

@saintsoldierx veerji, couldn't reproduce the dropdown issue, is it happening everytime? Or at a certain screen size?

Done with other two changes.

@Gauravjeetsingh Gauravjeetsingh merged commit b9a0fa2 into KhalisFoundation:dev Aug 2, 2023
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.

3 participants