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
|
|
@ -254,7 +254,7 @@ export async function POST(request: Request) {
|
|||
if (document.kind === 'text') {
|
||||
const { fullStream } = streamText({
|
||||
model: customModel(model.apiIdentifier),
|
||||
system: updateDocumentPrompt(currentContent),
|
||||
system: updateDocumentPrompt(currentContent, 'text'),
|
||||
prompt: description,
|
||||
experimental_providerMetadata: {
|
||||
openai: {
|
||||
|
|
@ -284,7 +284,7 @@ export async function POST(request: Request) {
|
|||
} else if (document.kind === 'code') {
|
||||
const { fullStream } = streamObject({
|
||||
model: customModel(model.apiIdentifier),
|
||||
system: updateDocumentPrompt(currentContent),
|
||||
system: updateDocumentPrompt(currentContent, 'code'),
|
||||
prompt: description,
|
||||
schema: z.object({
|
||||
code: z.string(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue