Developer Guides
Welcome to the AI Document Assistant developer guides. These guides show how to set up AI Document Assistant to provide AI functionality in PSPDFKit for Web.
A Quick Infrastructure Primer
To have a fully functional AI setup, you’ll need two services and one client library:
-
PSPDFKit for Web — A document viewer in the browser that also exposes the UI for the AI features.
-
AI Document Assistant — A service to process the AI request and process documents
-
Document Engine — A service that stores and serves documents to AI Document Assistant and PSPDFKit for Web.
If you’re brand new to PSPDFKit, take a look at our getting started guides to quickly add AI functionality into a new web project.
Concepts
There are two important concepts to be aware of when integrating AI Document Assistant:
-
documentId
— A document ID returned from Document Engine on document upload. Refer to the API Reference for information on how to upload documents. This is used for referencing documents to chat with. -
sessionId
— An alphanumeric unique ID specified by you to allow recall of a chat history if a user navigates away.
These two concepts are used in the configuration object passed to PSPDFKit for Web, and they can be used to limit user access to specific documents and sessions via the claims of a JWT.
There’s one additional concept, which is loosely linked with sessionId
s, but this is optional, depending on your requirements:
-
userId
(optional) — Although it’s not required, this is an ID you specify that makes it possible to implement usage limits via claims in a JWT, or to purge data specifically related to a single user via the server API.
Guides
Configuration
How to customize AI Document Assistant’s options
Deployment
How to deploy AI Document Assistant
Viewer integration
Learn how to connect PSPDFKit for Web with your AI Document Assistant instance
Data Management
Take control of your users’ data with the server API