👁️🗨️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# https://gist.github.com/laurentperrinet/94fbcc0dab15736cd66c9ffc669b625b | |
# install the API using `conda install openai` (MMV) | |
# setup your API key by including `export OPENAI_API_KEY="sk-xxxxxyyyyyyyzzzz"` in your `.zshrc` (MMV) | |
import argparse | |
parser = argparse.ArgumentParser(description='A simple CLI for chat-GPT with my prefered settings') | |
parser.add_argument('prompt', help="A useful prompt.", default='Demonstrate that the earth is flat.', type=str) | |
parser.add_argument("--max_tokens", help="Set the maximum tokens number", default=1000, type=int) |
OlderNewer