Skip to content

Commit

Permalink
allow commands in image caption, add LFM model
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckyBlender committed Oct 16, 2024
1 parent 43dd1d1 commit ccd5429
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 170 deletions.
3 changes: 2 additions & 1 deletion src/apis/openai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ impl OpenAIClient {

fn get_model_and_provider(model: &BotCommand, image: bool) -> (String, Providers) {
match model {
BotCommand::Lfm => ("liquid/lfm-40b:free".to_string(), Providers::OpenRouter),
BotCommand::Llama => {
if image {
(
Expand Down Expand Up @@ -79,7 +80,7 @@ impl OpenAIClient {
fn get_system_prompt(model: &BotCommand) -> Option<&'static str> {
match model {
BotCommand::Caveman => Some("You are a caveman. Speak like a caveman would. All caps, simple words, grammar mistakes etc."),
BotCommand::Llama | BotCommand::Lobotomy | BotCommand::Llama405 => Some("Be concise and precise. Don't be verbose. Answer in the user's language."),
BotCommand::Llama | BotCommand::Lobotomy | BotCommand::Llama405 | BotCommand::Lfm => Some("Be concise and precise. Don't be verbose. Answer in the user's language."),
BotCommand::Help | BotCommand::Start | BotCommand::Flux => unreachable!(),
}
}
Expand Down
Loading

0 comments on commit ccd5429

Please sign in to comment.