feat: add AI topic to navigation tabs#153
Merged
zhenghaoz merged 6 commits intogorse-io:masterfrom Apr 7, 2026
Merged
Conversation
- Add AIRelevance Pydantic model for structured output - Add isai() function using chat completion with structured outputs - Determines if a repository is related to AI/ML/NLP/Computer Vision
- Call isai() to check if repository is AI-related - Add 'ai' to categories if isai() returns true
- Add upgrade_isai command to x.py - Iterate through all items in Gorse - Check if repository is AI-related using isai() - Add 'ai' category if AI-related - Skip items that already have 'ai' category
- Add OPENAI_MODEL env variable with default value 'qwen-turbo' - Update tldr() and isai() to use OPENAI_MODEL - Update README.md with OPENAI_MODEL configuration
There was a problem hiding this comment.
Pull request overview
This PR adds an “AI” topic entry to the Explore navigation tabs and introduces backend support to detect/assign the ai category to repositories (during ingestion and via a backfill CLI command).
Changes:
- Add
"ai"to the frontend topic tabs immediately after"all". - Introduce
OPENAI_MODELenv configuration and use it for chat completions. - Add AI relevance detection (
isai) and apply it to item categories; add a CLI command (upgrade_ai) to backfill existing items.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| x.py | Adds upgrade_ai command to backfill ai category on existing items. |
| utils.py | Adds OPENAI_MODEL, introduces isai structured parsing, and assigns ai category during ingestion. |
| README.md | Documents the new OPENAI_MODEL environment variable. |
| frontend/src/layouts/MainLayout.vue | Adds "ai" to the topics list used by the navigation tabs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在导航标签中添加 AI topic,位于 All 之后。