1 篇文章带有标签 “moderation”

Building Systems with the ChatGPT API

Building Systems with the ChatGPT API

使用 ChatGPT API 构建系统

Language Models, the Chat Format and Tokens(语言模型、聊天格式和 Tokens)

Load OpenAI API key

import os
import openai
import tiktoken
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv()) # read local .env file

openai.api_key  = os.environ['OPENAI_API_KEY']