Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

Commit

Permalink
fix: don't borrow str
Browse files Browse the repository at this point in the history
  • Loading branch information
zurawiki committed Mar 5, 2023
1 parent fe33608 commit 2c3a355
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prompt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub(crate) async fn chat_completion(
}
let request = request.messages(messages);

let max_tokens = model_name_to_context_size(&model) - count_tokens(prompt)?;
let max_tokens = model_name_to_context_size(model) - count_tokens(prompt)?;
let max_tokens = cli.max_tokens.unwrap_or(max_tokens);
let request = request.max_tokens(max_tokens);

Expand Down

0 comments on commit 2c3a355

Please sign in to comment.