Repository: confident-ai/deepeval
Issue: json.dumps in ToolCall.__repr__ needs ensure_ascii=False for Chinese characters
Root cause: Validation Gap

# 🐛 Bug Report: Chinese characters converted to Unicode escape sequences in ToolCall `__repr__` method

**❗BEFORE YOU BEGIN❗**
Are you on discord? 🤗 We'd love to have you asking questions on discord instead: https://discord.com/invite/a3K9c8GRGt

## **Describe the bug**
In the `ToolCall` class's `__repr__` method, when `input_parameters` or `output` fields contain Chinese characters, `json.dumps()` converts Chinese characters to Unicode escape sequences (like `\u4e2d\u6587`), making the output unreadable.

## **To Reproduce**
Steps to reproduce the behavior:
1. Create a `ToolCall` instance containing Chinese characters
2. Call the `repr()` method or print the instance directly
3. Observe that Chinese characters are converted to Unicode escape sequences in the output

```python
from deepeval.test_case import ToolCall

# Create ToolCall with Chinese characters
tool_call = ToolCall(
    name="测试工具",
    input_parameters={"查询": "你好世界", "类型": "问候"},
    output={"回复": "你好！很高兴见到你"}
)

# Print repr, will see Chinese converted to Unicode
print(repr(tool_call))
```

**Actual output:**
```
ToolCall(
    name="测试工具",
    input_parameters={
        "\u67e5\u8be2": "\u4f60\u597d\u4e16\u754c",
        "\u7c7b\u578b": "\u95ee\u5019"
    },
    output={
        "\u56de\u590d": "\u4f60\u597d\uff01\u5f88\u9ad8\u5174\u89c1\u5230\u4f60"
    }
)
```

## **Expected behavior**
Chinese characters should maintain their original form instead of being converted to Unicode escape sequences:

```
ToolCall(
    name="测试工具",
    input_parameters={
        "查询": "你好世界",
        "类型": "问候"
    },
    output={
        "回复": "你好！很高兴见到你"
    }
)
```

## **Root Cause**
In the `ToolCall.__repr__()` method in `deepeval/test_case/llm_test_case.py`:

**Lines 120-125:**
```python
if self.input_parameters:
    formatted_input = json.dumps(self.input_parameters, indent=4)  # Missing ensure_ascii=False
```

**Lines 129-131:**
```python
if isinstance(self.output, dict):
    formatted_output = json.dumps(self.output, indent=4)  # Missing ensure_ascii=False
```

## **Suggested Solution**
Add `ensure_ascii=False` parameter to the `json.dumps()` calls:

```python
# Fix input_parameters
if self.input_parameters:
    formatted_input = json.dumps(self.input_parameters, indent=4, ensure_ascii=False)
    
# Fix output
if isinstance(self.output, dict):
    formatted_output = json.dumps(self.output, indent=4, ensure_ascii=False)
```

## **Desktop (please complete the following information):**
- **OS**: Windows 11
- **Python Version**: 3.9+
- **DeepEval Version**: Latest
- **Affected File**: `deepeval/test_case/llm_test_case.py`

## **Impact**
This issue affects all users who use `ToolCall` instances containing non-ASCII characters (especially Chinese, Japanese, Korean, etc.), making debugging and log output unreadable.

## **Additional context**
This is a relatively simple fix that only requires adding the `ensure_ascii=False` parameter to two `json.dumps()` calls, and will not affect existing functionality.


@danerlt merged, thank you!

hey @danerlt its released!