h2ogpte 1.6.55rc1__py3-none-any.whl → 1.7.0rc2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- h2ogpte/__init__.py +1 -1
- h2ogpte/h2ogpte.py +213 -20
- h2ogpte/h2ogpte_async.py +213 -20
- h2ogpte/rest_async/__init__.py +3 -2
- h2ogpte/rest_async/api/agents_api.py +25 -25
- h2ogpte/rest_async/api/chat_api.py +1077 -21
- h2ogpte/rest_async/api/collections_api.py +281 -0
- h2ogpte/rest_async/api/models_api.py +35 -67
- h2ogpte/rest_async/api_client.py +1 -1
- h2ogpte/rest_async/configuration.py +1 -1
- h2ogpte/rest_async/models/__init__.py +2 -1
- h2ogpte/rest_async/models/chat_completion_request.py +6 -2
- h2ogpte/rest_async/models/chat_settings.py +6 -2
- h2ogpte/rest_async/models/chat_settings_tags.py +140 -0
- h2ogpte/rest_async/models/extractor.py +26 -2
- h2ogpte/rest_async/models/extractor_create_request.py +29 -5
- h2ogpte/rest_async/models/ingest_from_confluence_body.py +4 -2
- h2ogpte/rest_async/models/{create_topic_model_job_request.py → tag_filter.py} +11 -9
- h2ogpte/rest_sync/__init__.py +3 -2
- h2ogpte/rest_sync/api/agents_api.py +25 -25
- h2ogpte/rest_sync/api/chat_api.py +1077 -21
- h2ogpte/rest_sync/api/collections_api.py +281 -0
- h2ogpte/rest_sync/api/models_api.py +35 -67
- h2ogpte/rest_sync/api_client.py +1 -1
- h2ogpte/rest_sync/configuration.py +1 -1
- h2ogpte/rest_sync/models/__init__.py +2 -1
- h2ogpte/rest_sync/models/chat_completion_request.py +6 -2
- h2ogpte/rest_sync/models/chat_settings.py +6 -2
- h2ogpte/rest_sync/models/chat_settings_tags.py +140 -0
- h2ogpte/rest_sync/models/extractor.py +26 -2
- h2ogpte/rest_sync/models/extractor_create_request.py +29 -5
- h2ogpte/rest_sync/models/ingest_from_confluence_body.py +4 -2
- h2ogpte/rest_sync/models/{create_topic_model_job_request.py → tag_filter.py} +11 -9
- h2ogpte/session.py +10 -5
- h2ogpte/session_async.py +10 -2
- h2ogpte/types.py +28 -1
- {h2ogpte-1.6.55rc1.dist-info → h2ogpte-1.7.0rc2.dist-info}/METADATA +1 -1
- {h2ogpte-1.6.55rc1.dist-info → h2ogpte-1.7.0rc2.dist-info}/RECORD +41 -39
- {h2ogpte-1.6.55rc1.dist-info → h2ogpte-1.7.0rc2.dist-info}/WHEEL +0 -0
- {h2ogpte-1.6.55rc1.dist-info → h2ogpte-1.7.0rc2.dist-info}/entry_points.txt +0 -0
- {h2ogpte-1.6.55rc1.dist-info → h2ogpte-1.7.0rc2.dist-info}/top_level.txt +0 -0
|
@@ -1448,6 +1448,7 @@ class CollectionsApi:
|
|
|
1448
1448
|
collection_id: Annotated[StrictStr, Field(description="Id of the destination collection.")],
|
|
1449
1449
|
create_import_collection_to_collection_job_request: CreateImportCollectionToCollectionJobRequest,
|
|
1450
1450
|
copy_document: Annotated[Optional[StrictBool], Field(description="Whether to save a new copy of the document")] = None,
|
|
1451
|
+
preserve_document_status: Annotated[Optional[StrictBool], Field(description="Whether to preserve each document's original ingest mode (agent_only vs standard) when importing. When true, documents with agent_only status remain agent_only in the target collection. When false (default), all documents use the ingest_mode parameter uniformly.")] = None,
|
|
1451
1452
|
gen_doc_summaries: Annotated[Optional[StrictBool], Field(description="Whether to auto-generate document summaries (uses LLM).")] = None,
|
|
1452
1453
|
gen_doc_questions: Annotated[Optional[StrictBool], Field(description="Whether to auto-generate sample questions for each document (uses LLM).")] = None,
|
|
1453
1454
|
ocr_model: Annotated[Optional[StrictStr], Field(description="Which method to use to extract text from images using AI-enabled optical character recognition (OCR) models. docTR is best for Latin text, PaddleOCR is best for certain non-Latin languages, Tesseract covers a wide range of languages. Mississippi works well on handwriting. - `auto` - Automatic will auto-select the best OCR model for every page. - `off` - Disable OCR for speed, but all images will then be skipped (also no image captions will be made).")] = None,
|
|
@@ -1480,6 +1481,8 @@ class CollectionsApi:
|
|
|
1480
1481
|
:type create_import_collection_to_collection_job_request: CreateImportCollectionToCollectionJobRequest
|
|
1481
1482
|
:param copy_document: Whether to save a new copy of the document
|
|
1482
1483
|
:type copy_document: bool
|
|
1484
|
+
:param preserve_document_status: Whether to preserve each document's original ingest mode (agent_only vs standard) when importing. When true, documents with agent_only status remain agent_only in the target collection. When false (default), all documents use the ingest_mode parameter uniformly.
|
|
1485
|
+
:type preserve_document_status: bool
|
|
1483
1486
|
:param gen_doc_summaries: Whether to auto-generate document summaries (uses LLM).
|
|
1484
1487
|
:type gen_doc_summaries: bool
|
|
1485
1488
|
:param gen_doc_questions: Whether to auto-generate sample questions for each document (uses LLM).
|
|
@@ -1524,6 +1527,7 @@ class CollectionsApi:
|
|
|
1524
1527
|
collection_id=collection_id,
|
|
1525
1528
|
create_import_collection_to_collection_job_request=create_import_collection_to_collection_job_request,
|
|
1526
1529
|
copy_document=copy_document,
|
|
1530
|
+
preserve_document_status=preserve_document_status,
|
|
1527
1531
|
gen_doc_summaries=gen_doc_summaries,
|
|
1528
1532
|
gen_doc_questions=gen_doc_questions,
|
|
1529
1533
|
ocr_model=ocr_model,
|
|
@@ -1560,6 +1564,7 @@ class CollectionsApi:
|
|
|
1560
1564
|
collection_id: Annotated[StrictStr, Field(description="Id of the destination collection.")],
|
|
1561
1565
|
create_import_collection_to_collection_job_request: CreateImportCollectionToCollectionJobRequest,
|
|
1562
1566
|
copy_document: Annotated[Optional[StrictBool], Field(description="Whether to save a new copy of the document")] = None,
|
|
1567
|
+
preserve_document_status: Annotated[Optional[StrictBool], Field(description="Whether to preserve each document's original ingest mode (agent_only vs standard) when importing. When true, documents with agent_only status remain agent_only in the target collection. When false (default), all documents use the ingest_mode parameter uniformly.")] = None,
|
|
1563
1568
|
gen_doc_summaries: Annotated[Optional[StrictBool], Field(description="Whether to auto-generate document summaries (uses LLM).")] = None,
|
|
1564
1569
|
gen_doc_questions: Annotated[Optional[StrictBool], Field(description="Whether to auto-generate sample questions for each document (uses LLM).")] = None,
|
|
1565
1570
|
ocr_model: Annotated[Optional[StrictStr], Field(description="Which method to use to extract text from images using AI-enabled optical character recognition (OCR) models. docTR is best for Latin text, PaddleOCR is best for certain non-Latin languages, Tesseract covers a wide range of languages. Mississippi works well on handwriting. - `auto` - Automatic will auto-select the best OCR model for every page. - `off` - Disable OCR for speed, but all images will then be skipped (also no image captions will be made).")] = None,
|
|
@@ -1592,6 +1597,8 @@ class CollectionsApi:
|
|
|
1592
1597
|
:type create_import_collection_to_collection_job_request: CreateImportCollectionToCollectionJobRequest
|
|
1593
1598
|
:param copy_document: Whether to save a new copy of the document
|
|
1594
1599
|
:type copy_document: bool
|
|
1600
|
+
:param preserve_document_status: Whether to preserve each document's original ingest mode (agent_only vs standard) when importing. When true, documents with agent_only status remain agent_only in the target collection. When false (default), all documents use the ingest_mode parameter uniformly.
|
|
1601
|
+
:type preserve_document_status: bool
|
|
1595
1602
|
:param gen_doc_summaries: Whether to auto-generate document summaries (uses LLM).
|
|
1596
1603
|
:type gen_doc_summaries: bool
|
|
1597
1604
|
:param gen_doc_questions: Whether to auto-generate sample questions for each document (uses LLM).
|
|
@@ -1636,6 +1643,7 @@ class CollectionsApi:
|
|
|
1636
1643
|
collection_id=collection_id,
|
|
1637
1644
|
create_import_collection_to_collection_job_request=create_import_collection_to_collection_job_request,
|
|
1638
1645
|
copy_document=copy_document,
|
|
1646
|
+
preserve_document_status=preserve_document_status,
|
|
1639
1647
|
gen_doc_summaries=gen_doc_summaries,
|
|
1640
1648
|
gen_doc_questions=gen_doc_questions,
|
|
1641
1649
|
ocr_model=ocr_model,
|
|
@@ -1672,6 +1680,7 @@ class CollectionsApi:
|
|
|
1672
1680
|
collection_id: Annotated[StrictStr, Field(description="Id of the destination collection.")],
|
|
1673
1681
|
create_import_collection_to_collection_job_request: CreateImportCollectionToCollectionJobRequest,
|
|
1674
1682
|
copy_document: Annotated[Optional[StrictBool], Field(description="Whether to save a new copy of the document")] = None,
|
|
1683
|
+
preserve_document_status: Annotated[Optional[StrictBool], Field(description="Whether to preserve each document's original ingest mode (agent_only vs standard) when importing. When true, documents with agent_only status remain agent_only in the target collection. When false (default), all documents use the ingest_mode parameter uniformly.")] = None,
|
|
1675
1684
|
gen_doc_summaries: Annotated[Optional[StrictBool], Field(description="Whether to auto-generate document summaries (uses LLM).")] = None,
|
|
1676
1685
|
gen_doc_questions: Annotated[Optional[StrictBool], Field(description="Whether to auto-generate sample questions for each document (uses LLM).")] = None,
|
|
1677
1686
|
ocr_model: Annotated[Optional[StrictStr], Field(description="Which method to use to extract text from images using AI-enabled optical character recognition (OCR) models. docTR is best for Latin text, PaddleOCR is best for certain non-Latin languages, Tesseract covers a wide range of languages. Mississippi works well on handwriting. - `auto` - Automatic will auto-select the best OCR model for every page. - `off` - Disable OCR for speed, but all images will then be skipped (also no image captions will be made).")] = None,
|
|
@@ -1704,6 +1713,8 @@ class CollectionsApi:
|
|
|
1704
1713
|
:type create_import_collection_to_collection_job_request: CreateImportCollectionToCollectionJobRequest
|
|
1705
1714
|
:param copy_document: Whether to save a new copy of the document
|
|
1706
1715
|
:type copy_document: bool
|
|
1716
|
+
:param preserve_document_status: Whether to preserve each document's original ingest mode (agent_only vs standard) when importing. When true, documents with agent_only status remain agent_only in the target collection. When false (default), all documents use the ingest_mode parameter uniformly.
|
|
1717
|
+
:type preserve_document_status: bool
|
|
1707
1718
|
:param gen_doc_summaries: Whether to auto-generate document summaries (uses LLM).
|
|
1708
1719
|
:type gen_doc_summaries: bool
|
|
1709
1720
|
:param gen_doc_questions: Whether to auto-generate sample questions for each document (uses LLM).
|
|
@@ -1748,6 +1759,7 @@ class CollectionsApi:
|
|
|
1748
1759
|
collection_id=collection_id,
|
|
1749
1760
|
create_import_collection_to_collection_job_request=create_import_collection_to_collection_job_request,
|
|
1750
1761
|
copy_document=copy_document,
|
|
1762
|
+
preserve_document_status=preserve_document_status,
|
|
1751
1763
|
gen_doc_summaries=gen_doc_summaries,
|
|
1752
1764
|
gen_doc_questions=gen_doc_questions,
|
|
1753
1765
|
ocr_model=ocr_model,
|
|
@@ -1779,6 +1791,7 @@ class CollectionsApi:
|
|
|
1779
1791
|
collection_id,
|
|
1780
1792
|
create_import_collection_to_collection_job_request,
|
|
1781
1793
|
copy_document,
|
|
1794
|
+
preserve_document_status,
|
|
1782
1795
|
gen_doc_summaries,
|
|
1783
1796
|
gen_doc_questions,
|
|
1784
1797
|
ocr_model,
|
|
@@ -1816,6 +1829,10 @@ class CollectionsApi:
|
|
|
1816
1829
|
|
|
1817
1830
|
_query_params.append(('copy_document', copy_document))
|
|
1818
1831
|
|
|
1832
|
+
if preserve_document_status is not None:
|
|
1833
|
+
|
|
1834
|
+
_query_params.append(('preserve_document_status', preserve_document_status))
|
|
1835
|
+
|
|
1819
1836
|
if gen_doc_summaries is not None:
|
|
1820
1837
|
|
|
1821
1838
|
_query_params.append(('gen_doc_summaries', gen_doc_summaries))
|
|
@@ -8039,6 +8056,270 @@ class CollectionsApi:
|
|
|
8039
8056
|
|
|
8040
8057
|
|
|
8041
8058
|
|
|
8059
|
+
@validate_call
|
|
8060
|
+
async def list_collection_public_permissions(
|
|
8061
|
+
self,
|
|
8062
|
+
collection_id: Annotated[StrictStr, Field(description="Id of the collection.")],
|
|
8063
|
+
_request_timeout: Union[
|
|
8064
|
+
None,
|
|
8065
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
8066
|
+
Tuple[
|
|
8067
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
8068
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
8069
|
+
]
|
|
8070
|
+
] = None,
|
|
8071
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
8072
|
+
_content_type: Optional[StrictStr] = None,
|
|
8073
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
8074
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
8075
|
+
) -> List[str]:
|
|
8076
|
+
"""Returns the public permissions for a given collection.
|
|
8077
|
+
|
|
8078
|
+
Returns the list of public permissions for a collection. Returns an empty array if the collection is not public or has no permissions.
|
|
8079
|
+
|
|
8080
|
+
:param collection_id: Id of the collection. (required)
|
|
8081
|
+
:type collection_id: str
|
|
8082
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
8083
|
+
number provided, it will be total request
|
|
8084
|
+
timeout. It can also be a pair (tuple) of
|
|
8085
|
+
(connection, read) timeouts.
|
|
8086
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
8087
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
8088
|
+
request; this effectively ignores the
|
|
8089
|
+
authentication in the spec for a single request.
|
|
8090
|
+
:type _request_auth: dict, optional
|
|
8091
|
+
:param _content_type: force content-type for the request.
|
|
8092
|
+
:type _content_type: str, Optional
|
|
8093
|
+
:param _headers: set to override the headers for a single
|
|
8094
|
+
request; this effectively ignores the headers
|
|
8095
|
+
in the spec for a single request.
|
|
8096
|
+
:type _headers: dict, optional
|
|
8097
|
+
:param _host_index: set to override the host_index for a single
|
|
8098
|
+
request; this effectively ignores the host_index
|
|
8099
|
+
in the spec for a single request.
|
|
8100
|
+
:type _host_index: int, optional
|
|
8101
|
+
:return: Returns the result object.
|
|
8102
|
+
""" # noqa: E501
|
|
8103
|
+
|
|
8104
|
+
_param = self._list_collection_public_permissions_serialize(
|
|
8105
|
+
collection_id=collection_id,
|
|
8106
|
+
_request_auth=_request_auth,
|
|
8107
|
+
_content_type=_content_type,
|
|
8108
|
+
_headers=_headers,
|
|
8109
|
+
_host_index=_host_index
|
|
8110
|
+
)
|
|
8111
|
+
|
|
8112
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
8113
|
+
'200': "List[str]",
|
|
8114
|
+
'401': "EndpointError",
|
|
8115
|
+
}
|
|
8116
|
+
response_data = await self.api_client.call_api(
|
|
8117
|
+
*_param,
|
|
8118
|
+
_request_timeout=_request_timeout
|
|
8119
|
+
)
|
|
8120
|
+
await response_data.read()
|
|
8121
|
+
return self.api_client.response_deserialize(
|
|
8122
|
+
response_data=response_data,
|
|
8123
|
+
response_types_map=_response_types_map,
|
|
8124
|
+
).data
|
|
8125
|
+
|
|
8126
|
+
|
|
8127
|
+
@validate_call
|
|
8128
|
+
async def list_collection_public_permissions_with_http_info(
|
|
8129
|
+
self,
|
|
8130
|
+
collection_id: Annotated[StrictStr, Field(description="Id of the collection.")],
|
|
8131
|
+
_request_timeout: Union[
|
|
8132
|
+
None,
|
|
8133
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
8134
|
+
Tuple[
|
|
8135
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
8136
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
8137
|
+
]
|
|
8138
|
+
] = None,
|
|
8139
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
8140
|
+
_content_type: Optional[StrictStr] = None,
|
|
8141
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
8142
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
8143
|
+
) -> ApiResponse[List[str]]:
|
|
8144
|
+
"""Returns the public permissions for a given collection.
|
|
8145
|
+
|
|
8146
|
+
Returns the list of public permissions for a collection. Returns an empty array if the collection is not public or has no permissions.
|
|
8147
|
+
|
|
8148
|
+
:param collection_id: Id of the collection. (required)
|
|
8149
|
+
:type collection_id: str
|
|
8150
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
8151
|
+
number provided, it will be total request
|
|
8152
|
+
timeout. It can also be a pair (tuple) of
|
|
8153
|
+
(connection, read) timeouts.
|
|
8154
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
8155
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
8156
|
+
request; this effectively ignores the
|
|
8157
|
+
authentication in the spec for a single request.
|
|
8158
|
+
:type _request_auth: dict, optional
|
|
8159
|
+
:param _content_type: force content-type for the request.
|
|
8160
|
+
:type _content_type: str, Optional
|
|
8161
|
+
:param _headers: set to override the headers for a single
|
|
8162
|
+
request; this effectively ignores the headers
|
|
8163
|
+
in the spec for a single request.
|
|
8164
|
+
:type _headers: dict, optional
|
|
8165
|
+
:param _host_index: set to override the host_index for a single
|
|
8166
|
+
request; this effectively ignores the host_index
|
|
8167
|
+
in the spec for a single request.
|
|
8168
|
+
:type _host_index: int, optional
|
|
8169
|
+
:return: Returns the result object.
|
|
8170
|
+
""" # noqa: E501
|
|
8171
|
+
|
|
8172
|
+
_param = self._list_collection_public_permissions_serialize(
|
|
8173
|
+
collection_id=collection_id,
|
|
8174
|
+
_request_auth=_request_auth,
|
|
8175
|
+
_content_type=_content_type,
|
|
8176
|
+
_headers=_headers,
|
|
8177
|
+
_host_index=_host_index
|
|
8178
|
+
)
|
|
8179
|
+
|
|
8180
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
8181
|
+
'200': "List[str]",
|
|
8182
|
+
'401': "EndpointError",
|
|
8183
|
+
}
|
|
8184
|
+
response_data = await self.api_client.call_api(
|
|
8185
|
+
*_param,
|
|
8186
|
+
_request_timeout=_request_timeout
|
|
8187
|
+
)
|
|
8188
|
+
await response_data.read()
|
|
8189
|
+
return self.api_client.response_deserialize(
|
|
8190
|
+
response_data=response_data,
|
|
8191
|
+
response_types_map=_response_types_map,
|
|
8192
|
+
)
|
|
8193
|
+
|
|
8194
|
+
|
|
8195
|
+
@validate_call
|
|
8196
|
+
async def list_collection_public_permissions_without_preload_content(
|
|
8197
|
+
self,
|
|
8198
|
+
collection_id: Annotated[StrictStr, Field(description="Id of the collection.")],
|
|
8199
|
+
_request_timeout: Union[
|
|
8200
|
+
None,
|
|
8201
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
8202
|
+
Tuple[
|
|
8203
|
+
Annotated[StrictFloat, Field(gt=0)],
|
|
8204
|
+
Annotated[StrictFloat, Field(gt=0)]
|
|
8205
|
+
]
|
|
8206
|
+
] = None,
|
|
8207
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
8208
|
+
_content_type: Optional[StrictStr] = None,
|
|
8209
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
8210
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
8211
|
+
) -> RESTResponseType:
|
|
8212
|
+
"""Returns the public permissions for a given collection.
|
|
8213
|
+
|
|
8214
|
+
Returns the list of public permissions for a collection. Returns an empty array if the collection is not public or has no permissions.
|
|
8215
|
+
|
|
8216
|
+
:param collection_id: Id of the collection. (required)
|
|
8217
|
+
:type collection_id: str
|
|
8218
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
8219
|
+
number provided, it will be total request
|
|
8220
|
+
timeout. It can also be a pair (tuple) of
|
|
8221
|
+
(connection, read) timeouts.
|
|
8222
|
+
:type _request_timeout: int, tuple(int, int), optional
|
|
8223
|
+
:param _request_auth: set to override the auth_settings for an a single
|
|
8224
|
+
request; this effectively ignores the
|
|
8225
|
+
authentication in the spec for a single request.
|
|
8226
|
+
:type _request_auth: dict, optional
|
|
8227
|
+
:param _content_type: force content-type for the request.
|
|
8228
|
+
:type _content_type: str, Optional
|
|
8229
|
+
:param _headers: set to override the headers for a single
|
|
8230
|
+
request; this effectively ignores the headers
|
|
8231
|
+
in the spec for a single request.
|
|
8232
|
+
:type _headers: dict, optional
|
|
8233
|
+
:param _host_index: set to override the host_index for a single
|
|
8234
|
+
request; this effectively ignores the host_index
|
|
8235
|
+
in the spec for a single request.
|
|
8236
|
+
:type _host_index: int, optional
|
|
8237
|
+
:return: Returns the result object.
|
|
8238
|
+
""" # noqa: E501
|
|
8239
|
+
|
|
8240
|
+
_param = self._list_collection_public_permissions_serialize(
|
|
8241
|
+
collection_id=collection_id,
|
|
8242
|
+
_request_auth=_request_auth,
|
|
8243
|
+
_content_type=_content_type,
|
|
8244
|
+
_headers=_headers,
|
|
8245
|
+
_host_index=_host_index
|
|
8246
|
+
)
|
|
8247
|
+
|
|
8248
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
|
8249
|
+
'200': "List[str]",
|
|
8250
|
+
'401': "EndpointError",
|
|
8251
|
+
}
|
|
8252
|
+
response_data = await self.api_client.call_api(
|
|
8253
|
+
*_param,
|
|
8254
|
+
_request_timeout=_request_timeout
|
|
8255
|
+
)
|
|
8256
|
+
return response_data.response
|
|
8257
|
+
|
|
8258
|
+
|
|
8259
|
+
def _list_collection_public_permissions_serialize(
|
|
8260
|
+
self,
|
|
8261
|
+
collection_id,
|
|
8262
|
+
_request_auth,
|
|
8263
|
+
_content_type,
|
|
8264
|
+
_headers,
|
|
8265
|
+
_host_index,
|
|
8266
|
+
) -> RequestSerialized:
|
|
8267
|
+
|
|
8268
|
+
_host = None
|
|
8269
|
+
|
|
8270
|
+
_collection_formats: Dict[str, str] = {
|
|
8271
|
+
}
|
|
8272
|
+
|
|
8273
|
+
_path_params: Dict[str, str] = {}
|
|
8274
|
+
_query_params: List[Tuple[str, str]] = []
|
|
8275
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
8276
|
+
_form_params: List[Tuple[str, str]] = []
|
|
8277
|
+
_files: Dict[
|
|
8278
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
8279
|
+
] = {}
|
|
8280
|
+
_body_params: Optional[bytes] = None
|
|
8281
|
+
|
|
8282
|
+
# process the path parameters
|
|
8283
|
+
if collection_id is not None:
|
|
8284
|
+
_path_params['collection_id'] = collection_id
|
|
8285
|
+
# process the query parameters
|
|
8286
|
+
# process the header parameters
|
|
8287
|
+
# process the form parameters
|
|
8288
|
+
# process the body parameter
|
|
8289
|
+
|
|
8290
|
+
|
|
8291
|
+
# set the HTTP header `Accept`
|
|
8292
|
+
if 'Accept' not in _header_params:
|
|
8293
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
8294
|
+
[
|
|
8295
|
+
'application/json'
|
|
8296
|
+
]
|
|
8297
|
+
)
|
|
8298
|
+
|
|
8299
|
+
|
|
8300
|
+
# authentication setting
|
|
8301
|
+
_auth_settings: List[str] = [
|
|
8302
|
+
'bearerAuth'
|
|
8303
|
+
]
|
|
8304
|
+
|
|
8305
|
+
return self.api_client.param_serialize(
|
|
8306
|
+
method='GET',
|
|
8307
|
+
resource_path='/collections/{collection_id}/public_permissions',
|
|
8308
|
+
path_params=_path_params,
|
|
8309
|
+
query_params=_query_params,
|
|
8310
|
+
header_params=_header_params,
|
|
8311
|
+
body=_body_params,
|
|
8312
|
+
post_params=_form_params,
|
|
8313
|
+
files=_files,
|
|
8314
|
+
auth_settings=_auth_settings,
|
|
8315
|
+
collection_formats=_collection_formats,
|
|
8316
|
+
_host=_host,
|
|
8317
|
+
_request_auth=_request_auth
|
|
8318
|
+
)
|
|
8319
|
+
|
|
8320
|
+
|
|
8321
|
+
|
|
8322
|
+
|
|
8042
8323
|
@validate_call
|
|
8043
8324
|
async def list_collections(
|
|
8044
8325
|
self,
|
|
@@ -19,13 +19,11 @@ from typing_extensions import Annotated
|
|
|
19
19
|
from pydantic import Field, StrictFloat, StrictInt, StrictStr, field_validator
|
|
20
20
|
from typing import Dict, List, Optional, Union
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
|
-
from h2ogpte.rest_async.models.create_topic_model_job_request import CreateTopicModelJobRequest
|
|
23
22
|
from h2ogpte.rest_async.models.embedding_model import EmbeddingModel
|
|
24
23
|
from h2ogpte.rest_async.models.encode_chunks_for_retrieval_request import EncodeChunksForRetrievalRequest
|
|
25
24
|
from h2ogpte.rest_async.models.extraction_request import ExtractionRequest
|
|
26
25
|
from h2ogpte.rest_async.models.guardrails_settings import GuardrailsSettings
|
|
27
26
|
from h2ogpte.rest_async.models.guardrails_settings_create_request import GuardrailsSettingsCreateRequest
|
|
28
|
-
from h2ogpte.rest_async.models.job_details import JobDetails
|
|
29
27
|
from h2ogpte.rest_async.models.model import Model
|
|
30
28
|
from h2ogpte.rest_async.models.model_answer import ModelAnswer
|
|
31
29
|
from h2ogpte.rest_async.models.model_extraction_answer import ModelExtractionAnswer
|
|
@@ -907,10 +905,9 @@ class ModelsApi:
|
|
|
907
905
|
|
|
908
906
|
|
|
909
907
|
@validate_call
|
|
910
|
-
async def
|
|
908
|
+
async def delete_topic_model(
|
|
911
909
|
self,
|
|
912
|
-
|
|
913
|
-
timeout: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Timeout in seconds")] = None,
|
|
910
|
+
collection_id: Annotated[StrictStr, Field(description="Id of the collection")],
|
|
914
911
|
_request_timeout: Union[
|
|
915
912
|
None,
|
|
916
913
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -923,15 +920,13 @@ class ModelsApi:
|
|
|
923
920
|
_content_type: Optional[StrictStr] = None,
|
|
924
921
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
925
922
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
926
|
-
) ->
|
|
927
|
-
"""
|
|
923
|
+
) -> None:
|
|
924
|
+
"""Deletes the topic model from the collection.
|
|
928
925
|
|
|
929
|
-
|
|
926
|
+
Deletes the topic model from the collection.
|
|
930
927
|
|
|
931
|
-
:param
|
|
932
|
-
:type
|
|
933
|
-
:param timeout: Timeout in seconds
|
|
934
|
-
:type timeout: float
|
|
928
|
+
:param collection_id: Id of the collection (required)
|
|
929
|
+
:type collection_id: str
|
|
935
930
|
:param _request_timeout: timeout setting for this request. If one
|
|
936
931
|
number provided, it will be total request
|
|
937
932
|
timeout. It can also be a pair (tuple) of
|
|
@@ -954,9 +949,8 @@ class ModelsApi:
|
|
|
954
949
|
:return: Returns the result object.
|
|
955
950
|
""" # noqa: E501
|
|
956
951
|
|
|
957
|
-
_param = self.
|
|
958
|
-
|
|
959
|
-
timeout=timeout,
|
|
952
|
+
_param = self._delete_topic_model_serialize(
|
|
953
|
+
collection_id=collection_id,
|
|
960
954
|
_request_auth=_request_auth,
|
|
961
955
|
_content_type=_content_type,
|
|
962
956
|
_headers=_headers,
|
|
@@ -964,7 +958,7 @@ class ModelsApi:
|
|
|
964
958
|
)
|
|
965
959
|
|
|
966
960
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
967
|
-
'
|
|
961
|
+
'204': None,
|
|
968
962
|
'401': "EndpointError",
|
|
969
963
|
}
|
|
970
964
|
response_data = await self.api_client.call_api(
|
|
@@ -979,10 +973,9 @@ class ModelsApi:
|
|
|
979
973
|
|
|
980
974
|
|
|
981
975
|
@validate_call
|
|
982
|
-
async def
|
|
976
|
+
async def delete_topic_model_with_http_info(
|
|
983
977
|
self,
|
|
984
|
-
|
|
985
|
-
timeout: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Timeout in seconds")] = None,
|
|
978
|
+
collection_id: Annotated[StrictStr, Field(description="Id of the collection")],
|
|
986
979
|
_request_timeout: Union[
|
|
987
980
|
None,
|
|
988
981
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -995,15 +988,13 @@ class ModelsApi:
|
|
|
995
988
|
_content_type: Optional[StrictStr] = None,
|
|
996
989
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
997
990
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
998
|
-
) -> ApiResponse[
|
|
999
|
-
"""
|
|
991
|
+
) -> ApiResponse[None]:
|
|
992
|
+
"""Deletes the topic model from the collection.
|
|
1000
993
|
|
|
1001
|
-
|
|
994
|
+
Deletes the topic model from the collection.
|
|
1002
995
|
|
|
1003
|
-
:param
|
|
1004
|
-
:type
|
|
1005
|
-
:param timeout: Timeout in seconds
|
|
1006
|
-
:type timeout: float
|
|
996
|
+
:param collection_id: Id of the collection (required)
|
|
997
|
+
:type collection_id: str
|
|
1007
998
|
:param _request_timeout: timeout setting for this request. If one
|
|
1008
999
|
number provided, it will be total request
|
|
1009
1000
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1026,9 +1017,8 @@ class ModelsApi:
|
|
|
1026
1017
|
:return: Returns the result object.
|
|
1027
1018
|
""" # noqa: E501
|
|
1028
1019
|
|
|
1029
|
-
_param = self.
|
|
1030
|
-
|
|
1031
|
-
timeout=timeout,
|
|
1020
|
+
_param = self._delete_topic_model_serialize(
|
|
1021
|
+
collection_id=collection_id,
|
|
1032
1022
|
_request_auth=_request_auth,
|
|
1033
1023
|
_content_type=_content_type,
|
|
1034
1024
|
_headers=_headers,
|
|
@@ -1036,7 +1026,7 @@ class ModelsApi:
|
|
|
1036
1026
|
)
|
|
1037
1027
|
|
|
1038
1028
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1039
|
-
'
|
|
1029
|
+
'204': None,
|
|
1040
1030
|
'401': "EndpointError",
|
|
1041
1031
|
}
|
|
1042
1032
|
response_data = await self.api_client.call_api(
|
|
@@ -1051,10 +1041,9 @@ class ModelsApi:
|
|
|
1051
1041
|
|
|
1052
1042
|
|
|
1053
1043
|
@validate_call
|
|
1054
|
-
async def
|
|
1044
|
+
async def delete_topic_model_without_preload_content(
|
|
1055
1045
|
self,
|
|
1056
|
-
|
|
1057
|
-
timeout: Annotated[Optional[Union[StrictFloat, StrictInt]], Field(description="Timeout in seconds")] = None,
|
|
1046
|
+
collection_id: Annotated[StrictStr, Field(description="Id of the collection")],
|
|
1058
1047
|
_request_timeout: Union[
|
|
1059
1048
|
None,
|
|
1060
1049
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1068,14 +1057,12 @@ class ModelsApi:
|
|
|
1068
1057
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
1069
1058
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
1070
1059
|
) -> RESTResponseType:
|
|
1071
|
-
"""
|
|
1060
|
+
"""Deletes the topic model from the collection.
|
|
1072
1061
|
|
|
1073
|
-
|
|
1062
|
+
Deletes the topic model from the collection.
|
|
1074
1063
|
|
|
1075
|
-
:param
|
|
1076
|
-
:type
|
|
1077
|
-
:param timeout: Timeout in seconds
|
|
1078
|
-
:type timeout: float
|
|
1064
|
+
:param collection_id: Id of the collection (required)
|
|
1065
|
+
:type collection_id: str
|
|
1079
1066
|
:param _request_timeout: timeout setting for this request. If one
|
|
1080
1067
|
number provided, it will be total request
|
|
1081
1068
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1098,9 +1085,8 @@ class ModelsApi:
|
|
|
1098
1085
|
:return: Returns the result object.
|
|
1099
1086
|
""" # noqa: E501
|
|
1100
1087
|
|
|
1101
|
-
_param = self.
|
|
1102
|
-
|
|
1103
|
-
timeout=timeout,
|
|
1088
|
+
_param = self._delete_topic_model_serialize(
|
|
1089
|
+
collection_id=collection_id,
|
|
1104
1090
|
_request_auth=_request_auth,
|
|
1105
1091
|
_content_type=_content_type,
|
|
1106
1092
|
_headers=_headers,
|
|
@@ -1108,7 +1094,7 @@ class ModelsApi:
|
|
|
1108
1094
|
)
|
|
1109
1095
|
|
|
1110
1096
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
1111
|
-
'
|
|
1097
|
+
'204': None,
|
|
1112
1098
|
'401': "EndpointError",
|
|
1113
1099
|
}
|
|
1114
1100
|
response_data = await self.api_client.call_api(
|
|
@@ -1118,10 +1104,9 @@ class ModelsApi:
|
|
|
1118
1104
|
return response_data.response
|
|
1119
1105
|
|
|
1120
1106
|
|
|
1121
|
-
def
|
|
1107
|
+
def _delete_topic_model_serialize(
|
|
1122
1108
|
self,
|
|
1123
|
-
|
|
1124
|
-
timeout,
|
|
1109
|
+
collection_id,
|
|
1125
1110
|
_request_auth,
|
|
1126
1111
|
_content_type,
|
|
1127
1112
|
_headers,
|
|
@@ -1143,16 +1128,12 @@ class ModelsApi:
|
|
|
1143
1128
|
_body_params: Optional[bytes] = None
|
|
1144
1129
|
|
|
1145
1130
|
# process the path parameters
|
|
1131
|
+
if collection_id is not None:
|
|
1132
|
+
_path_params['collection_id'] = collection_id
|
|
1146
1133
|
# process the query parameters
|
|
1147
|
-
if timeout is not None:
|
|
1148
|
-
|
|
1149
|
-
_query_params.append(('timeout', timeout))
|
|
1150
|
-
|
|
1151
1134
|
# process the header parameters
|
|
1152
1135
|
# process the form parameters
|
|
1153
1136
|
# process the body parameter
|
|
1154
|
-
if create_topic_model_job_request is not None:
|
|
1155
|
-
_body_params = create_topic_model_job_request
|
|
1156
1137
|
|
|
1157
1138
|
|
|
1158
1139
|
# set the HTTP header `Accept`
|
|
@@ -1163,19 +1144,6 @@ class ModelsApi:
|
|
|
1163
1144
|
]
|
|
1164
1145
|
)
|
|
1165
1146
|
|
|
1166
|
-
# set the HTTP header `Content-Type`
|
|
1167
|
-
if _content_type:
|
|
1168
|
-
_header_params['Content-Type'] = _content_type
|
|
1169
|
-
else:
|
|
1170
|
-
_default_content_type = (
|
|
1171
|
-
self.api_client.select_header_content_type(
|
|
1172
|
-
[
|
|
1173
|
-
'application/json'
|
|
1174
|
-
]
|
|
1175
|
-
)
|
|
1176
|
-
)
|
|
1177
|
-
if _default_content_type is not None:
|
|
1178
|
-
_header_params['Content-Type'] = _default_content_type
|
|
1179
1147
|
|
|
1180
1148
|
# authentication setting
|
|
1181
1149
|
_auth_settings: List[str] = [
|
|
@@ -1183,8 +1151,8 @@ class ModelsApi:
|
|
|
1183
1151
|
]
|
|
1184
1152
|
|
|
1185
1153
|
return self.api_client.param_serialize(
|
|
1186
|
-
method='
|
|
1187
|
-
resource_path='/
|
|
1154
|
+
method='DELETE',
|
|
1155
|
+
resource_path='/collections/{collection_id}/topic_model',
|
|
1188
1156
|
path_params=_path_params,
|
|
1189
1157
|
query_params=_query_params,
|
|
1190
1158
|
header_params=_header_params,
|
h2ogpte/rest_async/api_client.py
CHANGED
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'OpenAPI-Generator/1.
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/1.7.0-dev2/python'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
async def __aenter__(self):
|
|
@@ -499,7 +499,7 @@ class Configuration:
|
|
|
499
499
|
"OS: {env}\n"\
|
|
500
500
|
"Python Version: {pyversion}\n"\
|
|
501
501
|
"Version of the API: v1.0.0\n"\
|
|
502
|
-
"SDK Package Version: 1.
|
|
502
|
+
"SDK Package Version: 1.7.0-dev2".\
|
|
503
503
|
format(env=sys.platform, pyversion=sys.version)
|
|
504
504
|
|
|
505
505
|
def get_host_settings(self) -> List[HostSetting]:
|
|
@@ -38,6 +38,7 @@ from h2ogpte.rest_async.models.chat_message_reference import ChatMessageReferenc
|
|
|
38
38
|
from h2ogpte.rest_async.models.chat_session import ChatSession
|
|
39
39
|
from h2ogpte.rest_async.models.chat_session_update_request import ChatSessionUpdateRequest
|
|
40
40
|
from h2ogpte.rest_async.models.chat_settings import ChatSettings
|
|
41
|
+
from h2ogpte.rest_async.models.chat_settings_tags import ChatSettingsTags
|
|
41
42
|
from h2ogpte.rest_async.models.chunk import Chunk
|
|
42
43
|
from h2ogpte.rest_async.models.chunk_search_result import ChunkSearchResult
|
|
43
44
|
from h2ogpte.rest_async.models.collection import Collection
|
|
@@ -57,7 +58,6 @@ from h2ogpte.rest_async.models.create_import_collection_to_collection_job_reques
|
|
|
57
58
|
from h2ogpte.rest_async.models.create_insert_document_to_collection_job_request import CreateInsertDocumentToCollectionJobRequest
|
|
58
59
|
from h2ogpte.rest_async.models.create_secret201_response import CreateSecret201Response
|
|
59
60
|
from h2ogpte.rest_async.models.create_secret_request import CreateSecretRequest
|
|
60
|
-
from h2ogpte.rest_async.models.create_topic_model_job_request import CreateTopicModelJobRequest
|
|
61
61
|
from h2ogpte.rest_async.models.delete_chat_sessions_job_request import DeleteChatSessionsJobRequest
|
|
62
62
|
from h2ogpte.rest_async.models.delete_collections_job_request import DeleteCollectionsJobRequest
|
|
63
63
|
from h2ogpte.rest_async.models.delete_documents_job_request import DeleteDocumentsJobRequest
|
|
@@ -127,6 +127,7 @@ from h2ogpte.rest_async.models.suggested_question import SuggestedQuestion
|
|
|
127
127
|
from h2ogpte.rest_async.models.summarize_request import SummarizeRequest
|
|
128
128
|
from h2ogpte.rest_async.models.tag import Tag
|
|
129
129
|
from h2ogpte.rest_async.models.tag_create_request import TagCreateRequest
|
|
130
|
+
from h2ogpte.rest_async.models.tag_filter import TagFilter
|
|
130
131
|
from h2ogpte.rest_async.models.tag_update_request import TagUpdateRequest
|
|
131
132
|
from h2ogpte.rest_async.models.update_agent_key_request import UpdateAgentKeyRequest
|
|
132
133
|
from h2ogpte.rest_async.models.update_agent_tool_preference_request import UpdateAgentToolPreferenceRequest
|