📘 GPT学习宝典
  • 🐻 GPT助理
  • 🤯 Prompt大全
  • 🧰 GPT工具箱
  • 👩‍💻 学习资料
  • 📰 费曼日报
🔥 GPT训练营
🧲

提取信息 extract information from text

一级分类
工作
二级分类
数据处理类
简介

Extract contact information from a block of text.

打分
★★★☆☆
关键词
数据处理
来自
URL
https://platform.openai.com/examples/default-extract-contact-info

🌰 实例 examples

提示语 prompt

Extract the name and mailing address from this email:

Dear Kelly,

It was great to talk to you at the seminar. I thought Jane's talk was quite good.

Thank you for the book. Here's my address 2111 Ash Lane, Crestview CA 92002

Best,

Maya

Name:

回答 sample response

Maya Mailing Address: 2111 Ash Lane, Crestview CA 92002

API request

🌈prompt变体 variants

🧠思考:注意点、启发

Logo

serious, patient, unbreakable

ⓒ candobear life-learning community, 2023

WeChatX
const { Configuration, OpenAIApi } = require("openai");

const configuration = new Configuration({
  apiKey: process.env.OPENAI_API_KEY,
});
const openai = new OpenAIApi(configuration);

const response = await openai.createCompletion({
  model: "text-davinci-003",
  prompt: "Extract the name and mailing address from this email:\n\nDear Kelly,\n\nIt was great to talk to you at the seminar. I thought Jane's talk was quite good.\n\nThank you for the book. Here's my address 2111 Ash Lane, Crestview CA 92002\n\nBest,\n\nMaya\n\nName:",
  temperature: 0,
  max_tokens: 64,
  top_p: 1.0,
  frequency_penalty: 0.0,
  presence_penalty: 0.0,
});