Skip to content

Commit 4bd3c1e

Browse files
committed
Adds spp model apply command. Closes #6119
1 parent 46a9606 commit 4bd3c1e

File tree

5 files changed

+848
-0
lines changed

5 files changed

+848
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import Global from '/docs/cmd/_global.mdx';
2+
import Tabs from '@theme/Tabs';
3+
import TabItem from '@theme/TabItem';
4+
5+
# spp model apply
6+
7+
Applies (or syncs) a trained document understanding model to a document library
8+
9+
## Usage
10+
11+
```sh
12+
m365 spp model apply [options]
13+
```
14+
15+
## Options
16+
17+
```md definition-list
18+
`-u, --siteUrl <siteUrl>`
19+
: The URL of the site where the library is located.
20+
21+
`--contentCenterUrl <contentCenterUrl>`
22+
: The URL of the content center site where model is located.
23+
24+
`-i, --id [id]`
25+
: The unique ID of the model. Specify either `id` or `title` but not both.
26+
27+
`-t, --title [title]`
28+
: The display name of the model. Specify either `id` or `title` but not both.
29+
30+
`--listTitle [listTitle]`
31+
: The title of the document library to which the model will be applied. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.
32+
33+
`--listId [listId]`
34+
: The ID of the library to which the model will be applied. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.
35+
36+
`--listUrl [listUrl]`
37+
: Server or web-relative URL of the library to which the model will be applied. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.
38+
39+
`--viewOption [viewOption]`
40+
: Defines whether the model view should be set as the default view for the document library. Allowed values are: `NewViewAsDefault`, `DoNotChangeDefault`, `TileViewAsDefault`.
41+
```
42+
43+
<Global />
44+
45+
## Examples
46+
47+
Applies a trained document understanding model using its unique ID to a document library, identified by its title.
48+
49+
```sh
50+
m365 spp model apply --siteUrl "https://contoso.sharepoint.com" --contentCenterUrl "https://contoso.sharepoint.com/sites/ContentCenter" --id "7645e69d-21fb-4a24-a17a-9bdfa7cb63dc" --listTitle "Shared Documents"
51+
```
52+
53+
Applies a trained document understanding model using its display name to a document library, identified by its title.
54+
55+
```sh
56+
m365 spp model apply --siteUrl "https://contoso.sharepoint.com" --contentCenterUrl "https://contoso.sharepoint.com/sites/ContentCenter" --title "ModelExample" --listTitle "Shared Documents"
57+
```
58+
59+
Applies a trained document understanding model using its display name to a document library, identified by its URL.
60+
61+
```sh
62+
m365 spp model apply --siteUrl "https://contoso.sharepoint.com" --contentCenterUrl "https://contoso.sharepoint.com/sites/ContentCenter" --title "ModelExample" --listUrl "/Shared Documents"
63+
```
64+
65+
Applies a trained document understanding model using its display name to a document library, identified by its unique ID.
66+
67+
```sh
68+
m365 spp model apply --siteUrl "https://contoso.sharepoint.com" --contentCenterUrl "https://contoso.sharepoint.com/sites/ContentCenter" --title "ModelExample" --listId "b4cfa0d9-b3d7-49ae-a0f0-f14ffdd005f7"
69+
```
70+
71+
## Response
72+
73+
The command won't return a response on success.

docs/src/config/sidebars.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4055,6 +4055,11 @@ const sidebars: SidebarsConfig = {
40554055
},
40564056
{
40574057
model: [
4058+
{
4059+
type: 'doc',
4060+
label: 'model apply',
4061+
id: 'cmd/spp/model/model-apply'
4062+
},
40584063
{
40594064
type: 'doc',
40604065
label: 'model get',

src/m365/spp/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ const prefix: string = 'spp';
22

33
export default {
44
CONTENTCENTER_LIST: `${prefix} contentcenter list`,
5+
MODEL_APPLY: `${prefix} model apply`,
56
MODEL_GET: `${prefix} model get`,
67
MODEL_LIST: `${prefix} model list`,
78
MODEL_REMOVE: `${prefix} model remove`

0 commit comments

Comments
 (0)