Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds spp model apply command. Closes #6119 #6453

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions docs/docs/cmd/spp/model/model-apply.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import Global from '/docs/cmd/_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# spp model apply

Applies (or syncs) a trained document understanding model to a document library

## Usage

```sh
m365 spp model apply [options]
```

## Options

```md definition-list
`-u, --siteUrl <siteUrl>`
: The URL of the site where the library is located.

`--contentCenterUrl <contentCenterUrl>`
: The URL of the content center site where model is located.

`-i, --id [id]`
: The unique ID of the model. Specify either `id` or `title` but not both.

`-t, --title [title]`
: The display name of the model. Specify either `id` or `title` but not both.

`--listTitle [listTitle]`
: The title of the document library to which the model will be applied. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.

`--listId [listId]`
: The ID of the library to which the model will be applied. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.

`--listUrl [listUrl]`
: Server or web-relative URL of the library to which the model will be applied. Specify either `listTitle`, `listId`, or `listUrl` but not multiple.

`--viewOption [viewOption]`
: Defines whether the model view should be set as the default view for the document library. Allowed values are: `NewViewAsDefault`, `DoNotChangeDefault`, `TileViewAsDefault`.
```

<Global />

## Examples

Applies a trained document understanding model using its unique ID to a document library, identified by its title.

```sh
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"
```

Applies a trained document understanding model using its display name to a document library, identified by its title.

```sh
m365 spp model apply --siteUrl "https://contoso.sharepoint.com" --contentCenterUrl "https://contoso.sharepoint.com/sites/ContentCenter" --title "ModelExample" --listTitle "Shared Documents"
```

Applies a trained document understanding model using its display name to a document library, identified by its URL.

```sh
m365 spp model apply --siteUrl "https://contoso.sharepoint.com" --contentCenterUrl "https://contoso.sharepoint.com/sites/ContentCenter" --title "ModelExample" --listUrl "/Shared Documents"
```

Applies a trained document understanding model using its display name to a document library, identified by its unique ID.

```sh
m365 spp model apply --siteUrl "https://contoso.sharepoint.com" --contentCenterUrl "https://contoso.sharepoint.com/sites/ContentCenter" --title "ModelExample" --listId "b4cfa0d9-b3d7-49ae-a0f0-f14ffdd005f7"
```

## Response

The command won't return a response on success.
5 changes: 5 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4013,6 +4013,11 @@ const sidebars: SidebarsConfig = {
},
{
model: [
{
type: 'doc',
label: 'model apply',
id: 'cmd/spp/model/model-apply'
},
{
type: 'doc',
label: 'model list',
Expand Down
1 change: 1 addition & 0 deletions src/m365/spp/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const prefix: string = 'spp';

export default {
CONTENTCENTER_LIST: `${prefix} contentcenter list`,
MODEL_APPLY: `${prefix} model apply`,
MODEL_LIST: `${prefix} model list`,
MODEL_REMOVE: `${prefix} model remove`
};
Loading
Loading