What differences are there between ChatGPT and Instructional GPT?
- User
What differences are there between ChatGPT and Instructional GPT?
- Assistant
Both ChatGPT and InstructGPT are auto-regressive large language models trained and made available by OpenAI. They are sibling models in the GPT-3.5 family and have been pretrained on natural language and code. They have also both been fine-tuned on human instructions and feedback.
The ChatGPT model and interface is optimized for use as a dialog agent by human users. It is available for free on a somewhat limited basis or can be purchased for a monthly fee. It has been trained specifically as a dialog agent and has enhanced safety measures to allow it to be exposed directly to end users.
The InstructGPT model is similar, but not identical, to the model that powers ChatGPT. It is not as restrictive as the ChatGPT model in terms of safety. It is not easily accessible to the public and is instead made available as a paid API. Requests to InstructGPT are billed based on the number of tokens returned, whereas ChatGPT is billed at a fixed monthly price regardless of usage.
Overall, these are very similar models that can be used for similar purposes, but ChatGPT is best suited for dialog with end users, while InstructGPT is useful for developers integrating API calls to a large language model into other applications.
- User
Can you provide me some sample code to access the InstructGPT API in python?
- Assistant
Sure, here is some sample Python code that you can use to access the InstructGPT API:
import requests
Set up the API endpoint URL and API key
endpoint = 'https://api.instructgpt.com/complete' api_key = ''
Set up the text to be completed
text = 'The quick brown fox jumps over the'
Set up the API request headers and payload
headers = {'Authorization': f'Bearer {api_key}'} payload = {'text': text, 'max_tokens': 10, 'temperature': 0.5}
Send the API request and get the response
response = requests.post(endpoint, headers=headers, json=payload)
Print the completed text
if response.ok: data = response.json() completed_text = data['choices'][0]['text'] print(f'Completed text: {completed_text}') else: print(f'Error: {response.status_code}')
In this example, we use the requests library to send a POST request to the InstructGPT API endpoint, passing in the API key and the text to be completed as payload. We set the max_tokens and temperature parameters to control the length and creativity of the generated text. If the API request is successful (status code 200), we parse the JSON response and print the completed text. If there is an error, we print the status code. Note that you will need to replace with your actual API key in order for this code to work.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)