Skip to content

Comments

Update catalan translation.json#95

Merged
Classic298 merged 1 commit intoembedding-perffrom
claude/review-embedding-api-012FRbP65G7KaK6LBa3fKfK4
Nov 22, 2025
Merged

Update catalan translation.json#95
Classic298 merged 1 commit intoembedding-perffrom
claude/review-embedding-api-012FRbP65G7KaK6LBa3fKfK4

Conversation

@Classic298
Copy link
Owner

No description provided.

Critical fix for concurrent performance:
- Wrap sentence_transformers.encode() in asyncio.to_thread()
- Prevents CPU-bound sync operations from blocking FastAPI event loop
- Ensures server stays responsive during embedding processing

Code quality improvements per maintainer feedback:
- Remove duplicate async embedding functions
- Use include_user_info_headers() helper instead of manual header construction
- Rename json_data to form_data for consistency
- Rename elem to item in response parsing
- Remove unnecessary retry loop from Azure function
- Restore lambda wrappers with user parameter to preserve user context
- Revert reranking function signature to match dev branch
- Restore separate condition checks with warning logs

External APIs (OpenAI, Azure, Ollama) already use async aiohttp - unaffected.
@Classic298 Classic298 merged commit cf85bec into embedding-perf Nov 22, 2025
@Classic298 Classic298 deleted the claude/review-embedding-api-012FRbP65G7KaK6LBa3fKfK4 branch November 23, 2025 09:44
Classic298 added a commit that referenced this pull request Nov 24, 2025
…#19296)

* Update utils.py (#77)

Co-authored-by: Claude <[email protected]>

* refactor: address code review feedback for embedding performance improvements (#92)

Co-authored-by: Claude <[email protected]>

* fix: prevent sentence transformers from blocking async event loop (#95)

Co-authored-by: Claude <[email protected]>

---------

Co-authored-by: Claude <[email protected]>
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.

2 participants