polishPrompt(data: PolishPromptParams)

Requires:
@tuya-miniapp/cloud-api≥1.7.0

Description

Polish prompt

Parameters

ParameterTypeRequiredDescription
YesRequest parameters

Return Value

Type: Promise<PolishPromptResult>
PolishPromptResult

Referenced Types

interfacePolishPromptResultPrompt refinement result
PropertyTypeDescription
polishedPromptstringRefined prompt

Examples

Request example

import { polishPrompt } from '@tuya-miniapp/cloud-api';

polishPrompt({ prompt: 'Help me summarize the key points of the meeting' })
  .then(response => {
    console.log(response);
  })
  .catch(error => {
    console.error('Failed to polish prompt:', error);
  });

Response example

{ "polishedPrompt": "Please extract meeting decisions, action items, and risks, and list them item by item." }