Skip to content

Commit

Permalink
test: provide stop sequence for test inference request
Browse files Browse the repository at this point in the history
  • Loading branch information
moldhouse committed Aug 12, 2024
1 parent e30a6e6 commit 997c6cd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,11 @@ async fn complete_structured_prompt() {
async fn context_window_stopping() {
// Given
let prompt = "Bot: Hello user!\nUser: Hello Bot, how are you doing?\nBot:";
let stopping = Stopping::NO_TOKEN_LIMIT;
let var_name = Stopping {
maximum_tokens: None,
stop_sequences: &["User"],
};
let stopping = var_name;

// When
let task = TaskCompletion {
Expand All @@ -211,6 +215,7 @@ async fn context_window_stopping() {

// Then
assert!(!response.completion.is_empty());
assert_eq!(response.completion, " I am doing fine, how are you?\n");
}

#[tokio::test]
Expand Down

0 comments on commit 997c6cd

Please sign in to comment.