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

分类 Classification

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

Classify items into categories via example.

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

🌰 实例 examples

提示语 prompt

The following is a list of companies and the categories they fall into:

Apple, Facebook, Fedex

Apple Category:

回答 sample response

Technology

Facebook Category: Social Media

Fedex Category: Delivery

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: "The following is a list of companies and the categories they fall into:\n\nApple, Facebook, Fedex\n\nApple\nCategory:",
  temperature: 0,
  max_tokens: 64,
  top_p: 1.0,
  frequency_penalty: 0.0,
  presence_penalty: 0.0,
});