在ChromaDB中按ID检索集合中的项目 本教程将引导您了解如何在ChromaDB中按ID检索集合中的项目。 创建集合 我们首先初始化ChromaDB客户端,并创建一个名为 的集合。 添加原始文档 我们使用 方法向集合中添加了三个原始文档。每个文档都与一个唯一的ID相关联。 按ID从集合中检索项目 我们可以使用 method. In this example, we retrieve items with the IDs "quote1" and "quote3". The method returns a dictionary with the IDs, embeddings, metadatas, and documents of the retrieved items.