-
Notifications
You must be signed in to change notification settings - Fork 101
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
Feat/#218 add ai generation to markdown cells #228
Feat/#218 add ai generation to markdown cells #228
Conversation
- Move getValidationError function inside component - Adjust onAcceptDiff to update text state and call onSave - Rename setnewText to setNewText for consistency - Update error display positioning and styling
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.
Thank you for this @Aswanth-c
I pulled down the branch and am trying it out locally. Extracting the AI prompt looks like a good change, but the functionality does not seem to work as I would expect. The goal here is for the AI to generate markdown but the prompts submitted to the models are prompts that instruct the AI to write code. The result is that it seems to mostly generate code in the markdown cell which is not intended -- we want it to write markdown.
I believe we will need a new prompt for this PR.
Gotcha, I will update the pr with new prompt |
Update: I have added the prompt, |
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.
@benjreinhart Works for me and looks good but could you take a look at it, and make sure the prompt is good
|
||
Your job is to edit the cell based on the contents of the Srcbook and the user's intent. | ||
Act as a **Markdown expert**, writing the best possible content you can. Focus on being **elegant, concise, and clear**. | ||
**ONLY RETURN THE MARKDOWN TEXT , NO PREAMBULE, NO SUFFIX, NO CODE FENCES (LIKE TRIPLE BACKTICKS) ONLY THE MARKDOWN**. |
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.
PREAMBULE
should be PREAMBLE
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.
There's a few issues with this and I think it's not worth fixing them as we're changing how the AI works (see app builder branch)
@@ -0,0 +1,85 @@ | |||
<!-- srcbook:{"language":"markdown"} --> |
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.
We don't need this in the prompt
1. Title cell (heading 1) | ||
2. N more cells, which are either: | ||
- **Markdown cells** (GitHub flavored Markdown) | ||
- Markdown cells, which have a filename and source content. |
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.
This is wrong, should be code cells
src/components/ai-prompt-input.tsx
for reuseablity