File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ import { NextResponse } from 'next/server';
33export async function GET ( request : Request ) {
44 const providerName = process . env . PROVIDER_NAME || 'gpt-4o-mini model' ;
55 const picturePath = process . env . PICTURE_PATH || '/images/logo.png' ;
6- const imageResponse = await fetch ( new URL ( picturePath , request . url ) ) ;
6+ const publicIp = process . env . PUBLIC_IP || 'http://46.17.103.110:3001/' ;
7+ const imageResponse = await fetch ( new URL ( picturePath , `http://${ publicIp } ` ) ) ;
78 const imageBuffer = await imageResponse . arrayBuffer ( ) ;
89 const base64Image = `data:${ imageResponse . headers . get ( 'content-type' ) } ;base64,${ Buffer . from ( imageBuffer ) . toString ( 'base64' ) } ` ;
910 const providerDescription = process . env . PROVIDER_DESCRIPTION || 'Default provider with gpt-4o-mini model' ;
You can’t perform that action at this time.
0 commit comments