Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Add GPT-4o model (with caveats) #6

Merged
merged 5 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ you can set their paths and filenames via `HEY_CONFIG_PATH`, `HEY_CONFIG_FILENAM

## config file reference
```toml
model = "Claude" # or "GPT3"
model = "Claude" # or "GPT4OMini"
tos = false # whether if you agree to ddg chat tos
```

Expand Down
7 changes: 4 additions & 3 deletions src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ impl Cache {
}

pub fn get_last_vqd<'a, T: From<&'a String>>(self: &'a Self) -> Option<T> {
if self.last_vqd_time - (chrono::Local::now().timestamp_millis() as u64) < 60000 {
None
/*if self.last_vqd_time - (chrono::Local::now().timestamp_millis() as u64) < 60000 {
Ahmad-A0 marked this conversation as resolved.
Show resolved Hide resolved
Some((&self.last_vqd).into())
} else {
None
}
} */
}
}
}
8 changes: 5 additions & 3 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@ pub enum Model {
// outdated
Claude12,
GPT35,
GPT3,

// current
Claude,
GPT3,
GPT4OMini,
Llama,
Mixtral
}
Expand All @@ -25,7 +26,8 @@ impl ToString for Model {
Self::Claude => String::from("claude-3-haiku-20240307"),
Self::GPT3 => String::from("gpt-3.5-turbo-0125"),
Self::Llama => String::from("meta-llama/Llama-3-70b-chat-hf"),
Self::Mixtral => String::from("mistralai/Mixtral-8x7B-Instruct-v0.1")
Self::Mixtral => String::from("mistralai/Mixtral-8x7B-Instruct-v0.1"),
Self::GPT4OMini => String::from("gpt-4o-mini")
}
}
}
Expand Down Expand Up @@ -92,4 +94,4 @@ impl Config {
Ok(conf)
}
}
}
}
Loading