-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Added POC for /google command #628
Added POC for /google command #628
Conversation
Thanks for your contribution, and welcome to the project! Can you update your PR description and include some pictures of UI/UX in discord? |
This is for Zabu. I'll add all the relevant information once it's ready. This PR is to not be merged. |
Alright, will convert it to draft in that case. Thanks ^^ |
id suggest u make the PR a bit prettier. people will be happy to discuss the UX if u add a few pictures. not just me 👍 |
application/src/main/java/org/togetherjava/tjbot/commands/search/GoogleSearchStrategy.java
Outdated
Show resolved
Hide resolved
Updated the code and PR to be ready for prod. The API key should now be passed as an environment variable called "serpapi-api-key". Once Zabuzard creates the api keys file/store we can migrate to that. |
See the "config" class and config.json file Exists already |
UI/UX looks nice, I would just trim it down considerably. Just the first embed is enough, the other 5 embeds are not really useful, since they are small and don't provide a link. If beginners knew how to google their answer, they wouldn't come to us for help and guidance, so it's important to not overwhelm them with 20 results. If the answer is not in the first 3 results, it's a badly asked question anyway, and other results won't help either. When was the last time you used 2nd page on google/searx? ^^ So yeah, I think it works better if it's short and sweet. Just top 3 results, what do you think? ^^ |
Handing over. I won't have time to continue working on this as I was hoping it would only take a day to complete. All the changes are done. I suppose the only thing left would be the actual visual message. If it's sufficent, then this can be merged otherwise, whoever takes over can make the visual changes. Thanks |
Ah, I see, now it's clear why there is a difference between first and other embeds, thanks. Does anyone use 'people also ask'? I don't care what other people (also) ask, I care about the thing I asked. Maybe it's useful for people that ask bad questions, so the engine helps them out with "hey, maybe this is what you are looking for". Or its quick answers to similar questions, that can easily fit in embed? Idea being that people don't have to open links and read long blog posts, answer is right there? Genuinely curious, since I don't use that thing. But from the examples you posted, it looks useful. Maybe the normal search results would be more useful if they had the same amount of context as the first embed tho. I would probably go with just 3 results, so it's not too overwhelming, but with enough context. Ideally, with the whole answer in the embed, so the user doesn't have to open links in their browser and read 30-minute guides. Maybe 'people also ask' is not a bad idea here, so 1 of that and 2 regular top results. |
So the "people also ask" section is usually your same question but rephrased differently (often better). I would actually keep that there, it's very useful and I personally use it alot. Google by default limits this to 4. I reckon we should keep that and limit the organic results to maybe 2. So the bots message isn't too long and overwhelming. To point out, the "people also ask" is not always visible due to the nature of some question (e.g. if the question is uncommon) in which case, maybe we can keep the top 4 results of the organic results. So... 4 "people also ask" if no "people also ask" then 4 organic search results. Opinion? |
OP wants to transfer this to whoever else wants to work on it. I am going to move it from the fork to a branch. |
Transferred into #637 Thanks for the efforts @surajkumar 👍 |
This pull requests implements 2 new slash commands:
/google
This command searches Google for the input query and provides search results accordingly.
/googleit
This command takes the thread in #active_questions that the command was invoked from and Google's the title of the thread. The command only works in a thread within #active_questions.
In additon to the /googleit command, a message has been added to the bot that tells users that they can ask the bot to google their question.
Closes #627.