Skip to content

Commit

Permalink
Don't require quotes around the prompt arg, allow multiple args to be…
Browse files Browse the repository at this point in the history
… joined with " "
  • Loading branch information
ndbroadbent authored and m1guelpf committed Dec 16, 2022
1 parent 9df89c2 commit 0e63ceb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::{env, process::Command};
#[command(author, version, about, long_about = None)]
struct Cli {
/// Description of the command to execute
prompt: String,
prompt: Vec<String>,

/// Run the generated program without asking for confirmation
#[clap(short = 'y', long)]
Expand All @@ -38,7 +38,7 @@ fn main() {
"presence_penalty": 0,
"frequency_penalty": 0,
"model": "text-davinci-003",
"prompt": format!("{}:\n```bash\n#!/bin/bash\n", cli.prompt),
"prompt": format!("{}:\n```bash\n#!/bin/bash\n", cli.prompt.join(" ")),
}))
.header("Authorization", format!("Bearer {}", api_key))
.send()
Expand Down

0 comments on commit 0e63ceb

Please sign in to comment.