Skip to content

Commit 2ac9408

Browse files
feat(boxsdkgen): Remove confidence_score and include_confidence_score from AI extract (box/box-openapi#567) (#1237)
1 parent 2513829 commit 2ac9408

File tree

9 files changed

+15
-21
lines changed

9 files changed

+15
-21
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "3d9d391", "specHash": "5183b65", "version": "4.1.0" }
1+
{ "engineHash": "3d9d391", "specHash": "31c41d5", "version": "4.1.0" }

box_sdk_gen/managers/ai.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@ def create_ai_extract_structured(
425425
*,
426426
metadata_template: Optional[CreateAiExtractStructuredMetadataTemplate] = None,
427427
fields: Optional[List[CreateAiExtractStructuredFields]] = None,
428-
include_confidence_score: Optional[bool] = None,
429428
ai_agent: Optional[AiExtractStructuredAgent] = None,
430429
extra_headers: Optional[Dict[str, Optional[str]]] = None
431430
) -> AiExtractStructuredResponse:
@@ -451,8 +450,6 @@ def create_ai_extract_structured(
451450
:param fields: The fields to be extracted from the provided items.
452451
For your request to work, you must provide either `metadata_template` or `fields`, but not both., defaults to None
453452
:type fields: Optional[List[CreateAiExtractStructuredFields]], optional
454-
:param include_confidence_score: A flag to indicate whether confidence scores for every extracted field should be returned., defaults to None
455-
:type include_confidence_score: Optional[bool], optional
456453
:param extra_headers: Extra headers that will be included in the HTTP request., defaults to None
457454
:type extra_headers: Optional[Dict[str, Optional[str]]], optional
458455
"""
@@ -462,7 +459,6 @@ def create_ai_extract_structured(
462459
'items': items,
463460
'metadata_template': metadata_template,
464461
'fields': fields,
465-
'include_confidence_score': include_confidence_score,
466462
'ai_agent': ai_agent,
467463
}
468464
headers_map: Dict[str, str] = prepare_params({**extra_headers})

box_sdk_gen/managers/transfer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def transfer_owned_folder(
7474
"""
7575
Move all of the items (files, folders and workflows) owned by a user into
7676
77-
another user's account
77+
another user's account.
7878
7979
8080
Only the root folder (`0`) can be transferred.

box_sdk_gen/managers/user_collaborations.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,11 @@ def update_collaboration_by_id(
244244
Only an owner or co-owners can invite collaborators with a `can_view_path` of
245245
`true`. Only an owner can update `can_view_path` on existing collaborations.
246246
247-
`can_view_path` can only be used for folder collaborations., defaults to None
247+
`can_view_path` can only be used for folder collaborations.
248+
249+
When you delete a folder with `can_view_path=true`, collaborators may still see the parent path.
250+
For instructions on how to remove this, see
251+
[Even though a folder invited via can_view_path is deleted, the path remains displayed](https://support.box.com/hc/en-us/articles/37472814319891-Even-though-a-folder-invited-via-can-view-path-is-deleted-the-path-remains-displayed)., defaults to None
248252
:type can_view_path: Optional[bool], optional
249253
:param extra_headers: Extra headers that will be included in the HTTP request., defaults to None
250254
:type extra_headers: Optional[Dict[str, Optional[str]]], optional
@@ -384,7 +388,11 @@ def create_collaboration(
384388
Only an owner or co-owners can invite collaborators with a `can_view_path` of
385389
`true`. Only an owner can update `can_view_path` on existing collaborations.
386390
387-
`can_view_path` can only be used for folder collaborations., defaults to None
391+
`can_view_path` can only be used for folder collaborations.
392+
393+
When you delete a folder with `can_view_path=true`, collaborators may still see the parent path.
394+
For instructions on how to remove this, see
395+
[Even though a folder invited via can_view_path is deleted, the path remains displayed](https://support.box.com/hc/en-us/articles/37472814319891-Even-though-a-folder-invited-via-can-view-path-is-deleted-the-path-remains-displayed)., defaults to None
388396
:type can_view_path: Optional[bool], optional
389397
:param expires_at: Set the expiration date for the collaboration. At this date, the
390398
collaboration will be automatically removed from the item.

box_sdk_gen/schemas/ai_extract_structured.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ def __init__(
114114
*,
115115
metadata_template: Optional[AiExtractStructuredMetadataTemplateField] = None,
116116
fields: Optional[List[AiExtractStructuredFieldsField]] = None,
117-
include_confidence_score: Optional[bool] = None,
118117
ai_agent: Optional[AiExtractStructuredAgent] = None,
119118
**kwargs
120119
):
@@ -127,12 +126,9 @@ def __init__(
127126
:param fields: The fields to be extracted from the provided items.
128127
For your request to work, you must provide either `metadata_template` or `fields`, but not both., defaults to None
129128
:type fields: Optional[List[AiExtractStructuredFieldsField]], optional
130-
:param include_confidence_score: A flag to indicate whether confidence scores for every extracted field should be returned., defaults to None
131-
:type include_confidence_score: Optional[bool], optional
132129
"""
133130
super().__init__(**kwargs)
134131
self.items = items
135132
self.metadata_template = metadata_template
136133
self.fields = fields
137-
self.include_confidence_score = include_confidence_score
138134
self.ai_agent = ai_agent

box_sdk_gen/schemas/ai_extract_structured_response.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ def __init__(
1818
created_at: DateTime,
1919
*,
2020
completion_reason: Optional[str] = None,
21-
confidence_score: Optional[Dict] = None,
2221
ai_agent_info: Optional[AiAgentInfo] = None,
2322
**kwargs
2423
):
@@ -27,12 +26,9 @@ def __init__(
2726
:type created_at: DateTime
2827
:param completion_reason: The reason the response finishes., defaults to None
2928
:type completion_reason: Optional[str], optional
30-
:param confidence_score: The confidence score numeric values for each extracted field as a JSON dictionary. This can be empty if no field could be extracted., defaults to None
31-
:type confidence_score: Optional[Dict], optional
3229
"""
3330
super().__init__(**kwargs)
3431
self.answer = answer
3532
self.created_at = created_at
3633
self.completion_reason = completion_reason
37-
self.confidence_score = confidence_score
3834
self.ai_agent_info = ai_agent_info

docs/box_sdk_gen/ai.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,6 @@ client.ai.create_ai_extract_structured([AiItemBase(id=file.id)], fields=[CreateA
178178
- The metadata template containing the fields to extract. For your request to work, you must provide either `metadata_template` or `fields`, but not both.
179179
- fields `Optional[List[CreateAiExtractStructuredFields]]`
180180
- The fields to be extracted from the provided items. For your request to work, you must provide either `metadata_template` or `fields`, but not both.
181-
- include_confidence_score `Optional[bool]`
182-
- A flag to indicate whether confidence scores for every extracted field should be returned.
183181
- ai_agent `Optional[AiExtractStructuredAgent]`
184182
- extra_headers `Optional[Dict[str, Optional[str]]]`
185183
- Extra headers that will be included in the HTTP request.

docs/box_sdk_gen/transfer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## Transfer owned folders
66

77
Move all of the items (files, folders and workflows) owned by a user into
8-
another user's account
8+
another user's account.
99

1010
Only the root folder (`0`) can be transferred.
1111

docs/box_sdk_gen/user_collaborations.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ client.user_collaborations.update_collaboration_by_id(collaboration_id, role=Upd
6363
- expires_at `Optional[DateTime]`
6464
- Update the expiration date for the collaboration. At this date, the collaboration will be automatically removed from the item. This feature will only work if the **Automatically remove invited collaborators: Allow folder owners to extend the expiry date** setting has been enabled in the **Enterprise Settings** of the **Admin Console**. When the setting is not enabled, collaborations can not have an expiry date and a value for this field will be result in an error. Additionally, a collaboration can only be given an expiration if it was created after the **Automatically remove invited collaborator** setting was enabled.
6565
- can_view_path `Optional[bool]`
66-
- Determines if the invited users can see the entire parent path to the associated folder. The user will not gain privileges in any parent folder and therefore can not see content the user is not collaborated on. Be aware that this meaningfully increases the time required to load the invitee's **All Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled to 1,000 per user. Only an owner or co-owners can invite collaborators with a `can_view_path` of `true`. Only an owner can update `can_view_path` on existing collaborations. `can_view_path` can only be used for folder collaborations.
66+
- Determines if the invited users can see the entire parent path to the associated folder. The user will not gain privileges in any parent folder and therefore can not see content the user is not collaborated on. Be aware that this meaningfully increases the time required to load the invitee's **All Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled to 1,000 per user. Only an owner or co-owners can invite collaborators with a `can_view_path` of `true`. Only an owner can update `can_view_path` on existing collaborations. `can_view_path` can only be used for folder collaborations. When you delete a folder with `can_view_path=true`, collaborators may still see the parent path. For instructions on how to remove this, see [Even though a folder invited via can_view_path is deleted, the path remains displayed](https://support.box.com/hc/en-us/articles/37472814319891-Even-though-a-folder-invited-via-can-view-path-is-deleted-the-path-remains-displayed).
6767
- extra_headers `Optional[Dict[str, Optional[str]]]`
6868
- Extra headers that will be included in the HTTP request.
6969

@@ -144,7 +144,7 @@ client.user_collaborations.create_collaboration(CreateCollaborationItem(type=Cre
144144
- is_access_only `Optional[bool]`
145145
- If set to `true`, collaborators have access to shared items, but such items won't be visible in the All Files list. Additionally, collaborators won't see the path to the root folder for the shared item.
146146
- can_view_path `Optional[bool]`
147-
- Determines if the invited users can see the entire parent path to the associated folder. The user will not gain privileges in any parent folder and therefore can not see content the user is not collaborated on. Be aware that this meaningfully increases the time required to load the invitee's **All Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled to 1,000 per user. Only an owner or co-owners can invite collaborators with a `can_view_path` of `true`. Only an owner can update `can_view_path` on existing collaborations. `can_view_path` can only be used for folder collaborations.
147+
- Determines if the invited users can see the entire parent path to the associated folder. The user will not gain privileges in any parent folder and therefore can not see content the user is not collaborated on. Be aware that this meaningfully increases the time required to load the invitee's **All Files** page. We recommend you limit the number of collaborations with `can_view_path` enabled to 1,000 per user. Only an owner or co-owners can invite collaborators with a `can_view_path` of `true`. Only an owner can update `can_view_path` on existing collaborations. `can_view_path` can only be used for folder collaborations. When you delete a folder with `can_view_path=true`, collaborators may still see the parent path. For instructions on how to remove this, see [Even though a folder invited via can_view_path is deleted, the path remains displayed](https://support.box.com/hc/en-us/articles/37472814319891-Even-though-a-folder-invited-via-can-view-path-is-deleted-the-path-remains-displayed).
148148
- expires_at `Optional[DateTime]`
149149
- Set the expiration date for the collaboration. At this date, the collaboration will be automatically removed from the item. This feature will only work if the **Automatically remove invited collaborators: Allow folder owners to extend the expiry date** setting has been enabled in the **Enterprise Settings** of the **Admin Console**. When the setting is not enabled, collaborations can not have an expiry date and a value for this field will be result in an error.
150150
- fields `Optional[List[str]]`

0 commit comments

Comments
 (0)