Skip to content

Commit c4d1b5a

Browse files
committed
server: bench: fix assistant message sent instead of user message
1 parent ba7114c commit c4d1b5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/server/bench/script.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ const data = new SharedArray('conversations', function () {
3434
return JSON.parse(open(dataset_path))
3535
// Filter out the conversations with less than 2 turns.
3636
.filter(data => data["conversations"].length >= 2)
37-
// Only keep the first two turns of each conversation.
37+
.filter(data => data["conversations"][0]["from"] === "human")
3838
.map(data => {
3939
return {
40-
prompt: data["conversations"][1]["value"],
40+
prompt: data["conversations"][0]["value"],
4141
n_prompt_tokens: tokenizer(data["conversations"][0]["value"]).length,
4242
n_completion_tokens: tokenizer(data["conversations"][1]["value"]).length,
4343
}

0 commit comments

Comments
 (0)