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

feat!: remove categories from config and instead pass them as base64 encoded json param #450

Merged
merged 12 commits into from
Nov 17, 2024

Conversation

aleksasiriski
Copy link
Member

@aleksasiriski aleksasiriski commented Nov 15, 2024

A lot of BREAKING CHANGES

This PR implements categories (engines to use and their ranking) as an base64 encoded JSON parameter. This means that we do not have the need for predefined categories here (this will be moved to frontend to keep the current ones as they are).

This is the first step towards a distributed network model, allowing faster innovation with less updates for agents (as they're the main self-hosted component) while also allowing us to implement client-side made custom categories (with personal ranking).

Introduction of search types:

  • web
  • images
  • suggestions

Web (before "general") is now separated from image searching.

Old route -> New route:

  • /healthz -> /healthz (same)
  • /versionz -> /versionz (same)
  • /search -> /search/web (requires new category param)
  • /search (category images) -> /search/images (requires new category param)
  • /suggestions -> /search/suggestions (requires new category param)
  • /exchange -> /exchange (same)
  • /currencies -> /exchange/currencies
  • /proxy -> /imageproxy

TODO:

  • remove default categories
  • add category param (base64 encoded json)
  • handle self-hoster disabled engines (return user error)
  • fix tests to work with the new code
  • rename instances of "general" to "web"
  • rename instances of "search" to "websearch"
  • update example config

@k4lizen
Copy link
Member

k4lizen commented Nov 15, 2024

Huh I see you're passing the category as a parameter, I didn't realize that was part of the idea

@k4lizen
Copy link
Member

k4lizen commented Nov 15, 2024

Yeah okay this makes sense, there is no loss of information like I was worried about in #443 (comment)

@aleksasiriski
Copy link
Member Author

Yeah okay this makes sense, there is no loss of information like I was worried about in #443 (comment)

Yeah I ran into the problem that you mentioned there and came up with this solution, but as I realized it would require a lot of params to get it passed from frontend decided to use base64 instead. Now we need to reimplement the categories on frontend and after that we can make UI for users to make custom ones that can be saved in their cookie.

matijakljajic
matijakljajic previously approved these changes Nov 15, 2024
@matijakljajic
Copy link
Member

Approved, waiting on frontend for it to be merged.

@aleksasiriski aleksasiriski merged commit 78f73f1 into main Nov 17, 2024
5 of 6 checks passed
@aleksasiriski aleksasiriski deleted the as/feat/categoryless branch November 17, 2024 02:28
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