Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
antimonyGu committed Oct 22, 2024
1 parent 2b9fd99 commit 35166a8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions crates/tabby-common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use lazy_static::lazy_static;
use serde::{Deserialize, Serialize};
use tracing::debug;
use crate::config;
use std::process;

use crate::{
api::code::CodeSearchParams,
Expand Down Expand Up @@ -63,8 +64,8 @@ impl Config {
)
.print();
}

if let Err(e) = cfg.validate_models() {
if let Err(e) = cfg.validate_config() {
cfg = Default::default();
InfoMessage::new(
"Parsing config failed",
Expand All @@ -79,6 +80,7 @@ impl Config {
],
)
.print();
process::exit(1);
}

Ok(cfg)
Expand All @@ -101,7 +103,7 @@ impl Config {
Ok(())
}

fn validate_models(&self) -> Result<()> {
fn validate_config(&self) -> Result<()> {
Self::validate_model_config(&self.model.completion)?;
Self::validate_model_config(&self.model.chat)?;

Expand Down

0 comments on commit 35166a8

Please sign in to comment.