Repository: promptfoo/promptfoo
Issue: rouge-n-assertions may cause an js error for a test cases
Root cause: External Dependency Breakage

With promptfoo version either 0.57.1 or 0.49

The error has never been encountered with English input, but it occurs with about an 80% probability with Chinese input.
And the same error occurs when using another provider such as Gemini.

![Image 1](https://github.com/promptfoo/promptfoo/assets/11830576/0282d89c-13c3-484a-b4af-1fa78ce300f1)

### Demo:
* test.yaml:
```

providers:
  - id: openai:gpt-3.5-turbo
    config:
      temperature: 0.7

prompts:
  - "Revise the following text as short as you can while keeping the original language.:\n\n{{ input }}"

tests:
  - vars:
      input: "一個句子。"
    assert:
      - type: rouge-n
        value:
          - "一個句子"
        threshold: 0.1
  - vars:
      input: "國道警察大甲分隊調查，前天夜間巡邏車在國道三號大甲路段，發現一部轎車沿途左右搖擺不穩，且違規任意變換車道"
    assert:
      - type: rouge-n
        value: "國道三號大甲路段危險駕駛"
        threshold: 0.1
  - vars:
      input: "台北捷運文湖線上下班時常擠爆，為了提升文湖線尖峰時段運能，台北捷運公司還將部分車廂的座椅及行李架全數拆除。"
    assert:
      - type: rouge-n
        value:
          - "台北捷運公司為提升文湖線運能，拆除部分車廂設施。"
        threshold: 0.1
```

* `--output result.json`: [result.json](https://github.com/promptfoo/promptfoo/files/15197041/result.json)

* console output with `--verbose`:
```
Reading prompts from ["Revise the following text as short as you can while keeping the original language.:\n\n{{ input }}"]
Expanded prompt Revise the following text as short as you can while keeping the original language.:

{{ input }} to /singlesrc/syno-ai-proxy/prompt-evaluation/Revise the following text as short as you can while keeping the original language.:

{{ input }} and then to []
Resolved prompt paths: [{"raw":"Revise the following text as short as you can while keeping the original language.:\n\n{{ input }}","resolved":"/singlesrc/syno-ai-proxy/prompt-evaluation/Revise the following text as short as you can while keeping the original language.:\n\n{{ input }}"}]
Calling OpenAI API: {"model":"gpt-3.5-turbo","messages":[{"role":"user","content":"Revise the following text as short as you can while keeping the original language.:\n\n一個句子。"}],"seed":0,"max_tokens":1024,"temperature":0.7,"top_p":1,"presence_penalty":0,"frequency_penalty":0}
Calling OpenAI API: {"model":"gpt-3.5-turbo","messages":[{"role":"user","content":"Revise the following text as short as you can while keeping the original language.:\n\n國道警察大甲分隊調查，前天夜間巡邏車在國道三號大甲路段，發現一部轎車沿途左右搖擺不穩，且違規任意變換車道"}],"seed":0,"max_tokens":1024,"temperature":0.7,"top_p":1,"presence_penalty":0,"frequency_penalty":0}
Calling OpenAI API: {"model":"gpt-3.5-turbo","messages":[{"role":"user","content":"Revise the following text as short as you can while keeping the original language.:\n\n台北捷運文湖線上下班時常擠爆，為了提升文湖線尖峰時段運能，台北捷運公司還將部分車廂的座椅及行李架全數拆除。"}],"seed":0,"max_tokens":1024,"temperature":0.7,"top_p":1,"presence_penalty":0,"frequency_penalty":0}
        OpenAI chat completions API response: {"id":"...","object":"chat.completion","created":1714719015,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"message":{"role":"assistant","content":"一句话。"},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":31,"completion_tokens":5,"total_tokens":36},"system_fingerprint":"fp_a450710239"}
Eval #1 complete (1 of 3)
        OpenAI chat completions API response: {"id":"...","object":"chat.completion","created":1714719015,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"message":{"role":"assistant","content":"台北捷運文湖線尖峰時段擁擠，為提升運能，公司拆除部分車廂座椅及行李架。"},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":109,"completion_tokens":59,"total_tokens":168},"system_fingerprint":"fp_3b956da36b"}
Eval #3 complete (2 of 3)
        OpenAI chat completions API response: {"id":"...","object":"chat.completion","created":1714719015,"model":"gpt-3.5-turbo-0125","choices":[{"index":0,"message":{"role":"assistant","content":"國道警察大甲分隊前天晚上在國道三號大甲路段巡邏時，發現一部轎車左右搖擺不穩，並違規變換車道。"},"logprobs":null,"finish_reason":"stop"}],"usage":{"prompt_tokens":109,"completion_tokens":74,"total_tokens":183},"system_fingerprint":"fp_3b956da36b"}
Eval #2 complete (3 of 3)
```

Thanks for flagging. #764 should fix this.  

It looks like the `rouge` package was not correctly documented, both in terms of the README of the package itself and the type definitions that I wrote for it.  I've upgraded the package, but it looks like the new version only supports string reference values, not arrays of strings.

This is done in 0.58.0