Repository: modelscope/evalscope
Issue: 输入+输出总tokens超过模型最长上下文长度
Root cause: Validation Gap

## 自查清单

在提交 issue 之前，请确保您已完成以下步骤:
- [x] 我已仔细阅读了[相关使用说明文档](https://evalscope.readthedocs.io/zh-cn/latest/get_started/parameters.html)
- [x] 我已查看了[常见问题解答](https://evalscope.readthedocs.io/zh-cn/latest/get_started/faq.html)
- [x] 我已搜索并查看了现有的 issues，确认这不是一个重复的问题

## 问题描述

评测BFCL-v3的multi_turn_long_context指标时，报输入+输出总tokens超过模型最长上下文长度。如果模型的上下文长度不足，是否可以认为这一条用例执行失败，而不是整个评测过程中断报错？


## EvalScope 版本（必填）
最新版本

## 使用的工具
- [ ] Native / 原生框架


## 执行的代码或指令


## 错误日志

"} prediction failed: due to Requested token count exceeds the model's maximum context length of 196608 tokens. You requested a total of 196630 tokens: 192534 tokens from the input messages and 4096 tokens for the completion. Please reduce the number of tokens in the input messages or the completion to fit within the limit."
"Traceback:"
"Traceback (most recent call last):"
"  File \"/usr/local/lib/python3.10/dist-packages/evalscope/utils/function_utils.py\", line 257, in run_in_threads_with_progress"
"    res = future.result()"
"  File \"/usr/lib/python3.10/concurrent/futures/_base.py\", line 451, in result"
"    return self.__get_result()"
"  File \"/usr/lib/python3.10/concurrent/futures/_base.py\", line 403, in __get_result"
"    raise self._exception"
"  File \"/usr/lib/python3.10/concurrent/futures/thread.py\", line 58, in run"
"    result = self.fn(*self.args, **self.kwargs)"
"  File \"/usr/local/lib/python3.10/dist-packages/evalscope/evaluator/evaluator.py\", line 183, in worker"
"    return self._predict_sample(sample, model_prediction_dir)"
"  File \"/usr/local/lib/python3.10/dist-packages/evalscope/evaluator/evaluator.py\", line 225, in _predict_sample"
"    task_state = self.benchmark.run_inference(model=self.model, sample=sample, output_dir=model_prediction_dir)"
"  File \"/usr/local/lib/python3.10/dist-packages/evalscope/api/benchmark/adapters/default_data_adapter.py\", line 453, in run_inference"
"    model_output = self._on_inference(model, sample)"
"  File \"/usr/local/lib/python3.10/dist-packages/evalscope/benchmarks/bfcl/v3/bfcl_v3_adapter.py\", line 131, in _on_inference"
"    return predict(model, sample)"
"  File \"/usr/local/lib/python3.10/dist-packages/evalscope/benchmarks/bfcl/v3/generation.py\", line 21, in predict"
"    response, model_usage = generate_turn_with_tools(model, row)"
  File \"/usr/local/lib/python3.10/dist-packages/evalscope/benchmarks/bfcl/v3/generation.py\", line 170, in generate_turn_with_tools"
"    model_output = model.generate(current_sample.input, tools=current_sample.tools)"
"  File \"/usr/local/lib/python3.10/dist-packages/evalscope/api/model/model.py\", line 198, in generate"
"    output = self.api.generate("
"  File \"/usr/local/lib/python3.10/dist-packages/evalscope/models/openai_compatible.py\", line 101, in generate"
    completion = collect_stream_response(completion)"
"  File \"/usr/local/lib/python3.10/dist-packages/evalscope/models/utils/openai.py\", line 625, in collect_stream_response"
"    for chunk in response_stream:"
"  File \"/usr/local/lib/python3.10/dist-packages/openai/_streaming.py\", line 46, in __iter__"
"    for item in self._iterator:"
  File \"/usr/local/lib/python3.10/dist-packages/openai/_streaming.py\", line 92, in __stream__"
"    raise APIError("
"openai.APIError: Requested token count exceeds the model's maximum context length of 196608 tokens. You requested a total of 196630 tokens: 192534 tokens from the input messages and 4096 tokens for the completion. Please reduce the number of tokens in the input messages or the completion to fit within the limit."
"\x1b[0m"

## 运行环境

- 操作系统：Linux
- Python版本：3.10

## 其他信息

如果有其他相关信息，请在此处提供。


加上 `--ignore-errors` 参数可以跳过出错的样本