diff options
Diffstat (limited to 'src/client/apis/gpt/customization.ts')
-rw-r--r-- | src/client/apis/gpt/customization.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/apis/gpt/customization.ts b/src/client/apis/gpt/customization.ts index 42f112f88..db5ef6eb5 100644 --- a/src/client/apis/gpt/customization.ts +++ b/src/client/apis/gpt/customization.ts @@ -116,9 +116,9 @@ export const smartLayout = async (inputData: { width: number; height: number }[] }; // layout -export const smartLayout2 = async (inputData: { width: number; height: number; content: string }[]) => { +export const smartLayout2 = async (inputData: { width: number; height: number }[]) => { let prompt = - 'I want to layout documents in a 2d space in an organized fashion with padding of about 50 units around each document, importantly making sure they do not overlap. I also want you to group documents by their content, with space separating semantic categories. Given a json array of documents containing their width and heights in this form: {width: number, height: number, content: string}[], give me a json array in this form: {x: number, y: number}[] corresponding to the documents in the same order with a nice layout. Return just the json array.'; + 'I want to layout documents in a freeform 2d space in a masonry layout with a padding of around 50 units around each document. Take inspiration from existing UI grid and masonry layout design patterns. Make sure documents do not overlap. Given a json array of documents containing their width and heights in this form: {width: number, height: number}[], give me a json array in this form: {x: number, y: number}[] corresponding to the documents in the same order with the improved layout. Return just the json array.'; let messages: ChatCompletionMessageParam[] = [ { role: 'system', content: prompt }, @@ -132,7 +132,7 @@ export const smartLayout2 = async (inputData: { width: number; height: number; c const response = await openai.chat.completions.create({ model: 'gpt-4', messages: messages, - temperature: 0.01, + temperature: 0, max_tokens: 2000, }); const content = response.choices[0].message?.content; |