@@ -416,7 +416,7 @@ async def chroma_query_documents(
416416 n_results : int = 5 ,
417417 where : Optional [Dict ] = None ,
418418 where_document : Optional [Dict ] = None ,
419- include : Optional [ List [str ]] = None
419+ include : List [str ] = [ "documents" , "embeddings" , "metadatas" , "distances" ]
420420) -> Dict :
421421 """Query documents from a Chroma collection with advanced filtering.
422422
@@ -431,8 +431,7 @@ async def chroma_query_documents(
431431 - Logical AND: {"$and": [{"field1": {"$eq": "value1"}}, {"field2": {"$gt": 5}}]}
432432 - Logical OR: {"$or": [{"field1": {"$eq": "value1"}}, {"field1": {"$eq": "value2"}}]}
433433 where_document: Optional document content filters
434- include: Optional list of what to include in response. Can contain any of:
435- ["documents", "embeddings", "metadatas", "distances"]
434+ include: List of what to include in response. By default, this will include documents, embeddings, metadatas, and distances.
436435 """
437436 if not query_texts :
438437 raise ValueError ("The 'query_texts' list cannot be empty." )
@@ -456,7 +455,7 @@ async def chroma_get_documents(
456455 ids : Optional [List [str ]] = None ,
457456 where : Optional [Dict ] = None ,
458457 where_document : Optional [Dict ] = None ,
459- include : Optional [ List [str ]] = None ,
458+ include : List [str ] = [ "documents" , "embeddings" , "metadatas" ] ,
460459 limit : Optional [int ] = None ,
461460 offset : Optional [int ] = None
462461) -> Dict :
@@ -472,8 +471,7 @@ async def chroma_get_documents(
472471 - Logical AND: {"$and": [{"field1": {"$eq": "value1"}}, {"field2": {"$gt": 5}}]}
473472 - Logical OR: {"$or": [{"field1": {"$eq": "value1"}}, {"field1": {"$eq": "value2"}}]}
474473 where_document: Optional document content filters
475- include: Optional list of what to include in response. Can contain any of:
476- ["documents", "embeddings", "metadatas"]
474+ include: List of what to include in response. By default, this will include documents, embeddings, and metadatas.
477475 limit: Optional maximum number of documents to return
478476 offset: Optional number of documents to skip before returning results
479477
0 commit comments