server: bench: fix assistant message sent instead of user message
This commit is contained in:
parent
ba7114c0e8
commit
c4d1b5aaf1
1 changed files with 2 additions and 2 deletions
|
@ -34,10 +34,10 @@ const data = new SharedArray('conversations', function () {
|
|||
return JSON.parse(open(dataset_path))
|
||||
// Filter out the conversations with less than 2 turns.
|
||||
.filter(data => data["conversations"].length >= 2)
|
||||
// Only keep the first two turns of each conversation.
|
||||
.filter(data => data["conversations"][0]["from"] === "human")
|
||||
.map(data => {
|
||||
return {
|
||||
prompt: data["conversations"][1]["value"],
|
||||
prompt: data["conversations"][0]["value"],
|
||||
n_prompt_tokens: tokenizer(data["conversations"][0]["value"]).length,
|
||||
n_completion_tokens: tokenizer(data["conversations"][1]["value"]).length,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue