MCPcopy
hub / github.com/openai/chatgpt-retrieval-plugin / _upsert

Method _upsert

datastore/datastore.py:45–51  ·  view source on GitHub ↗

Takes in a list of document chunks and inserts them into the database. Return a list of document ids.

(self, chunks: Dict[str, List[DocumentChunk]])

Source from the content-addressed store, hash-verified

43
44 @abstractmethod
45 async def _upsert(self, chunks: Dict[str, List[DocumentChunk]]) -> List[str]:
46 """
47 Takes in a list of document chunks and inserts them into the database.
48 Return a list of document ids.
49 """
50
51 raise NotImplementedError
52
53 async def query(self, queries: List[Query]) -> List[QueryResult]:
54 """

Callers 15

upsertMethod · 0.95
test_upsertFunction · 0.45
test_queryFunction · 0.45
test_deleteFunction · 0.45
test_upsertFunction · 0.45
test_queryFunction · 0.45
test_deleteFunction · 0.45
test_upsert_new_chunkFunction · 0.45
test_query_scoreFunction · 0.45
test_query_filterFunction · 0.45
test_delete_allFunction · 0.45

Calls

no outgoing calls

Tested by 15

test_upsertFunction · 0.36
test_queryFunction · 0.36
test_deleteFunction · 0.36
test_upsertFunction · 0.36
test_queryFunction · 0.36
test_deleteFunction · 0.36
test_upsert_new_chunkFunction · 0.36
test_query_scoreFunction · 0.36
test_query_filterFunction · 0.36
test_delete_allFunction · 0.36