![Logo](images/logo.png)
This provides the action (incl. an OpenAPI declaration) useable for GPTs to read the JCR content repository
in Apache Sling / AEM on configured paths.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
This is an OSGI bundle deployable on Apache Sling / Adobe Experience Manager (AEM) that provides the actions for a GPT to read the JCR content repository on configured paths. You can use it to direct ChatGPT to read the properties of (anonymously readable) JCR nodes and to read the contents of stored files, and answer questions, do summary tasks etc.
This is currently just done as minimal project so that it does what I need it to do. If it doesn't work for you please contact me - if there is somebody who is interested and willing to provide feedback and share his experiences, I'll be happy to help and extend it!
Preconditions: To use it you have to be a paying OpenAI ChatGPT customer, since otherwise GPTs aren't available for you.
Configuration: There is an OSGI configuration "ChatGPT JCR Actions" that configures the paths to be read, and an required API key for authentication. The API key should be a long random key that you can paste both into the configuration and into the authentication section of the GPT, and is responsible for the security. Additionally there is a number of regular expressions at which read access is permitted. The full path has to match any of the keys.
To be reachable from ChatGPT it needs to be accessible from the internet via HTTPS. The easiest way I know is using serveo.net. You can start it with:
ssh -T -R yourdomain.serveo.net:80:localhost:8080 serveo.net
Replace yourdomain
with a prefix of your choice that contains some randomness to avoid collisions and replace 8080
with the port you are using for Apache Sling. The servlet
only works if it was configured and is available at the URL /bin/public/gpt/jcractions .
Configure it as actions from a GPT: generally that works like
GPT creation for Co-Developer GPT Engine ,
but you have to use the import URL https://yourdomain.serveo.net/bin/gpt/jcractions.yaml
.
You can either create a GPT that just has this as actions, or
add this as additional actions to a Co-Developer GPT.
IMPORTANT: you have to set the authentication type to "API Key", and paste the same API key that you configured in the
OSGI configuration into the API key field and set Auth Type to Custom with custom header name X-JcrActions-Api-Key
.
You have to repeat that if you re-import the actions, or ChatGPT gives an empty answer with ClientError (which is a bug
in ChatGPT).
CAUTION: if you do it like that it makes your local server reachable from the internet at yourdomain.serveo.net
! If
you have proprietary stuff on your server and / or use admin/admin as password, and that worries you, please configure a
reverse proxy or something like that so that only that URL /bin/public/gpt/jcractions is reachable from the internet.
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Hans-Peter Störr - www.stoerr.net , @HansPeterStoerr
Project Link: https://github.com/stoerr/JCRActionsForGPT