-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathprompt-options.ts
62 lines (60 loc) · 1.5 KB
/
prompt-options.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import type { Options } from 'yargs';
import { providerOptions } from './providers.js';
export interface PromptOptions {
/** AI inference provider to be used */
provider?: string;
/** AI model to be used */
model?: string;
/** Add file to conversation */
file?: string;
/** Creative response style */
creative?: boolean;
/** Precise response style */
precise?: boolean;
/** Show verbose-level logs. */
verbose?: boolean;
/** Disable streaming in responses */
stream?: boolean;
}
export const promptOptions: Record<keyof PromptOptions, Options> = {
'provider': {
alias: 'p',
type: 'string',
describe: 'AI provider to be used',
choices: providerOptions,
},
'model': {
alias: 'm',
type: 'string',
describe: 'AI model to be used',
},
'file': {
type: 'string',
describe: 'Add given file to conversation context',
},
'creative': {
type: 'boolean',
describe: 'Enable more creative responses',
conflicts: 'precise',
},
'precise': {
type: 'boolean',
describe: 'Enable more deterministic responses',
conflicts: 'creative',
},
'stream': {
type: 'boolean',
describe: 'Enable streaming in responses',
hidden: true,
},
// @ts-expect-error: yargs workaround. See: https://github.com/yargs/yargs/issues/1116#issuecomment-568297110
'no-stream': {
type: 'boolean',
describe: 'Disable streaming in responses',
},
'verbose': {
alias: 'V',
type: 'boolean',
describe: 'Enable verbose output',
},
};