Skip to content

Commit dd53542

Browse files
author
Chris Warren-Smith
committed
LLAMA: nitro - code cleanup added RAG tool
1 parent 4fd29cc commit dd53542

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

llama/llama-sb-rag.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,14 @@ std::string Llama::rag_retrieve(const RagDB &db,
312312
int top_k,
313313
RagSession &session) {
314314
if (db.empty()) {
315+
_last_error = "no input";
315316
return {};
316317
}
317318

318319
std::vector<float> qvec;
319320
std::string text = INSTRUCT_QUERY + query;
320321
if (!embed_text(text, qvec, db.embed_dim)) {
322+
_last_error = "failed to embed text";
321323
return {};
322324
}
323325

0 commit comments

Comments
 (0)