RAGatouille icon indicating copy to clipboard operation
RAGatouille copied to clipboard

output only json?

Open quantumalchemy opened this issue 10 months ago • 0 comments

How to return json only in results?

from ragatouille import RAGPretrainedModel query = ["query?"] RAG = RAGPretrainedModel.from_index(index_path) results = RAG.search(query,k=2) print(results) >>> Searcher loaded! #> QueryTokenizer.tensorize(batch_text[0], batch_background[0], bsize) == #> Input: .. bla bla *** I just want *** --> [{'content': ... ] is there a switch? to not get all the above gibberish?

quantumalchemy avatar Apr 09 '24 18:04 quantumalchemy