לקריאה באנגלית ערוך

שתף באמצעות

Create declarative agents using Teams Toolkit

Add OneDrive and SharePoint content

In this section, you add the contents of a SharePoint site to the available knowledge for the agent.

  1. Open the appPackage/declarativeAgent.json file and update the capabilities array to the following value, replacing https://contoso.sharepoint.com/sites/ProductSupport with a SharePoint site URL in your Microsoft 365 organization.

    JSON
    "capabilities": [
        {
            "name": "WebSearch"
        },
        {
            "name": "OneDriveAndSharePoint",
            "items_by_url": [
                {
                    "url": "https://contoso.sharepoint.com/sites/ProductSupport"
                }
            ]
        }
    ]
    

    For more information, see OneDrive and SharePoint object.

    הערה

    • URLs should be full path to SharePoint items (site, document library, folder, or file). You can use the "Copy direct link" option in SharePoint to get the full path or files and folders. To achieve this, right-click on the file or folder and select Details. Navigate to Path and click on the copy icon.
    • Not specifying the items_by_url array (or the alternative items_by_sharepoint_ids array) causes all OneDrive and SharePoint content in your Microsoft 365 organization that is available to the logged in user to be available to the agent.
  2. Select Provision in the Lifecycle pane of the Teams Toolkit.

The declarative agent will have access to OneDrive and SharePoint content to generate its answers after you reload the page.

A screenshot showing a response from the declarative agent that contains SharePoint and OneDrive content