> ## 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

> TokenLabモデルに対してPromptfooの評価を実行する

## 概要

Promptfooは、OpenAI互換のchatおよびResponsesプロバイダーを通じてTokenLabを評価できます。

<Note>
  **タイプ**: 評価フレームワーク

  **主要パス**: OpenAI互換のchat completionsおよびResponses

  **サポート信頼度**: サポート済みパス
</Note>

## 環境

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

## 設定例

```yaml theme={null}
description: TokenLabプロバイダーの例

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
```

## 実行

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

幅広い互換性が必要な場合はchatプロバイダーを使用してください。評価がResponsesの動作に特化して依存している場合は、Responsesプロバイダーを使用してください。
