mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-08-03 17:29:01 +00:00
Raise an error when no vector DB IDs are provided to the query() method of the RAG (knowledge search) tool.
This commit is contained in:
parent
5c010e234a
commit
127b62dee0
1 changed files with 1 additions and 1 deletions
|
@ -104,7 +104,7 @@ class MemoryToolRuntimeImpl(ToolsProtocolPrivate, ToolRuntime, RAGToolRuntime):
|
||||||
query_config: Optional[RAGQueryConfig] = None,
|
query_config: Optional[RAGQueryConfig] = None,
|
||||||
) -> RAGQueryResult:
|
) -> RAGQueryResult:
|
||||||
if not vector_db_ids:
|
if not vector_db_ids:
|
||||||
return RAGQueryResult(content=None)
|
raise ValueError("No vector DBs were provided to the RAG tool. Please provide at least one vector DB ID.")
|
||||||
|
|
||||||
query_config = query_config or RAGQueryConfig()
|
query_config = query_config or RAGQueryConfig()
|
||||||
query = await generate_rag_query(
|
query = await generate_rag_query(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue