| 269 | } |
| 270 | exports.run = run; |
| 271 | function getOptimalConfig(model, sources, extensions) { |
| 272 | const config = { |
| 273 | model, |
| 274 | sources, |
| 275 | extensions, |
| 276 | temperature: 0.2 |
| 277 | }; |
| 278 | if (model.startsWith('gpt-3.5-turbo-16k')) { |
| 279 | config.max_input_tokens = 12000; |
| 280 | config.max_tokens = 3000; |
| 281 | } |
| 282 | else if (model.startsWith('gpt-3.5-turbo-instruct')) { |
| 283 | throw new Error(`The 'gpt-3.5-turbo-instruct' model is not yet supported.`); |
| 284 | } |
| 285 | else if (model.startsWith('gpt-3.5-turbo')) { |
| 286 | config.max_input_tokens = 3000; |
| 287 | config.max_tokens = 800; |
| 288 | } |
| 289 | else if (model.startsWith('gpt-4-32k')) { |
| 290 | config.max_input_tokens = 24000; |
| 291 | config.max_tokens = 6000; |
| 292 | } |
| 293 | else if (model.startsWith('gpt-4')) { |
| 294 | config.max_input_tokens = 6000; |
| 295 | config.max_tokens = 1500; |
| 296 | } |
| 297 | else { |
| 298 | throw new Error(`The '${model}' model is not yet supported.`); |
| 299 | } |
| 300 | return config; |
| 301 | } |
| 302 | //# sourceMappingURL=codepilot-cli.js.map |