gpt-3-experiments  by minimaxir

GPT-3 prompt testing and experimentation

created 5 years ago
699 stars

Top 49.7% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This repository provides a collection of test prompts and unedited AI-generated texts from OpenAI's GPT-3 API, showcasing the model's capabilities and limitations. It's designed for researchers, developers, and users experimenting with large language models who want to explore prompt engineering and observe raw model outputs.

How It Works

The project leverages OpenAI's GPT-3 API, specifically the davinci model. It systematically tests prompts across various temperatures (0.0 for deterministic output, 0.7, 1.0, and 1.2 for increasing creativity) to generate up to 512 tokens per text. The collected outputs are stored unedited, allowing for direct analysis of the model's responses.

Quick Start & Requirements

  • Install dependencies: pip3 install httpx pyyaml fire tqdm
  • Configure config.yml with your OpenAI API secret key.
  • Run via command line: python3 openai_api.py "Your prompt" or python3 openai_api.py "path/to/prompt.txt"
  • Requires Python 3.6+.
  • OpenAI API access is necessary.

Highlighted Details

  • Demonstrates GPT-3 outputs at multiple temperatures (0.0, 0.7, 1.0, 1.2).
  • Includes a Python script for efficient API querying.
  • Outputs are saved as Markdown by default for better GitHub rendering.
  • Content warnings are provided for potentially offensive generated text.

Maintenance & Community

Maintained by Max Woolf (@minimaxir), whose work is supported via Patreon and GitHub Sponsors.

Licensing & Compatibility

MIT License. Compatible with commercial use.

Limitations & Caveats

The script uses synchronous requests with a 30-second delay between API calls to avoid straining OpenAI's infrastructure. Generated text may be offensive and is uncurated.

Health Check
Last commit

5 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 90 days

Explore Similar Projects

Starred by Peter Norvig Peter Norvig(Author of Artificial Intelligence: A Modern Approach; Research Director at Google).

python-openai-demos by pamelafox

0%
374
Python scripts for OpenAI API demos
created 1 year ago
updated 1 week ago
Feedback? Help us improve.