(parser: FlexibleArgumentParser)
| 83 | |
| 84 | |
| 85 | def _add_query_options(parser: FlexibleArgumentParser) -> FlexibleArgumentParser: |
| 86 | parser.add_argument( |
| 87 | "--url", |
| 88 | type=str, |
| 89 | default="http://localhost:8000/v1", |
| 90 | help="url of the running OpenAI-Compatible RESTful API server", |
| 91 | ) |
| 92 | parser.add_argument( |
| 93 | "--model-name", |
| 94 | type=str, |
| 95 | default=None, |
| 96 | help=("The model name used in prompt completion, default to " "the first model in list models API call."), |
| 97 | ) |
| 98 | parser.add_argument( |
| 99 | "--api-key", |
| 100 | type=str, |
| 101 | default=None, |
| 102 | help=( |
| 103 | "API key for OpenAI services. If provided, this api key " |
| 104 | "will overwrite the api key obtained through environment variables." |
| 105 | ), |
| 106 | ) |
| 107 | return parser |
| 108 | |
| 109 | |
| 110 | class ChatCommand(CLISubcommand): |
no outgoing calls