Skip to content

feat: support manual file vectorization - #692

Merged
chenyme merged 1 commit into
devfrom
vector
Aug 29, 2026
Merged

feat: support manual file vectorization#692
chenyme merged 1 commit into
devfrom
vector

Conversation

@chenyme

@chenyme chenyme commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds manual vectorization for eligible files when automatic vectorization is disabled or a previous indexing attempt needs to be retried.

  • Support single-file and batch vectorization with a 100-file limit.
  • Add vectorization actions to the Files page and knowledge base details.
  • Preserve user and admin file ownership boundaries.
  • Introduce a dedicated recoverable embedding queue with bounded concurrency retry handling and terminal failure states.
  • Expose queued processing and vectorization capability states through the API.
  • Avoid automatic extraction and OCR runtime probes when opening or saving file settings.
  • Update Swagger and generated TypeScript API contracts.

Closes #688.

Change type

  • Bug fix
  • Feature
  • Documentation
  • Refactor
  • Configuration / deployment
  • Security hardening
  • Other

Affected areas

  • Frontend / UI
  • Backend / API
  • Authentication / authorization
  • Conversations / streaming
  • Files / RAG / extraction
  • Model routing / providers
  • MCP / tools
  • Billing / payments
  • Admin console
  • Deployment / Docker / configuration
  • Documentation

Verification

  • go vet ./...
  • go test ./...
  • go test -race ./internal/application/embedding ./internal/application/processing ./internal/infra/cache/memory ./internal/infra/cache/redis
  • pnpm check
  • pnpm build
  • pnpm api:check
  • git diff --check
  • Not run; reason:

Screenshots, API examples, or logs

New endpoints:

  • POST /api/v1/files/embeddings
  • POST /api/v1/admin/knowledge-bases/files/embeddings

Request body:

{
  "fileIDs": ["file-id"]
}

Configuration, migration, and compatibility notes

  • No database migration is required.
  • No configuration or deployment changes are required.
  • Existing automatic vectorization behavior remains unchanged.
  • Manual vectorization works independently of the automatic upload trigger.
  • API responses now include vectorization capability and queued-state information.
  • Swagger and generated TypeScript contracts are updated.
  • The change is backward compatible.

Documentation

  • Documentation is not needed for this change.
  • Documentation was updated.
  • Documentation still needs to be updated.

Security and privacy

  • No secrets, tokens, credentials, local config, or personal data are included.
  • User data access remains scoped by authenticated user context unless an admin-only path explicitly requires broader access.
  • Security-sensitive behavior was reviewed, including authentication, authorization, provider routing, file processing, billing, and admin APIs where relevant.

Checklist

  • I searched existing issues and pull requests.
  • Changes are focused and do not include unrelated refactors.
  • Tests or static verification were run where practical.
  • User-facing behavior, deployment steps, API contracts, or configuration changes are documented.
  • Generated artifacts are included only when this project explicitly requires them.
  • Caches, build output, .pyc files, .env files, and local storage data are not committed.

@chenyme
chenyme merged commit c2ffee3 into dev Aug 29, 2026
11 checks passed
@chenyme
chenyme deleted the vector branch August 29, 2026 09:20
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.

[Feature]: 支持手动控制具体文件的向量化

1 participant