mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-16 23:40:59 +00:00
fix(plugin): extend knowledge retrieval timeout
This commit is contained in:
@@ -1944,7 +1944,7 @@ class RuntimeConnectionHandler(handler.Handler):
|
|||||||
'retriever_name': retriever_name,
|
'retriever_name': retriever_name,
|
||||||
'retrieval_context': retrieval_context,
|
'retrieval_context': retrieval_context,
|
||||||
},
|
},
|
||||||
timeout=30,
|
timeout=180,
|
||||||
)
|
)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|||||||
@@ -274,6 +274,24 @@ class TestHandlerPluginDiagnostic:
|
|||||||
plugin_handler.LangBotToRuntimeAction = original
|
plugin_handler.LangBotToRuntimeAction = original
|
||||||
|
|
||||||
|
|
||||||
|
class TestHandlerKnowledgeRetrieval:
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_retrieve_knowledge_allows_runtime_to_finish_inner_timeout(self):
|
||||||
|
app = SimpleNamespace()
|
||||||
|
runtime_handler = make_handler(app)
|
||||||
|
runtime_handler.call_action = AsyncMock(return_value={'results': []})
|
||||||
|
|
||||||
|
result = await runtime_handler.retrieve_knowledge(
|
||||||
|
'langbot-team',
|
||||||
|
'LangRAG',
|
||||||
|
'',
|
||||||
|
{'query': 'sentinel'},
|
||||||
|
)
|
||||||
|
|
||||||
|
assert result == {'results': []}
|
||||||
|
assert runtime_handler.call_action.await_args.kwargs['timeout'] == 180
|
||||||
|
|
||||||
|
|
||||||
class TestConstantsSemanticVersion:
|
class TestConstantsSemanticVersion:
|
||||||
"""Tests for version constant access."""
|
"""Tests for version constant access."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user