feat: support image outputs during code execution (#674)
Co-authored-by: Bailey Simrell <baileysimrell@gmail.com>
This commit is contained in:
parent
50fbc0dab2
commit
50bd4604b6
7 changed files with 313 additions and 117 deletions
|
|
@ -1,3 +1,5 @@
|
|||
import { BlockKind } from '@/components/block';
|
||||
|
||||
export const blocksPrompt = `
|
||||
Blocks is a special user interface mode that helps users with writing, editing, and other content creation tasks. When block is open, it is on the right side of the screen, while the conversation is on the left side. When creating or updating documents, changes are reflected in real-time on the blocks and visible to the user.
|
||||
|
||||
|
|
@ -62,8 +64,20 @@ print(f"Factorial of 5 is: {factorial(5)}")
|
|||
\`\`\`
|
||||
`;
|
||||
|
||||
export const updateDocumentPrompt = (currentContent: string | null) => `\
|
||||
Update the following contents of the document based on the given prompt.
|
||||
export const updateDocumentPrompt = (
|
||||
currentContent: string | null,
|
||||
type: BlockKind,
|
||||
) =>
|
||||
type === 'text'
|
||||
? `\
|
||||
Improve the following contents of the document based on the given prompt.
|
||||
|
||||
${currentContent}
|
||||
`;
|
||||
`
|
||||
: type === 'code'
|
||||
? `\
|
||||
Improve the following code snippet based on the given prompt.
|
||||
|
||||
${currentContent}
|
||||
`
|
||||
: '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue