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

Fixes and various AEM improvements #26

Merged
merged 32 commits into from
Oct 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c36c969
update README.md with AEM etc.
stoerr Sep 25, 2023
1a9027f
misc
stoerr Sep 25, 2023
52dd0a8
composum variant creation: save history only persistent over dialog o…
stoerr Sep 27, 2023
e7f3a0a
Update of *.md according to AEM and current state
stoerr Sep 27, 2023
e0a6cc5
add MIT license
stoerr Sep 27, 2023
2dd75e7
implement temperature setting, remove history in AEM for now
stoerr Sep 28, 2023
a21b959
move testpage to better place
stoerr Sep 28, 2023
b75efa6
yet untested implementation of dialog history in AEM content creation…
stoerr Sep 28, 2023
79a9ad3
fixes
stoerr Sep 28, 2023
fc2e3b1
update TODO.txt and improve some templates
stoerr Oct 9, 2023
dbd09d6
remove unused examples from archetype
stoerr Oct 9, 2023
f636d4f
use AemContextExtension in test
stoerr Oct 9, 2023
9c31da3
downgrade dependencies for AEM 6.5 compatibility
stoerr Oct 9, 2023
da7a179
fix
stoerr Oct 10, 2023
c53f480
fixes for aem history function in creation dialog
stoerr Oct 10, 2023
77c5508
refactoring and fix loading last history
stoerr Oct 10, 2023
75697b7
implement history for side panel dialog
stoerr Oct 10, 2023
582fbb4
fix master.yml folder location
stoerr Sep 4, 2023
55016cf
starting a help page for content creation
stoerr Oct 11, 2023
3e64e4f
finalize content creation dialog help
stoerr Oct 11, 2023
784f472
fixes in sidebar button availability
stoerr Oct 11, 2023
21dfe4c
fixing
stoerr Oct 11, 2023
87cf796
composum dialogs: also submit on enter but permit shift enter as newline
stoerr Oct 11, 2023
ca86d7a
fix wrapping on side panel AI response
stoerr Oct 11, 2023
0f994fc
aem fixes in page properties
stoerr Oct 11, 2023
bc85213
enable aem only on /content
stoerr Oct 11, 2023
b1adf59
remove weird "$jscomp not defined" error, make creation dialog closin…
stoerr Oct 11, 2023
4e60411
aem create use richtext if needed
stoerr Oct 11, 2023
b76f0de
aem allow creation dialog in page properties (for description)
stoerr Oct 11, 2023
e0b1905
mention OPAX
stoerr Oct 11, 2023
2c29a8d
add llm based search action as an experiment
stoerr Oct 11, 2023
606c5cd
a bit documentation on restrictions
stoerr Oct 12, 2023
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
2 changes: 1 addition & 1 deletion .chatgpt.intro.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
List all files except ui.content.sample using the plugin. Read the chatgpt.codeRules.md and observe the rules that are laid out there
Read the chatgpt.codeRules.md and observe the rules that are laid out there
during this whole chat, but you don't need to repeat them.

Use the grep operation to search for comments starting with `ChatGPTTask:` and execute them. The comment should be
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,6 @@ jobs:
with:
branch: gh-pages
# This path is different for the repositories - check
folder: target/staging/parent-2/parent-2-public/composum-platform/composum-chatgpt-integration
folder: target/staging/parent-2/parent-2-public/composum-platform/composum-ai-integration
git-config-name: ${{ vars.RELEASE_USERNAME }}
git-config-email: ${{ vars.RELEASE_USEREMAIL }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ target
# Other stuff
*.orig
/tags

.cgptdevbench/llmsearch.db
22 changes: 22 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT)

Copyright (c) 2023 IST GmbH Dresden

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

8 changes: 4 additions & 4 deletions NextSteps.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Next steps in the implementation

- Update AEM dialog with history
- AEM announcement and installation and usage description
- AEM 6.5 version
- Update Pages content creation dialog with separate content field like AEM
- Check where it should appear and where not - extend tag.
- Autor, key Felder
- Base text as explicit field filled on ddl choice
- Base text ("data")
- Prompt ("instructions")
- API key in site configuration? Tenant configuration?
- (Explain: why isn't it there in edit styles)

Expand All @@ -14,7 +15,6 @@

## Small bugs

- Doppelklick darf Dialog nicht mehrfach öffnen!
- Stacked Modals: scroll des untersten?
- Bug, please report: no widget found for /content/ist/composum/home/pages/setup/jcr:
content/main/row/column-0/section/codeblock/code
Expand Down
8 changes: 4 additions & 4 deletions ProjectStructure.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
backend base services.
- package : /libs content for integration with Composum Pages : components, javascript ; deploys base and bundle

## aem (planned)
## aem

- ui.core : OSGI bundle providing the code to integrate the backend services with AEM
- ui.apps : /libs content for integration with AEM editor
- all : A single "uber"-package deploying everything necessary for integration into AEM
- aem/ui.core : OSGI bundle providing the code to integrate the backend services with AEM
- aem/ui.apps : /libs content for integration with AEM editor
- aem/all : A single "uber"-package deploying everything necessary for integration into AEM
48 changes: 31 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Composum AI

Fast and flexible,
Composum empowers you,
Content blooms with ease.
> Fast and flexible,<br>
Composum empowers you,<br>
Content blooms with ease.<br>
-- ChatGPT

[Click for a 2.5min demonstration video](https://github.com/ist-dresden/composum-AI/assets/999184/18595f2a-e0b5-49f3-bc4c-65d6a8bc93f6)

## Basic idea

With the advent of large language models (LLM) like [ChatGPT](https://openai.com/blog/chatgpt),
Expand All @@ -20,11 +22,9 @@ All of there provide APIs that allow
them to be used very flexibly in a lot of ways that are useful for supporting a CMS - for translation, content
creation, review, summarizing, chat, you name it.

At the current state, Composum AI provides AI services for [Composum Pages](https://www.composum.com/home.html).
A port to
[Adobe Experience Manager](https://business.adobe.com/products/experience-manager/adobe-experience-manager.html)
is [currently in progress](https://github.com/ist-dresden/composum-AI/issues/15) - both share quite some
commonality through being based on the
Composum AI provides AI services for [Composum Pages](https://www.composum.com/home.html). There is also a version for
[Adobe Experience Manager](https://business.adobe.com/products/experience-manager/adobe-experience-manager.html),
though yet somewhat experimental. Both share quite some commonality through being based on the
[Apache Sling](https://sling.apache.org/) platform.
Where possible and appropriate, components will remain platform-agnostic.
Since [OpenAI](https://openai.com/)'s chat completion API, also available through as
Expand All @@ -36,20 +36,25 @@ data security rules. It's likely that in time there will also be LLM that can be

## Current status

In our
[first release](https://github.com/ist-dresden/composum-AI/releases/tag/composum-chatgpt-integration-0.1.1)
we have implemented the following dialogs that help with editing in Composum Pages:
For a quick view of the Composum Pages variant, please compare the
[Composum blog entry](https://www.composum.com/home/blog/pages/composumAI.html) about it and the more detailed
[documentation](https://www.composum.com/home/pages/editing/Composum-AI.html).

There are the following dialogs that help with editing in Composum Pages:

- a translation dialog that can be opened on any edited textfield in multilingual websites and suggests translations
of the text of a component into other languages
- the text of page descriptions and summaries, keywords, navigation title
of the text of a component into other languages the text of page descriptions and summaries, keywords, navigation title
- a multi purpose content creation dialog that can support you by creating text for any edited text fields. The text
can be created either from a user supplied prompt, or by applying a (user supplied or predefined) ChatGPT prompt
to the existing text of the page / component. That way, one could create summaries of the page, or extracts wrt. a
topic, overviews, orjust request suggestions to reformulate or expand user supplied text fragments, ... Your
imagination is the limit.
- an side panel AI that you can chat with and use to analyze the text content of the current page and get suggestions.
- a page category dialog with suggestions for page categories (that are used as SEO keywords)

For the AEM version we omit the translation dialog (as AEM has it's own frequently used mechanisms) and the page
category dialog, as AEM tags work quite differently.

## Try it out!

The easiest way to try it is the [Composum Cloud](https://cloud.composum.com) where Composum-AI is deployed. You can
Expand All @@ -62,13 +67,17 @@ You will need an [OpenAI API key](https://platform.openai.com/account/api-keys)
that in the [Felix Console configuration tab](http://localhost:8080/system/console/configMgr) at "GPT Chat
Completion Service".

For AEM, there is a
[package on maven central](https://central.sonatype.com/artifact/com.composum.ai.aem/composum-ai.all) to deploy. You
will need to configure an OpenAI API key as well.

Please compare the release notes of the
[latest release](https://github.com/ist-dresden/composum-AI/releases/) for more instructions.

## Further ideas in investigation

- A dialog that is focused on a providing ChatGPT supported feedback about the page / components etc., which can be
used for grammar / spelling checks, reviews, general suggestions etc.
- possibly support of the user when searching the site using natural language
- possibly support of the user by answering questions about the site content
- possibly augment support AEM with the provided services.

## Development with ChatGPT and Github Copilot

Expand All @@ -78,7 +87,8 @@ Copilot IntelliJ plugin, for speeding up development. Some outcomes of that:
- The [feature creation process](featurespecs/FeatureCreationProcess.md) massively improves the quality and speed of
specifying a feature and thinking it through. See the [feature specification directory](featurespecs/) for
examples of that.
- Speeding up the development is ongoing, but Github Copilot certainly speeds up a lot of things.
- Speeding up the development is ongoing, but Github Copilot and ChatGPT certainly
[speed up a lot of things](http://www.stoerr.net/blog/2023-05-25-developmentWithChatGPTAndCopilot.html).

## More project documentation

Expand All @@ -90,3 +100,7 @@ architectural decisions.
[Project structure](./ProjectStructure.md) describes the module structure of the project.

[ChatGPT API Analysis](./ChatGPTAPI.md) contains a discussion of the ChatGPT API wrt. our project.

## Thanks

Thanks to [OPAX](https://github.com/jaketracey/opax) for ideas for prompts.
2 changes: 1 addition & 1 deletion Releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- check there


## Testing
## Local testing of releasing

Starting with parent release 1.7, the release creation is meant to be done automatically in github actions. There are two kinds of workflow: in Nodes at .github/workflows/createrelease.yml (meant to be copied to all the other Github projects) it builds the whole tree in the project, but for composum-meta .github/workflows/createrelease.yml does permit to select a subdirectory, as there are several trees (ist/parent and assembly) with different release schedules.
To check release creation locally in a dry run, you can use the following command lines:
Expand Down
26 changes: 26 additions & 0 deletions TODO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Restrictions
Announcement, Installation, Doc überarbeiten
Refactor Aprrox Markdown for HTML
AEM for content fragments?

Done:
Markdown to HTML transformation in sidebar -> not necessary, white-space: break-spaces is enough.
implement AEM Historie -> DONE
Help-Pages -> done for creation assistant; for the side panel ai the help buttons and the initial text should be enough for now.
Enter in Composum Variante
Tell ChatGPT when we expect HTML.

Deferred:
AEM 6.5
Append button (?)

Approx Markdown improvement
http://localhost:9090/bin/pages.html/content/ist/restricted/home/products/Composum-AI : approx. markdown???
http://localhost:9090/bin/pages.html/content/ist/restricted/home/products/Composum-AI description translation???

Approx. Markdown change:
ignore all attribute with : in them except jcr:title etc., all nodes with : in name, all "true"/ "false" / single number (int / float) attributes or array of numbers attributes, or shorter than 3 digits or path, or array or type date or boolean or {Date} or {Boolean} , inherit, blank, html tags, target
sling:resourceType .*/image
Print as 'attribute: value\n'

ignore: align, fileReference, target, style, element
2 changes: 1 addition & 1 deletion aem/all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<artifactId>composum-ai.all</artifactId>
<packaging>content-package</packaging>
<name>Composum AI::AEM::All</name>
<description>All content package for Composum AI</description>
<description>All content package for Composum AI AEM variant</description>

<!-- ====================================================================== -->
<!-- B U I L D D E F I N I T I O N -->
Expand Down
14 changes: 13 additions & 1 deletion aem/core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,21 @@ Import-Package: javax.annotation;version=0.0.0,*
<artifactId>slf4j-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<!-- <dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>aem-sdk-api</artifactId>
</dependency> -->
<dependency>
<groupId>com.adobe.aem</groupId>
<artifactId>uber-jar</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
</dependency>
<dependency>
<groupId>com.composum.ai</groupId>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading