Prompt 优化
开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/v2/text/prompt_optimization
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v2/text/prompt_optimization' \
--header 'Authorization;' \
--header 'content-type: application/json' \
--data-raw '{
"response_as_dict": true,
"attributes_as_list": false,
"show_original_response": false,
"target_provider": "google"
}'
响应示例响应示例
200 - 成功示例
{
"openai": {
"missing_information": "What type of entities are you specifically looking to extract (names, locations, organizations, etc.)? Do you have any specific language or data format preferences for the text? Do you need this tool to handle any particular size, complexity, or other special characteristics of the texts?",
"items": [
{
"text": "Given the following text and a list of entities, please extract and list all occurrences of the specified entities in the text. The entities to be extracted are [entities]. The text for entity extraction is [text]."
},
{
"text": "Given the following text, please identify and extract all instances of the specified entities. The entities to look for are [Entity1, Entity2, Entity3]. Here is the text: [Insert Text Here]. Please list the extracted entities in a clear and organized manner."
},
{
"text": "Given the following text and a list of entities, please extract and list all instances of the provided entities within the text. The entities are [list of entities]. The text is as follows: [text]. Please format your response as a bulleted list, with each bullet representing an instance of an entity found in the text."
}
]
}
}
请求参数
Header 参数
content-type
string
必需
示例值:
application/json
Authorization
string
必需
默认值:
Bearer <your_key>
Body 参数application/json
返回响应
修改于 2024-04-11 06:55:56