@@ -156,6 +156,7 @@ def add(
156156 text : str ,
157157 collection : Optional [str ] | NotGiven = NOT_GIVEN ,
158158 date : Union [str , datetime ] | NotGiven = NOT_GIVEN ,
159+ resource_id : str | NotGiven = NOT_GIVEN ,
159160 title : Optional [str ] | NotGiven = NOT_GIVEN ,
160161 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
161162 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -180,6 +181,9 @@ def add(
180181 the date of the last message). This helps the ranking algorithm and allows you
181182 to filter by date range.
182183
184+ resource_id: The resource ID to add the document to. If not provided, a new resource ID will
185+ be generated. If provided, the document will be updated if it already exists.
186+
183187 title: Title of the document.
184188
185189 extra_headers: Send extra headers
@@ -197,6 +201,7 @@ def add(
197201 "text" : text ,
198202 "collection" : collection ,
199203 "date" : date ,
204+ "resource_id" : resource_id ,
200205 "title" : title ,
201206 },
202207 document_add_params .DocumentAddParams ,
@@ -493,6 +498,7 @@ async def add(
493498 text : str ,
494499 collection : Optional [str ] | NotGiven = NOT_GIVEN ,
495500 date : Union [str , datetime ] | NotGiven = NOT_GIVEN ,
501+ resource_id : str | NotGiven = NOT_GIVEN ,
496502 title : Optional [str ] | NotGiven = NOT_GIVEN ,
497503 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
498504 # The extra values given here take precedence over values defined on the client or passed to this method.
@@ -517,6 +523,9 @@ async def add(
517523 the date of the last message). This helps the ranking algorithm and allows you
518524 to filter by date range.
519525
526+ resource_id: The resource ID to add the document to. If not provided, a new resource ID will
527+ be generated. If provided, the document will be updated if it already exists.
528+
520529 title: Title of the document.
521530
522531 extra_headers: Send extra headers
@@ -534,6 +543,7 @@ async def add(
534543 "text" : text ,
535544 "collection" : collection ,
536545 "date" : date ,
546+ "resource_id" : resource_id ,
537547 "title" : title ,
538548 },
539549 document_add_params .DocumentAddParams ,
0 commit comments