-
-
Notifications
You must be signed in to change notification settings - Fork 234
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
introduce generateContent task #1174
Conversation
✅ Deploy Preview for dtc-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I like the idea to use openAI as writing buddy. I also think this is an interesting start.
I wonder if we could make it more interactive and use more priming.
For instance, it could make sense to add some primer to the config like this (which I often use):
when you create AsciiDoc output
- format it as code (so I can copy and paste it)
- use '=' for headlines
- start with level '==' as headline
- write each sentence or half-sentence in a new line
- use attributes for URLs and define them at the start of the document
It could also make sense to use the AI
-statements in a dialog/session, so that one generated text block build upon the last ones... (or maybe is this already implemented? Didn't check the source)
Yes, indeed i also thought about having a more interactive implementation, but was not really sure about the capabilities with Gradle here. |
What I really would need is the feature to rephrase existing paragraphs. Would this also work with this task? If yes, could you add an example how this could be done? Checking the task documentation, I asked myself, "Why do we show the task's source code?". The target group of the task documentation is a user who usually doesn't need to know about the internals. IMHO it makes the page unnecessarily long and harder to digest. |
yes, but another topic. My goal is to remove the source code and hide it behind a link or tab |
I think we should consider this as experimental and I guess we soon will have plugins for our IDEs etc. to solve these feature problems. Let's give it a try and see how this feature evolves... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to see this in action...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work. I like it.
Apart from passing all configuration parameters through to the command line.
Concerning the implementation details as part of the docs, i started a discussion, to find out how we can handle this in the future #1175 |
Hm, somehow the DtcwOnPowershellSpec is broken on Java 17... i have no glue tbh it just stopped working :D Does this Test run intentionally on Linux environment? |
Yes, it intentionally runs on linux with powershell installed |
Ah, then there is this part missing in the
|
i am super confused about the behaviour of the test suite and how it is breaking |
I guess you are right. let me fix this... |
seems to work now |
The patch is fine. I have one "minor concern" about the configuration option Do we really want to nudge the user to put this in the configuration file which will end up in the revision control system? When collaborating in a team, most probably each user has its own API key. My suggestion would be to make the |
@PacoVK Would it make sense to write a test for this task? The problem I see here is which API key do we use to run the test. Or the test would mock out the call to the OpenAI API and test the rest. |
Yes, it always makes sense to test :D But as you figured out this would mean to have a test token and i did not yet discover a open source program on openAI site. |
What this PR is about
It introduces a new task called
generateContent
. It's basically an integration to openAI. You can put comment blocks into your input file like//// AI: write something short about habits ////
which will then be fully replaced by the text provided through openAI.
Disclaimer: You'll need an API key from openAI in order to make this task work
All Submissions:
changelog.adoc
?