From 9e8a5481cf9aa4dfd75d5c55c003b3813ccbca1e Mon Sep 17 00:00:00 2001 From: sigoden Date: Fri, 3 Mar 2023 09:15:58 +0800 Subject: feat: support save chat messages to file --- src/config.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/config.rs') diff --git a/src/config.rs b/src/config.rs index c42b11b..c99a6ef 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,4 +1,7 @@ -use std::{fs::read_to_string, path::Path}; +use std::{ + fs::read_to_string, + path::{Path, PathBuf}, +}; use anyhow::{anyhow, Result}; use serde::Deserialize; @@ -9,6 +12,8 @@ pub struct Config { pub api_key: String, /// What sampling temperature to use, between 0 and 2 pub temperature: Option, + /// Specify a file path to save chat messages to + pub save_path: Option, /// Set proxy pub proxy: Option, /// Used only for debugging -- cgit v1.2.3