Skip to content

Commit

Permalink
Merge pull request #195 from bluesky-social/custom-feed-langs
Browse files Browse the repository at this point in the history
Add directions around language handling for custom feeds
  • Loading branch information
bnewbold authored Oct 1, 2024
2 parents d40685d + 4686677 commit 15ce057
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/starter-templates/custom-feeds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ We strongly encourage that the cursor be _unique per feed item_ to prevent unexp
We recommend, for instance, a compound cursor with a timestamp + a CID:
`1683654690921::bafyreia3tbsfxe3cc75xrxyyn6qc42oupi73fxiox76prlyi5bpx7hr72u`

#### Language handling

When making requests to `getFeedSkeleton`, clients are encouraged to populate the `Accept-Language` HTTP header with comma-separated BCP-47 language codes e.g. `en,pr-BR`. Feed generators can use this language context to filter or rank posts. If language filtering is applied, the feed generator should use the the `Content-Language` response header indicating the parsed language codes.

#### Suggestions and Examples

How a feed generator fulfills the `getFeedSkeleton` request is completely at their discretion. At the simplest end, a Feed Generator could supply a "feed" that only contains some hardcoded posts.
Expand All @@ -89,4 +93,4 @@ Depending on your algorithm, you likely do not need to keep posts around for lon

Some examples:
- A community feed: Compile a list of DIDs within that community and filtering the firehose for all posts from users within that list.
- A topical feed: Filter the algorithm for posts and pass the post text through some filtering mechanism (an LLM, a keyword matcher, etc.) that filters for the topic of your choice.
- A topical feed: Filter the algorithm for posts and pass the post text through some filtering mechanism (an LLM, a keyword matcher, etc.) that filters for the topic of your choice.

0 comments on commit 15ce057

Please sign in to comment.