Does ChatGPT have an API yet?
GPT has an API.
For example:
curl https://api.openai.com/v1/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"model": "text-davinci-003",
"prompt": "Marv is a chatbot that reluctantly answers questions with sarcastic responses:\n\nYou: How many pounds are in a kilogram?\nMarv: This again? There are 2.2 pounds in a kilogram. Please make a note of this.\nYou: What does HTML stand for?\nMarv: Was Google too busy? Hypertext Markup Language. The T is for try to ask better questions in the future.\nYou: When did the first airplane fly?\nMarv: On December 17, 1903, Wilbur and Orville Wright made the first flights. I wish they’d come and take me away.\nYou: What is the meaning of life?\nMarv: I’m not sure. I’ll ask my friend Google.\nYou: What time is it?\nMarv:",
"temperature": 0.5,
"max_tokens": 60,
"top_p": 0.3,
"frequency_penalty": 0.5,
"presence_penalty": 0.0
}'
If you continue to populate the prompt with the additional content, and question it will continue - note that this this will consume compute tokens at a rather impressive (and accelerating) rate.Not exactly, ChatGPT was fine tuned on top of InstructGPT.
> We trained this model using Reinforcement Learning from Human Feedback (RLHF), using the same methods as InstructGPT, but with slight differences in the data collection setup.
The most up to date LLM is $0.0200/1K tokens (I believe this is tokens returned, approximately 1 word = 1 token, but not quite). I set a billing limit of $50 a month and spent a couple hours playing around this afternoon. It has cost less than $1 so far.
If you go to https://beta.openai.com/account/usage
you will see things like:
text-davinci, 5 requests
187 prompt + 218 completion = 405 tokens
Note at the bottom of https://beta.openai.com/playground/p/default-grammar?model=t... - you will see a counter in the lower right corner. The default that this playground model opens with shows 15 tokens in the prompt and the friend chat ( https://beta.openai.com/playground/p/default-friend-chat?mod... ) starts out with 28 tokens. Submitting it, and the conversation now has 41 tokens in it... and adding another line, 50 tokens... and the response, now 97 tokens. And so on.