Skip to content

Commit c4a2c6e

Browse files
committed
Update ai-core-orchestration-grounding.md
1 parent b1db9de commit c4a2c6e

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

tutorials/ai-core-orchestration-grounding/ai-core-orchestration-grounding.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,37 @@ System.out.println("Created Pipeline with ID: " + pipeline.getPipelineId());
813813
814814
[OPTION END]
815815
816+
[OPTION BEGIN [JavaScript SDK]]
817+
818+
We are creating a document-grounding pipeline using SAP AI Core. The pipeline is configured to integrate with Microsoft SharePoint as a data source, enabling AI-driven document processing. This setup allows seamless ingestion of documents from a specified SharePoint site, ensuring efficient data retrieval and processing.
819+
820+
**Note:** For this step, we are using the [document grounding module](https://sap.github.io/ai-sdk/docs/js/ai-core/document-grounding) of the SDK so make sure to add the dependency to your project.
821+
822+
```javascript
823+
// Request body for pipeline creation request
824+
const pipelineRequest: PipelinePostRequst = {
825+
type: 'MSSharePoint',
826+
configuration: {
827+
destination: '<generic secret name>',
828+
sharePoint: {
829+
site: {
830+
name: '<sharepoint site name>',
831+
includePaths: ['/<folder name>']
832+
}
833+
}
834+
}
835+
};
836+
837+
// Create the pipeline
838+
const pipeline = await PipelinesApi.createPipeline(pipelineRequest, {
839+
'AI-Resource-Group': RESOURCE_GROUP
840+
}).execute();
841+
842+
console.log('Created Pipeline with ID: ', pipeline.pipelineId);
843+
```
844+
845+
[OPTION END]
846+
816847
### 6. Ensuring Accurate Responses with Grounding
817848
818849
In the previous steps, we have completed the data preparation for grounding. Before initiating model inference or orchestration, ensure that there is an active orchestration deployment (**scenario ID: orchestration**). To verify the available orchestration deployments and their status, use the **get_deployment** API under the **"Deployments"** section in the **Bruno collection**. Additionally, update the **orchestration_service_url** in the environment.

0 commit comments

Comments
 (0)