continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
19.54k stars 1.7k forks source link

Add Auth header to tei reranker provider #2741

Open Wolframko opened 3 weeks ago

Wolframko commented 3 weeks ago

Validations

Problem

Some reranking providers, such as Jina, use a text embeddings interface to provide reranking capabilities. While this is already implemented in core/context/rerankers/tei.ts, it currently lacks support for an authorization header, which prevents the use of hosting providers that require API key authentication.

Solution

Add auth header to core/context/rerankers/tei.ts. Example from official Jina doc: curl https://api.jina.ai/v1/rerank -H "Content-Type: application/json" -H "Authorization: Bearer jina_58cv_DMpG8ytA"

RomneyDa commented 3 weeks ago

This would be a great improvement to the reranker! Open to contribution for this one, some more specific integration items like this might not make it up the priority list for a while. Thanks for opening.