> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenlab.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Promptfoo

> Chạy các đánh giá Promptfoo với các mô hình TokenLab

## Tổng quan

Promptfoo có thể đánh giá TokenLab thông qua các nhà cung cấp (provider) chat và Responses tương thích với OpenAI.

<Note>
  **Loại**: Khung đánh giá (Evaluation Framework)

  **Các đường dẫn chính**: Chat completions và Responses tương thích với OpenAI

  **Độ tin cậy hỗ trợ**: Đường dẫn được hỗ trợ
</Note>

## Môi trường

```bash theme={null}
export TOKENLAB_API_KEY="sk-your-tokenlab-key"
```

## Cấu hình ví dụ

```yaml theme={null}
description: TokenLab provider example

prompts:
  - 'Answer in one concise paragraph: {{question}}'

providers:
  - id: openai:chat:gpt-5.4-mini
    label: tokenlab-chat-gpt-5.4-mini
    config:
      apiBaseUrl: https://api.tokenlab.sh/v1
      apiKey: '{{env.TOKENLAB_API_KEY}}'
  - id: openai:responses:gpt-5.5
    label: tokenlab-responses-gpt-5.5
    config:
      apiBaseUrl: https://api.tokenlab.sh/v1
      apiKey: '{{env.TOKENLAB_API_KEY}}'

tests:
  - vars:
      question: What are two practical ways to evaluate an LLM gateway?
    assert:
      - type: contains-any
        value:
          - latency
          - reliability
          - cost
          - quality
```

## Chạy đánh giá

```bash theme={null}
promptfoo eval
```

Hãy sử dụng các nhà cung cấp chat để có khả năng tương thích rộng rãi. Sử dụng các nhà cung cấp Responses khi việc đánh giá phụ thuộc cụ thể vào hành vi của Responses.
