Added chroot support.
This commit is contained in:
10
src/setup.rs
10
src/setup.rs
@@ -23,6 +23,14 @@ pub(crate) struct Args {
|
||||
/// Base URL for the LLM API to use.
|
||||
pub(crate) base_url: Option<String>,
|
||||
|
||||
/// Directory to use for chroot (recommended).
|
||||
#[arg(long)]
|
||||
pub(crate) chroot_dir: Option<String>,
|
||||
|
||||
/// Root directory for file based command structure.
|
||||
#[arg(long)]
|
||||
pub(crate) command_dir: Option<String>,
|
||||
|
||||
#[arg(long)]
|
||||
/// Instructions to the model on how to behave.
|
||||
pub(crate) intruct: Option<String>,
|
||||
@@ -93,6 +101,8 @@ pub async fn init() -> Result<Setup> {
|
||||
// but a derive macro could do this a bit better if this becomes too large.
|
||||
.set_override_option("api-key", args.api_key.clone())?
|
||||
.set_override_option("base-url", args.base_url.clone())?
|
||||
.set_override_option("chroot-dir", args.chroot_dir.clone())?
|
||||
.set_override_option("command-path", args.command_dir.clone())?
|
||||
.set_override_option("model", args.model.clone())?
|
||||
.set_override_option("instruct", args.model.clone())?
|
||||
.set_override_option("channels", args.channels.clone())?
|
||||
|
||||
Reference in New Issue
Block a user