mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-10 05:00:59 +00:00
chore: merge master into feat/multi-tenants
- Resolved conflict in provider.py: merged rerank model support with tenant context - Resolved conflict in telegram.py: kept async.to_thread optimization and added url parameter - Resolved conflict in test_model_manager.py: kept both cloud runtime and rerank tests
This commit is contained in:
@@ -944,16 +944,21 @@ class LiteLLMRequester(requester.ProviderAPIRequester):
|
||||
if api_key:
|
||||
headers['Authorization'] = f'Bearer {api_key}'
|
||||
|
||||
request_args = dict(extra_args)
|
||||
rerank_url = request_args.pop('rerank_url', None)
|
||||
rerank_path = request_args.pop('rerank_path', 'rerank')
|
||||
|
||||
payload: dict[str, typing.Any] = {
|
||||
'model': model_name,
|
||||
'query': query,
|
||||
'documents': documents,
|
||||
'top_n': top_n,
|
||||
}
|
||||
if extra_args:
|
||||
payload.update(extra_args)
|
||||
if request_args:
|
||||
payload.update(request_args)
|
||||
|
||||
rerank_url = f'{base_url}/rerank'
|
||||
if not rerank_url:
|
||||
rerank_url = f'{base_url}/{str(rerank_path).strip("/")}'
|
||||
|
||||
try:
|
||||
async with httpx.AsyncClient(
|
||||
|
||||
Reference in New Issue
Block a user