Skip to content

feat: add AI topic to navigation tabs#153

Merged
zhenghaoz merged 6 commits intogorse-io:masterfrom
zhangzhenghao:ai
Apr 7, 2026
Merged

feat: add AI topic to navigation tabs#153
zhenghaoz merged 6 commits intogorse-io:masterfrom
zhangzhenghao:ai

Conversation

@zhangzhenghao
Copy link
Copy Markdown
Contributor

在导航标签中添加 AI topic,位于 All 之后。

- 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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_MODEL env 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.

@zhenghaoz zhenghaoz merged commit 01e85a3 into gorse-io:master Apr 7, 2026
1 check passed
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