Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions docs/ja/realtime/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ search:
---
# クイックスタート

Realtime エージェントを使用すると、OpenAI の Realtime API を使って AI エージェントと音声会話ができます。このガイドでは、最初の realtime 音声エージェントを作成する手順を説明します。
Realtime エージェントを使うと、OpenAI の Realtime API を使用して AI エージェントと音声会話できます。このガイドでは、最初の realtime 音声エージェントを作成する手順を説明します。

!!! warning "ベータ機能"
Realtime エージェントはベータ版です。実装を改善する過程で、破壊的変更が入る可能性があります
Realtime エージェントはベータ版です。実装の改善に伴い、破壊的変更が発生する可能性があります

## 前提条件

- Python 3.9 以上
- Python 3.10 以上
- OpenAI API キー
- OpenAI Agents SDK の基本的な理解

Expand Down Expand Up @@ -41,7 +41,7 @@ agent = RealtimeAgent(
)
```

### 3. Runner の設定
### 3. ランナーの設定

```python
runner = RealtimeRunner(
Expand Down Expand Up @@ -204,14 +204,14 @@ if __name__ == "__main__":

### ターン検出

- `type`: 検出方式(`server_vad`、`semantic_vad`)
- `threshold`: 音声活動のしきい値(0.0-1.0)
- `type`: 検出方法(`server_vad`、`semantic_vad`)
- `threshold`: 音声アクティビティのしきい値(0.0-1.0)
- `silence_duration_ms`: ターン終了を検出する無音時間
- `prefix_padding_ms`: 発話前の音声パディング

## 次のステップ

- [realtime エージェントの詳細](guide.md)
- [Realtime エージェントについて詳しく見る](guide.md)
- [examples/realtime](https://github.com/openai/openai-agents-python/tree/main/examples/realtime) フォルダーの動作する例を確認する
- エージェントにツールを追加する
- エージェント間のハンドオフを実装する
Expand All @@ -225,15 +225,15 @@ if __name__ == "__main__":
export OPENAI_API_KEY="your-api-key-here"
```

または、セッション作成時に直接渡します
または、セッション作成時に直接渡してください

```python
session = await runner.run(model_config={"api_key": "your-api-key"})
```

## Azure OpenAI エンドポイント形式

OpenAI のデフォルトエンドポイントではなく Azure OpenAI に接続する場合は、`model_config["url"]` に GA Realtime URL を渡し、認証ヘッダーを明示的に設定してください。
OpenAI のデフォルトのエンドポイントではなく Azure OpenAI に接続する場合は、`model_config["url"]` に GA Realtime URL を渡し、認証ヘッダーを明示的に設定してください。

```python
session = await runner.run(
Expand All @@ -244,7 +244,7 @@ session = await runner.run(
)
```

ベアラートークンも使用できます
Bearer トークンも使用できます

```python
session = await runner.run(
Expand All @@ -255,4 +255,4 @@ session = await runner.run(
)
```

realtime エージェントでは、レガシーなベータパス(`/openai/realtime?api-version=...`)の使用は避けてください。SDK は GA Realtime インターフェースを想定しています。
Realtime エージェントでは、レガシーのベータ版パス(`/openai/realtime?api-version=...`)の使用は避けてください。SDK は GA Realtime インターフェースを想定しています。
34 changes: 17 additions & 17 deletions docs/ko/realtime/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ search:
---
# 빠른 시작

실시간 에이전트를 사용하면 OpenAI의 Realtime API로 AI 에이전트와 음성 대화를 할 수 있습니다. 이 가이드에서는 첫 번째 실시간 음성 에이전트를 만드는 과정을 안내합니다.
실시간 에이전트를 사용하면 OpenAI의 Realtime API로 AI 에이전트와 음성 대화를 할 수 있습니다. 이 가이드는 첫 실시간 음성 에이전트를 만드는 과정을 안내합니다.

!!! warning "베타 기능"
실시간 에이전트는 베타 버전입니다. 구현을 개선하는 과정에서 일부 호환성이 깨지는 변경이 있을 수 있습니다.
실시간 에이전트는 베타입니다. 구현을 개선하는 과정에서 일부 파괴적 변경이 있을 수 있습니다.

## 사전 준비 사항

- Python 3.9 이상
- Python 3.10 이상
- OpenAI API 키
- OpenAI Agents SDK에 대한 기본적인 이해

Expand All @@ -32,7 +32,7 @@ import asyncio
from agents.realtime import RealtimeAgent, RealtimeRunner
```

### 2. 실시간 에이전트 생성하기
### 2. 실시간 에이전트 만들기

```python
agent = RealtimeAgent(
Expand Down Expand Up @@ -111,7 +111,7 @@ def _truncate_str(s: str, max_length: int) -> str:

## 전체 예제

다음은 완전하게 동작하는 전체 예제입니다:
다음은 완전히 동작하는 전체 예제입니다:

```python
import asyncio
Expand Down Expand Up @@ -192,9 +192,9 @@ if __name__ == "__main__":

### 모델 설정

- `model_name`: 사용 가능한 실시간 모델에서 선택하세요(예: `gpt-realtime`)
- `voice`: 음성 선택(`alloy`, `echo`, `fable`, `onyx`, `nova`, `shimmer`)
- `modalities`: 텍스트 또는 오디오 활성화(`["text"]` 또는 `["audio"]`)
- `model_name`: 사용 가능한 실시간 모델에서 선택합니다(예: `gpt-realtime`)
- `voice`: 음성을 선택합니다(`alloy`, `echo`, `fable`, `onyx`, `nova`, `shimmer`)
- `modalities`: 텍스트 또는 오디오를 활성화합니다(`["text"]` 또는 `["audio"]`)

### 오디오 설정

Expand All @@ -205,35 +205,35 @@ if __name__ == "__main__":
### 턴 감지

- `type`: 감지 방식(`server_vad`, `semantic_vad`)
- `threshold`: 음성 활동 임곗값(0.0-1.0)
- `threshold`: 음성 활동 임계값(0.0-1.0)
- `silence_duration_ms`: 턴 종료를 감지하기 위한 무음 지속 시간
- `prefix_padding_ms`: 발화 이전 오디오 패딩
- `prefix_padding_ms`: 발화 오디오 패딩

## 다음 단계

- [실시간 에이전트 더 알아보기](guide.md)
- [examples/realtime](https://github.com/openai/openai-agents-python/tree/main/examples/realtime) 폴더의 동작 예제를 확인하세요
- [실시간 에이전트에 대해 더 알아보기](guide.md)
- [examples/realtime](https://github.com/openai/openai-agents-python/tree/main/examples/realtime) 폴더의 동작하는 예제를 확인하세요
- 에이전트에 도구 추가하기
- 에이전트 간 핸드오프 구현하기
- 안전을 위한 가드레일 설정하기

## 인증

환경 변수에 OpenAI API 키가 설정되어 있는지 확인하세요:
환경에 OpenAI API 키가 설정되어 있는지 확인하세요:

```bash
export OPENAI_API_KEY="your-api-key-here"
```

또는 세션을 생성할 때 직접 전달할 수도 있습니다:
또는 세션을 만들 때 직접 전달할 수도 있습니다:

```python
session = await runner.run(model_config={"api_key": "your-api-key"})
```

## Azure OpenAI 엔드포인트 형식

OpenAI 기본 엔드포인트 대신 Azure OpenAI에 연결하는 경우,
OpenAI의 기본 엔드포인트 대신 Azure OpenAI에 연결하는 경우,
`model_config["url"]`에 GA Realtime URL을 전달하고 인증 헤더를 명시적으로 설정하세요.

```python
Expand All @@ -245,7 +245,7 @@ session = await runner.run(
)
```

Bearer 토큰도 사용할 있습니다:
베어러 토큰을 사용할 수도 있습니다:

```python
session = await runner.run(
Expand All @@ -256,4 +256,4 @@ session = await runner.run(
)
```

실시간 에이전트와 함께 레거시 베타 경로(`/openai/realtime?api-version=...`)를 사용하는 것은 피하세요. SDK는 GA Realtime 인터페이스를 기대합니다.
실시간 에이전트에서는 레거시 베타 경로(`/openai/realtime?api-version=...`) 사용을 피하세요. SDK는 GA Realtime 인터페이스를 기대합니다.
29 changes: 15 additions & 14 deletions docs/zh/realtime/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ search:
---
# 快速入门

Realtime 智能体支持使用 OpenAI 的 Realtime API 与你的 AI 智能体进行语音对话。本指南将带你创建第一个 realtime 语音智能体
Realtime 智能体使你能够使用 OpenAI 的 Realtime API 与你的 AI 智能体进行语音对话。本指南将带你创建第一个实时语音智能体

!!! warning "Beta 功能"
Realtime 智能体目前处于 beta 阶段。随着我们改进实现,可能会出现一些破坏性变更
Realtime 智能体处于 beta 阶段。随着我们改进实现,预计会有一些破坏性变更

## 前置条件

- Python 3.9 或更高版本
- Python 3.10 或更高版本
- OpenAI API key
- 对 OpenAI Agents SDK 的基本了解

Expand All @@ -23,7 +23,7 @@ Realtime 智能体目前处于 beta 阶段。随着我们改进实现,可能
pip install openai-agents
```

## 创建你的第一个 realtime 智能体
## 创建你的第一个实时智能体

### 1. 导入所需组件

Expand All @@ -32,7 +32,7 @@ import asyncio
from agents.realtime import RealtimeAgent, RealtimeRunner
```

### 2. 创建一个 realtime 智能体
### 2. 创建一个实时智能体

```python
agent = RealtimeAgent(
Expand Down Expand Up @@ -192,14 +192,14 @@ if __name__ == "__main__":

### 模型设置

- `model_name`: 从可用的 realtime 模型中选择(例如 `gpt-realtime`)
- `model_name`: 从可用的 realtime 模型中选择(例如`gpt-realtime`)
- `voice`: 选择声音(`alloy`、`echo`、`fable`、`onyx`、`nova`、`shimmer`)
- `modalities`: 启用文本或音频(`["text"]` 或 `["audio"]`)

### 音频设置

- `input_audio_format`: 输入音频的格式(`pcm16`、`g711_ulaw`、`g711_alaw`)
- `output_audio_format`: 输出音频的格式
- `input_audio_format`: 输入音频格式(`pcm16`、`g711_ulaw`、`g711_alaw`)
- `output_audio_format`: 输出音频格式
- `input_audio_transcription`: 转写配置

### 轮次检测
Expand All @@ -213,9 +213,9 @@ if __name__ == "__main__":

- [了解更多 realtime 智能体](guide.md)
- 查看 [examples/realtime](https://github.com/openai/openai-agents-python/tree/main/examples/realtime) 文件夹中的可运行示例
- 为你的智能体添加工具调用
- 实现智能体之间的任务转移
- 为安全设置安全防护措施
- 为你的智能体添加 tools
- 在智能体之间实现 handoffs
- 设置 guardrails 以确保安全

## 身份验证

Expand All @@ -233,8 +233,8 @@ session = await runner.run(model_config={"api_key": "your-api-key"})

## Azure OpenAI 端点格式

如果你连接的是 Azure OpenAI 而不是 OpenAI 的默认端点,请在
`model_config["url"]` 中传入 GA Realtime URL,并显式设置认证 headers。
如果你连接的是 Azure OpenAI而不是 OpenAI 的默认端点,请在
`model_config["url"]` 中传入 GA Realtime URL,并显式设置 auth headers。

```python
session = await runner.run(
Expand All @@ -256,4 +256,5 @@ session = await runner.run(
)
```

避免在 realtime 智能体中使用旧版 beta 路径(`/openai/realtime?api-version=...`)。SDK 期望使用 GA Realtime 接口。
避免在 realtime 智能体中使用旧版 beta 路径(`/openai/realtime?api-version=...`)。该
SDK 期望使用 GA Realtime 接口。