mirror of
https://github.com/langgenius/dify-docs.git
synced 2026-03-27 13:28:32 +07:00
* Batch update service apis * final check and add zh/ja docs * add temporary redirects for changed api links embedded in the product * Restore original operationIds to preserve SDK compatibility Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * complete the missing descriptions * correct the human input terminology --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2542 lines
95 KiB
JSON
2542 lines
95 KiB
JSON
{
|
||
"openapi": "3.0.1",
|
||
"info": {
|
||
"title": "Completion アプリ API",
|
||
"description": "テキスト生成アプリケーションはセッションなしで動作し、翻訳、記事作成、要約 AI などに最適です。",
|
||
"version": "1.0.0"
|
||
},
|
||
"servers": [
|
||
{
|
||
"url": "{api_base_url}",
|
||
"description": "テキスト生成アプリ API のベース URL です。{api_base_url} をアプリケーションに提供された実際の API ベース URL に置き換えてください。",
|
||
"variables": {
|
||
"api_base_url": {
|
||
"default": "https://api.dify.ai/v1",
|
||
"description": "API の実際のベース URL"
|
||
}
|
||
}
|
||
}
|
||
],
|
||
"security": [
|
||
{
|
||
"ApiKeyAuth": []
|
||
}
|
||
],
|
||
"paths": {
|
||
"/completion-messages": {
|
||
"post": {
|
||
"summary": "完了メッセージを送信",
|
||
"description": "テキスト生成アプリケーションにリクエストを送信します。",
|
||
"operationId": "createCompletionMessageJp",
|
||
"tags": [
|
||
"完了メッセージ"
|
||
],
|
||
"requestBody": {
|
||
"description": "テキスト生成メッセージを作成するためのリクエストボディ。",
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CompletionRequest"
|
||
},
|
||
"examples": {
|
||
"streaming_example": {
|
||
"summary": "リクエスト例 - ストリーミングモード",
|
||
"value": {
|
||
"inputs": {
|
||
"city": "San Francisco"
|
||
},
|
||
"query": "Translate 'hello' to Spanish.",
|
||
"response_mode": "streaming",
|
||
"user": "abc-123",
|
||
"files": [
|
||
{
|
||
"type": "image",
|
||
"transfer_method": "remote_url",
|
||
"url": "https://cloud.dify.ai/logo/logo-site.png"
|
||
}
|
||
]
|
||
}
|
||
},
|
||
"blocking_example": {
|
||
"summary": "リクエスト例 - ブロッキングモード",
|
||
"value": {
|
||
"inputs": {
|
||
"city": "New York"
|
||
},
|
||
"query": "Summarize the following text: ...",
|
||
"response_mode": "blocking",
|
||
"user": "def-456"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "リクエスト成功。コンテンツタイプと構造はリクエストの `response_mode` パラメータに依存します。\n\n- `response_mode` が `blocking` の場合、 `application/json` で `CompletionResponse` オブジェクトを返します。\n- `response_mode` が `streaming` の場合、 `text/event-stream` で `ChunkCompletionEvent` オブジェクトのストリームを返します。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CompletionResponse"
|
||
},
|
||
"examples": {
|
||
"blockingResponse": {
|
||
"summary": "レスポンス例 - ブロッキングモード",
|
||
"value": {
|
||
"event": "message",
|
||
"task_id": "c3800678-a077-43df-a102-53f23ed20b88",
|
||
"id": "b01a39de-3480-4f3e-9f1e-4841a80f8e5e",
|
||
"message_id": "9da23599-e713-473b-982c-4328d4f5c78a",
|
||
"mode": "completion",
|
||
"answer": "Hello World!...",
|
||
"metadata": {
|
||
"usage": {
|
||
"prompt_tokens": 1033,
|
||
"prompt_unit_price": "0.001",
|
||
"prompt_price_unit": "0.001",
|
||
"prompt_price": "0.0010330",
|
||
"completion_tokens": 128,
|
||
"completion_unit_price": "0.002",
|
||
"completion_price_unit": "0.001",
|
||
"completion_price": "0.0002560",
|
||
"total_tokens": 1161,
|
||
"total_price": "0.0012890",
|
||
"currency": "USD",
|
||
"latency": 0.7682376249867957
|
||
}
|
||
},
|
||
"created_at": 1705407629
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"text/event-stream": {
|
||
"schema": {
|
||
"type": "string",
|
||
"description": "サーバー送信イベント (SSE) のストリームです。各イベントは `data: ` プレフィックス付きの JSON オブジェクトで、2 つの改行で終了します。\n\n**SSE パースガイド:**各イベントは `data: ` プレフィックス付きの JSON オブジェクトの行で、`\\n\\n` で終了します。JSON をパースする前に `data: ` プレフィックスを除去してください。JSON 内の `event` フィールドがイベントタイプを決定します。終了イベント(`message_end`、`error` など)を受信するとストリームは終了します。`ping` イベント(10 秒ごとに接続維持のために送信)は無視してください。ストリーム内でエラーイベントが発生しても HTTP ステータスコードは常に `200` です。"
|
||
},
|
||
"examples": {
|
||
"streamingResponse": {
|
||
"summary": "レスポンス例 - ストリーミングモード",
|
||
"value": "data: {\"event\": \"message\", \"task_id\": \"900bbd43-dc0b-4383-a372-aa6e6c414227\", \"message_id\": \"5ad4cb98-f0c7-4085-b384-88c403be6290\", \"answer\": \" I\", \"created_at\": 1679586595}\n\ndata: {\"event\": \"message\", \"task_id\": \"900bbd43-dc0b-4383-a372-aa6e6c414227\", \"message_id\": \"5ad4cb98-f0c7-4085-b384-88c403be6290\", \"answer\": \"'m\", \"created_at\": 1679586595}\n\ndata: {\"event\": \"message_end\", \"task_id\": \"900bbd43-dc0b-4383-a372-aa6e6c414227\", \"id\": \"5e52ce04-874b-4d27-9045-b3bc80def685\", \"message_id\": \"5ad4cb98-f0c7-4085-b384-88c403be6290\", \"metadata\": {\"usage\": {\"prompt_tokens\": 1033, \"prompt_unit_price\": \"0.001\", \"prompt_price_unit\": \"0.001\", \"prompt_price\": \"0.0010330\", \"completion_tokens\": 135, \"completion_unit_price\": \"0.002\", \"completion_price_unit\": \"0.001\", \"completion_price\": \"0.0002700\", \"total_tokens\": 1168, \"total_price\": \"0.0013030\", \"currency\": \"USD\", \"latency\": 1.381760165997548}}}\n\n"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "- `app_unavailable` : アプリケーションが利用できないか、設定が正しくありません。\n- `provider_not_initialize` : 有効なモデルプロバイダーの認証情報が見つかりません。\n- `provider_quota_exceeded` : モデルプロバイダーのクォータが使い切られました。\n- `model_currently_not_support` : 現在のモデルは利用できません。\n- `completion_request_error` : テキスト生成に失敗しました。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"app_unavailable": {
|
||
"summary": "app_unavailable",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "app_unavailable",
|
||
"message": "App unavailable, please check your app configurations."
|
||
}
|
||
},
|
||
"provider_not_initialize": {
|
||
"summary": "provider_not_initialize",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "provider_not_initialize",
|
||
"message": "No valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials."
|
||
}
|
||
},
|
||
"provider_quota_exceeded": {
|
||
"summary": "provider_quota_exceeded",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "provider_quota_exceeded",
|
||
"message": "Your quota for Dify Hosted OpenAI has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials."
|
||
}
|
||
},
|
||
"model_currently_not_support": {
|
||
"summary": "model_currently_not_support",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "model_currently_not_support",
|
||
"message": "Dify Hosted OpenAI trial currently not support the GPT-4 model."
|
||
}
|
||
},
|
||
"completion_request_error": {
|
||
"summary": "completion_request_error",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "completion_request_error",
|
||
"message": "Completion request failed."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"429": {
|
||
"description": "`too_many_requests` : このアプリケーションへの同時リクエストが多すぎます。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"too_many_requests": {
|
||
"summary": "too_many_requests",
|
||
"value": {
|
||
"status": 429,
|
||
"code": "too_many_requests",
|
||
"message": "Too many requests. Please try again later."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "`internal_server_error` : 内部サーバーエラー。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"internal_server_error": {
|
||
"summary": "internal_server_error",
|
||
"value": {
|
||
"status": 500,
|
||
"code": "internal_server_error",
|
||
"message": "Internal server error."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/completion-messages/{task_id}/stop": {
|
||
"post": {
|
||
"summary": "生成を停止",
|
||
"description": "テキスト生成メッセージ生成タスクを停止します。`streaming` モードでのみサポートされています。",
|
||
"operationId": "stopCompletionGenerationJp",
|
||
"tags": [
|
||
"完了メッセージ"
|
||
],
|
||
"parameters": [
|
||
{
|
||
"name": "task_id",
|
||
"in": "path",
|
||
"required": true,
|
||
"description": "タスク ID です。[完了メッセージを送信](/api-reference/完了メッセージ/完了メッセージを送信) API のストリーミングチャンクレスポンスから取得できます。",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"required": [
|
||
"user"
|
||
],
|
||
"properties": {
|
||
"user": {
|
||
"type": "string",
|
||
"description": "ユーザー識別子。メッセージ送信インターフェースで渡された user と一致する必要があります。"
|
||
}
|
||
}
|
||
},
|
||
"examples": {
|
||
"example": {
|
||
"summary": "リクエスト例",
|
||
"value": {
|
||
"user": "abc-123"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/SuccessResult"
|
||
},
|
||
"400": {
|
||
"description": "`app_unavailable` : アプリケーションが利用できないか、設定が正しくありません。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"app_unavailable": {
|
||
"summary": "app_unavailable",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "app_unavailable",
|
||
"message": "App unavailable, please check your app configurations."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/messages/{message_id}/feedbacks": {
|
||
"post": {
|
||
"operationId": "postCompletionMessageFeedbackJp",
|
||
"tags": [
|
||
"メッセージフィードバック"
|
||
],
|
||
"summary": "メッセージフィードバックを送信",
|
||
"description": "メッセージに対するフィードバックを送信します。エンドユーザーはメッセージを `like` または `dislike` で評価でき、任意でテキストフィードバックを提供できます。`rating` に `null` を渡すと、以前送信したフィードバックを取り消せます。",
|
||
"parameters": [
|
||
{
|
||
"name": "message_id",
|
||
"in": "path",
|
||
"required": true,
|
||
"description": "メッセージ ID。",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/MessageFeedbackRequest"
|
||
},
|
||
"examples": {
|
||
"likeFeedback": {
|
||
"summary": "リクエスト例",
|
||
"value": {
|
||
"rating": "like",
|
||
"user": "abc-123",
|
||
"content": "This answer was very helpful!"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"$ref": "#/components/responses/SuccessResult"
|
||
},
|
||
"404": {
|
||
"description": "`not_found` : メッセージが存在しません。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"message_not_exists": {
|
||
"summary": "not_found",
|
||
"value": {
|
||
"status": 404,
|
||
"code": "not_found",
|
||
"message": "Message Not Exists."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/app/feedbacks": {
|
||
"get": {
|
||
"operationId": "getAppFeedbacksCompletionJp",
|
||
"tags": [
|
||
"メッセージフィードバック"
|
||
],
|
||
"summary": "アプリのフィードバック一覧を取得",
|
||
"description": "このアプリケーションのメッセージに対して送信されたすべてのフィードバックのページネーション付きリストを取得します。エンドユーザーと管理者のフィードバックの両方が含まれます。",
|
||
"parameters": [
|
||
{
|
||
"name": "page",
|
||
"in": "query",
|
||
"description": "ページネーションのページ番号。",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 1,
|
||
"minimum": 1
|
||
}
|
||
},
|
||
{
|
||
"name": "limit",
|
||
"in": "query",
|
||
"description": "1ページあたりのレコード数。",
|
||
"required": false,
|
||
"schema": {
|
||
"type": "integer",
|
||
"default": 20,
|
||
"minimum": 1,
|
||
"maximum": 101
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "アプリケーションフィードバックのリスト。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AppFeedbacksResponse"
|
||
},
|
||
"examples": {
|
||
"feedbacksList": {
|
||
"summary": "レスポンス例",
|
||
"value": {
|
||
"data": [
|
||
{
|
||
"id": "b7e2f8a1-3c4d-5e6f-7890-abcdef123456",
|
||
"app_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
|
||
"conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2",
|
||
"message_id": "9da23599-e713-473b-982c-4328d4f5c78a",
|
||
"rating": "like",
|
||
"content": "The response accurately answered my question about product specifications.",
|
||
"from_source": "user",
|
||
"from_end_user_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
|
||
"from_account_id": null,
|
||
"created_at": "2025-01-16T14:30:29Z",
|
||
"updated_at": "2025-01-16T14:30:29Z"
|
||
},
|
||
{
|
||
"id": "c8f3a9b2-4d5e-6f70-8901-bcdef2345678",
|
||
"app_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
|
||
"conversation_id": "56812a93-9229-5cd6-9f0c-75673b666603",
|
||
"message_id": "ae24b5c0-f814-584d-a493-5439e5d6b7b1",
|
||
"rating": "dislike",
|
||
"content": "The answer was too vague and did not address the specific pricing question.",
|
||
"from_source": "user",
|
||
"from_end_user_id": "d2c1b0a9-8765-4321-fedc-ba9876543210",
|
||
"from_account_id": null,
|
||
"created_at": "2025-01-15T09:12:45Z",
|
||
"updated_at": "2025-01-15T09:12:45Z"
|
||
}
|
||
]
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/files/upload": {
|
||
"post": {
|
||
"operationId": "uploadCompletionFileJp",
|
||
"tags": [
|
||
"ファイル操作"
|
||
],
|
||
"summary": "ファイルをアップロード",
|
||
"description": "メッセージ送信時に使用するファイルをアップロードします。画像、ドキュメント、音声、動画のマルチモーダル理解が可能です。アップロードされたファイルは現在のエンドユーザーのみが使用できます。",
|
||
"requestBody": {
|
||
"description": "ファイルアップロードリクエスト。multipart/form-data 形式が必要です。",
|
||
"required": true,
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"type": "object",
|
||
"required": [
|
||
"file"
|
||
],
|
||
"properties": {
|
||
"file": {
|
||
"type": "string",
|
||
"format": "binary",
|
||
"description": "アップロードするファイル。サポートされるタイプには画像、ドキュメント、音声、動画が含まれます。"
|
||
},
|
||
"user": {
|
||
"type": "string",
|
||
"description": "ユーザー識別子。開発者のルールで定義され、アプリケーション内で一意である必要があります。"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"201": {
|
||
"description": "ファイルが正常にアップロードされました。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/FileUploadResponse"
|
||
},
|
||
"examples": {
|
||
"uploadSuccess": {
|
||
"summary": "レスポンス例",
|
||
"value": {
|
||
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
|
||
"name": "product-photo.png",
|
||
"size": 204800,
|
||
"extension": "png",
|
||
"mime_type": "image/png",
|
||
"created_by": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
|
||
"created_at": 1705407629,
|
||
"preview_url": null,
|
||
"source_url": null,
|
||
"original_url": null,
|
||
"user_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
|
||
"tenant_id": "11223344-5566-7788-99aa-bbccddeeff00",
|
||
"conversation_id": null,
|
||
"file_key": "uploads/product-photo.png"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "- `no_file_uploaded` : リクエストにファイルが提供されていません。\n- `too_many_files` : 1 回のリクエストにつき 1 ファイルのみ許可されています。\n- `filename_not_exists_error` : アップロードされたファイルにファイル名がありません。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"no_file_uploaded": {
|
||
"summary": "no_file_uploaded",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "no_file_uploaded",
|
||
"message": "Please upload your file."
|
||
}
|
||
},
|
||
"too_many_files": {
|
||
"summary": "too_many_files",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "too_many_files",
|
||
"message": "Only one file is allowed."
|
||
}
|
||
},
|
||
"filename_not_exists_error": {
|
||
"summary": "filename_not_exists_error",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "filename_not_exists_error",
|
||
"message": "The specified filename does not exist."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"413": {
|
||
"description": "`file_too_large` : ファイルサイズの上限を超えています。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"file_too_large": {
|
||
"summary": "file_too_large",
|
||
"value": {
|
||
"status": 413,
|
||
"code": "file_too_large",
|
||
"message": "File size exceeded."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"415": {
|
||
"description": "`unsupported_file_type` : 許可されていないファイルタイプです。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"unsupported_file_type": {
|
||
"summary": "unsupported_file_type",
|
||
"value": {
|
||
"status": 415,
|
||
"code": "unsupported_file_type",
|
||
"message": "File type not allowed."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/files/{file_id}/preview": {
|
||
"get": {
|
||
"operationId": "previewCompletionFileJa",
|
||
"tags": [
|
||
"ファイル操作"
|
||
],
|
||
"summary": "ファイルをダウンロード",
|
||
"description": "以前[ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード) API 経由でアップロードされたファイルをプレビューまたはダウンロードします。ファイルは、リクエスト元のアプリケーション内のメッセージに属する場合のみアクセスできます。",
|
||
"parameters": [
|
||
{
|
||
"name": "file_id",
|
||
"in": "path",
|
||
"required": true,
|
||
"description": "プレビューするファイルの一意の識別子です。[ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード) API のレスポンスから取得します。",
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
},
|
||
{
|
||
"name": "as_attachment",
|
||
"in": "query",
|
||
"required": false,
|
||
"description": "`true` の場合、ブラウザでプレビューする代わりにファイルを添付ファイルとして強制ダウンロードします。",
|
||
"schema": {
|
||
"type": "boolean",
|
||
"default": false
|
||
}
|
||
},
|
||
{
|
||
"name": "user",
|
||
"in": "query",
|
||
"required": false,
|
||
"description": "ユーザー識別子。エンドユーザーのコンテキストに使用されます。",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "生のファイルコンテンツを返します。`Content-Type` ヘッダーはファイルの MIME タイプに設定されます。`as_attachment` が `true` の場合、ファイルは `Content-Disposition: attachment` としてダウンロード形式で返されます。",
|
||
"content": {
|
||
"application/octet-stream": {
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "binary"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "`file_access_denied` : リクエストされたファイルへのアクセスが拒否されました。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"file_access_denied": {
|
||
"summary": "file_access_denied",
|
||
"value": {
|
||
"status": 403,
|
||
"code": "file_access_denied",
|
||
"message": "Access to the requested file is denied."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "`file_not_found` : リクエストされたファイルが見つかりません。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"file_not_found": {
|
||
"summary": "file_not_found",
|
||
"value": {
|
||
"status": 404,
|
||
"code": "file_not_found",
|
||
"message": "The requested file was not found."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/end-users/{end_user_id}": {
|
||
"get": {
|
||
"operationId": "getEndUserCompletionJp",
|
||
"tags": [
|
||
"エンドユーザー"
|
||
],
|
||
"summary": "エンドユーザー取得",
|
||
"description": "ID を指定してエンドユーザーを取得します。他の API がエンドユーザー ID を返す場合(例:[ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード)の `created_by`)に便利です。",
|
||
"parameters": [
|
||
{
|
||
"name": "end_user_id",
|
||
"in": "path",
|
||
"required": true,
|
||
"description": "エンドユーザー ID。",
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "uuid"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "エンドユーザーを正常に取得しました。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/EndUserDetail"
|
||
},
|
||
"examples": {
|
||
"endUserDetail": {
|
||
"summary": "レスポンス例",
|
||
"value": {
|
||
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
|
||
"tenant_id": "11223344-5566-7788-99aa-bbccddeeff00",
|
||
"app_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
|
||
"type": "service_api",
|
||
"external_user_id": "abc-123",
|
||
"name": null,
|
||
"is_anonymous": false,
|
||
"session_id": "abc-123",
|
||
"created_at": "2024-01-16T12:00:29Z",
|
||
"updated_at": "2024-01-16T12:00:29Z"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "`end_user_not_found` : エンドユーザーが見つかりません。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"end_user_not_found": {
|
||
"summary": "end_user_not_found",
|
||
"value": {
|
||
"status": 404,
|
||
"code": "end_user_not_found",
|
||
"message": "End user not found."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/audio-to-text": {
|
||
"post": {
|
||
"operationId": "completionAudioToTextJa",
|
||
"tags": [
|
||
"音声・テキスト変換"
|
||
],
|
||
"summary": "音声をテキストに変換",
|
||
"description": "音声ファイルをテキストに変換します。サポートされる形式:`mp3`、`mp4`、`mpeg`、`mpga`、`m4a`、`wav`、`webm`。ファイルサイズの上限は `30 MB` です。",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"multipart/form-data": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AudioToTextRequest"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "音声からテキストへの変換に成功しました。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AudioToTextResponse"
|
||
},
|
||
"examples": {
|
||
"audioToTextSuccess": {
|
||
"summary": "レスポンス例",
|
||
"value": {
|
||
"text": "Hello, I would like to know more about the iPhone 13 Pro Max."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "- `app_unavailable` : アプリケーションが利用できないか、設定が正しくありません。\n- `no_audio_uploaded` : 音声ファイルがアップロードされていません。\n- `provider_not_support_speech_to_text` : モデルプロバイダーが音声認識をサポートしていません。\n- `provider_not_initialize` : 有効なモデルプロバイダーの認証情報が見つかりません。\n- `provider_quota_exceeded` : モデルプロバイダーのクォータが使い切られました。\n- `model_currently_not_support` : 現在のモデルはこの操作をサポートしていません。\n- `completion_request_error` : 音声認識リクエストに失敗しました。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"app_unavailable": {
|
||
"summary": "app_unavailable",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "app_unavailable",
|
||
"message": "App unavailable, please check your app configurations."
|
||
}
|
||
},
|
||
"no_audio_uploaded": {
|
||
"summary": "no_audio_uploaded",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "no_audio_uploaded",
|
||
"message": "Please upload your audio."
|
||
}
|
||
},
|
||
"provider_not_support_speech_to_text": {
|
||
"summary": "provider_not_support_speech_to_text",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "provider_not_support_speech_to_text",
|
||
"message": "Provider not support speech to text."
|
||
}
|
||
},
|
||
"provider_not_initialize": {
|
||
"summary": "provider_not_initialize",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "provider_not_initialize",
|
||
"message": "No valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials."
|
||
}
|
||
},
|
||
"provider_quota_exceeded": {
|
||
"summary": "provider_quota_exceeded",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "provider_quota_exceeded",
|
||
"message": "Your quota for Dify Hosted OpenAI has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials."
|
||
}
|
||
},
|
||
"model_currently_not_support": {
|
||
"summary": "model_currently_not_support",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "model_currently_not_support",
|
||
"message": "Dify Hosted OpenAI trial currently not support the GPT-4 model."
|
||
}
|
||
},
|
||
"completion_request_error": {
|
||
"summary": "completion_request_error",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "completion_request_error",
|
||
"message": "Completion request failed."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"413": {
|
||
"description": "`audio_too_large` : 音声ファイルサイズが上限を超えています。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"audio_too_large": {
|
||
"summary": "audio_too_large",
|
||
"value": {
|
||
"status": 413,
|
||
"code": "audio_too_large",
|
||
"message": "Audio size exceeded."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"415": {
|
||
"description": "`unsupported_audio_type` : 許可されていない音声タイプです。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"unsupported_audio_type": {
|
||
"summary": "unsupported_audio_type",
|
||
"value": {
|
||
"status": 415,
|
||
"code": "unsupported_audio_type",
|
||
"message": "Audio type not allowed."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "`internal_server_error` : 内部サーバーエラー。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"internal_server_error": {
|
||
"summary": "internal_server_error",
|
||
"value": {
|
||
"status": 500,
|
||
"code": "internal_server_error",
|
||
"message": "Internal server error."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/text-to-audio": {
|
||
"post": {
|
||
"operationId": "textToAudioCompletionJp",
|
||
"tags": [
|
||
"音声・テキスト変換"
|
||
],
|
||
"summary": "テキストを音声に変換",
|
||
"description": "テキストを音声に変換します。",
|
||
"requestBody": {
|
||
"required": true,
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/TextToAudioRequest"
|
||
},
|
||
"examples": {
|
||
"textToAudioExample": {
|
||
"summary": "リクエスト例",
|
||
"value": {
|
||
"text": "Hello, welcome to our service.",
|
||
"user": "abc-123",
|
||
"voice": "alloy",
|
||
"streaming": false
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"responses": {
|
||
"200": {
|
||
"description": "生成された音声ファイルを返します。`Content-Type` ヘッダーは音声の MIME タイプ(例:`audio/wav`、`audio/mp3`)に設定されます。`streaming` が `true` の場合、音声はチャンク転送エンコーディングでストリーミングされます。",
|
||
"content": {
|
||
"audio/mpeg": {
|
||
"schema": {
|
||
"type": "string",
|
||
"format": "binary"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "- `app_unavailable` : アプリケーションが利用できないか、設定が正しくありません。\n- `provider_not_initialize` : 有効なモデルプロバイダーの認証情報が見つかりません。\n- `provider_quota_exceeded` : モデルプロバイダーのクォータが使い切られました。\n- `model_currently_not_support` : 現在のモデルはこの操作をサポートしていません。\n- `completion_request_error` : テキスト読み上げリクエストに失敗しました。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"app_unavailable": {
|
||
"summary": "app_unavailable",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "app_unavailable",
|
||
"message": "App unavailable, please check your app configurations."
|
||
}
|
||
},
|
||
"provider_not_initialize": {
|
||
"summary": "provider_not_initialize",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "provider_not_initialize",
|
||
"message": "No valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials."
|
||
}
|
||
},
|
||
"provider_quota_exceeded": {
|
||
"summary": "provider_quota_exceeded",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "provider_quota_exceeded",
|
||
"message": "Your quota for Dify Hosted OpenAI has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials."
|
||
}
|
||
},
|
||
"model_currently_not_support": {
|
||
"summary": "model_currently_not_support",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "model_currently_not_support",
|
||
"message": "Dify Hosted OpenAI trial currently not support the GPT-4 model."
|
||
}
|
||
},
|
||
"completion_request_error": {
|
||
"summary": "completion_request_error",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "completion_request_error",
|
||
"message": "Completion request failed."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "`internal_server_error` : 内部サーバーエラー。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"internal_server_error": {
|
||
"summary": "internal_server_error",
|
||
"value": {
|
||
"status": 500,
|
||
"code": "internal_server_error",
|
||
"message": "Internal server error."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/info": {
|
||
"get": {
|
||
"operationId": "getCompletionAppInfoJp",
|
||
"tags": [
|
||
"アプリケーション設定"
|
||
],
|
||
"summary": "アプリケーションの基本情報を取得",
|
||
"description": "このアプリケーションの基本情報(名前、説明、タグ、モード)を取得します。",
|
||
"responses": {
|
||
"200": {
|
||
"description": "アプリケーションの基本情報。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AppInfoResponse"
|
||
},
|
||
"examples": {
|
||
"appInfo": {
|
||
"summary": "レスポンス例",
|
||
"value": {
|
||
"name": "My Completion App",
|
||
"description": "便利なカスタマーサービスチャットボット。",
|
||
"tags": [
|
||
"customer-service",
|
||
"chatbot"
|
||
],
|
||
"mode": "completion",
|
||
"author_name": "Dify Team"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/parameters": {
|
||
"get": {
|
||
"operationId": "getCompletionAppParametersJp",
|
||
"tags": [
|
||
"アプリケーション設定"
|
||
],
|
||
"summary": "アプリケーションのパラメータ情報を取得",
|
||
"description": "アプリケーションの入力フォーム設定(機能スイッチ、入力パラメータ名、タイプ、デフォルト値)を取得します。",
|
||
"responses": {
|
||
"200": {
|
||
"description": "アプリケーションパラメータ情報。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/CompletionAppParametersResponse"
|
||
},
|
||
"examples": {
|
||
"appParameters": {
|
||
"summary": "レスポンス例",
|
||
"value": {
|
||
"opening_statement": "Hello! How can I help you today?",
|
||
"suggested_questions": [
|
||
"What can you do?",
|
||
"Tell me about your features."
|
||
],
|
||
"suggested_questions_after_answer": {
|
||
"enabled": true
|
||
},
|
||
"speech_to_text": {
|
||
"enabled": false
|
||
},
|
||
"text_to_speech": {
|
||
"enabled": false,
|
||
"voice": "alloy",
|
||
"language": "en-US",
|
||
"autoPlay": "disabled"
|
||
},
|
||
"retriever_resource": {
|
||
"enabled": true
|
||
},
|
||
"annotation_reply": {
|
||
"enabled": false
|
||
},
|
||
"more_like_this": {
|
||
"enabled": false
|
||
},
|
||
"sensitive_word_avoidance": {
|
||
"enabled": false
|
||
},
|
||
"user_input_form": [
|
||
{
|
||
"text-input": {
|
||
"label": "City",
|
||
"variable": "city",
|
||
"required": true,
|
||
"default": ""
|
||
}
|
||
}
|
||
],
|
||
"file_upload": {
|
||
"image": {
|
||
"enabled": true,
|
||
"number_limits": 3,
|
||
"detail": "high",
|
||
"transfer_methods": [
|
||
"remote_url",
|
||
"local_file"
|
||
]
|
||
}
|
||
},
|
||
"system_parameters": {
|
||
"file_size_limit": 15,
|
||
"image_file_size_limit": 10,
|
||
"audio_file_size_limit": 50,
|
||
"video_file_size_limit": 100,
|
||
"workflow_file_upload_limit": 10
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "`app_unavailable` : アプリケーションが利用できないか、設定が正しくありません。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"app_unavailable": {
|
||
"summary": "app_unavailable",
|
||
"value": {
|
||
"status": 400,
|
||
"code": "app_unavailable",
|
||
"message": "App unavailable, please check your app configurations."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/meta": {
|
||
"get": {
|
||
"operationId": "getCompletionAppMetaJa",
|
||
"tags": [
|
||
"アプリケーション設定"
|
||
],
|
||
"summary": "アプリケーションのメタ情報を取得",
|
||
"description": "このアプリケーションのメタデータ(ツールアイコンやその他の設定詳細)を取得します。",
|
||
"responses": {
|
||
"200": {
|
||
"description": "アプリケーションのメタ情報を正常に取得しました。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/AppMetaResponse"
|
||
},
|
||
"examples": {
|
||
"appMeta": {
|
||
"summary": "レスポンス例",
|
||
"value": {
|
||
"tool_icons": {
|
||
"dalle3": "https://example.com/icons/dalle3.png",
|
||
"calculator": {
|
||
"background": "#4A90D9",
|
||
"content": "🧮"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/site": {
|
||
"get": {
|
||
"operationId": "getCompletionWebAppSettingsJp",
|
||
"tags": [
|
||
"アプリケーション設定"
|
||
],
|
||
"summary": "アプリの WebApp 設定を取得",
|
||
"description": "このアプリケーションの WebApp 設定(サイト設定、テーマ、カスタマイズオプション)を取得します。",
|
||
"responses": {
|
||
"200": {
|
||
"description": "アプリケーションの WebApp 設定。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"$ref": "#/components/schemas/WebAppSettingsResponse"
|
||
},
|
||
"examples": {
|
||
"webAppSettings": {
|
||
"summary": "レスポンス例",
|
||
"value": {
|
||
"title": "My Chat App",
|
||
"chat_color_theme": "#4A90D9",
|
||
"chat_color_theme_inverted": false,
|
||
"icon_type": "emoji",
|
||
"icon": "🤖",
|
||
"icon_background": "#FFFFFF",
|
||
"icon_url": null,
|
||
"description": "便利なカスタマーサービスチャットボット。",
|
||
"copyright": "2025 Dify",
|
||
"privacy_policy": "https://example.com/privacy",
|
||
"custom_disclaimer": "",
|
||
"default_language": "en-US",
|
||
"show_workflow_steps": false,
|
||
"use_icon_as_answer_icon": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "`forbidden` : このアプリケーションのサイトが見つからないか、ワークスペースがアーカイブされています。",
|
||
"content": {
|
||
"application/json": {
|
||
"examples": {
|
||
"forbidden": {
|
||
"summary": "forbidden",
|
||
"value": {
|
||
"status": 403,
|
||
"code": "forbidden",
|
||
"message": "Forbidden."
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"components": {
|
||
"securitySchemes": {
|
||
"ApiKeyAuth": {
|
||
"type": "http",
|
||
"scheme": "bearer",
|
||
"bearerFormat": "API_KEY",
|
||
"description": "API Key 認証です。すべての API リクエストにおいて、`Authorization` HTTP ヘッダーに `Bearer ` プレフィックスを付けた API Key を含めてください。例:`Authorization: Bearer {API_KEY}`。**API Key はサーバーサイドに保存し、クライアントサイドで共有・保存しないことを強く推奨します。API Key の漏洩は深刻な結果につながる可能性があります。**"
|
||
}
|
||
},
|
||
"responses": {
|
||
"SuccessResult": {
|
||
"description": "操作が成功しました。",
|
||
"content": {
|
||
"application/json": {
|
||
"schema": {
|
||
"type": "object",
|
||
"properties": {
|
||
"result": {
|
||
"type": "string",
|
||
"description": "結果ステータス。"
|
||
}
|
||
}
|
||
},
|
||
"examples": {
|
||
"success": {
|
||
"summary": "レスポンス例",
|
||
"value": {
|
||
"result": "success"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schemas": {
|
||
"CompletionRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"inputs",
|
||
"user"
|
||
],
|
||
"properties": {
|
||
"inputs": {
|
||
"type": "object",
|
||
"description": "アプリで定義されたさまざまな変数の値を入力できます。キーと値のペアを含み、各キーは特定の変数に対応し、各値はその変数の具体的な値です。アプリが期待する変数名と型については、[アプリケーションのパラメータ情報を取得](/api-reference/アプリケーション設定/アプリケーションのパラメータ情報を取得) レスポンスの `user_input_form` フィールドを参照してください。",
|
||
"additionalProperties": true
|
||
},
|
||
"query": {
|
||
"type": "string",
|
||
"default": "",
|
||
"description": "処理対象の入力テキストです。これはレガシーパラメータであり、新しいアプリではクエリを `inputs` オブジェクト内で渡す必要があります。"
|
||
},
|
||
"response_mode": {
|
||
"type": "string",
|
||
"enum": [
|
||
"streaming",
|
||
"blocking"
|
||
],
|
||
"description": "レスポンスの返却モード。`streaming`(推奨)は SSE を使用します。`blocking` は完了後に返却します(長時間の処理では中断される場合があります)。Cloudflare のタイムアウトは `100 s` です。省略した場合、デフォルトでブロッキングモードになります。"
|
||
},
|
||
"user": {
|
||
"type": "string",
|
||
"description": "ユーザー識別子。アプリケーション内で一意です。この識別子はデータアクセスの範囲を制限します。メッセージとファイルは同じ `user` 値でクエリした場合のみ表示されます。"
|
||
},
|
||
"files": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/components/schemas/InputFileObject"
|
||
},
|
||
"description": "マルチモーダル理解用のファイルリストです。画像、ドキュメント、音声、動画を含みます。ローカルファイルを添付するには、まず [ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード) でアップロードし、返された `id` を `upload_file_id` として `transfer_method: local_file` で使用します。"
|
||
}
|
||
}
|
||
},
|
||
"InputFileObject": {
|
||
"type": "object",
|
||
"required": [
|
||
"type",
|
||
"transfer_method"
|
||
],
|
||
"properties": {
|
||
"type": {
|
||
"type": "string",
|
||
"enum": [
|
||
"image",
|
||
"document",
|
||
"audio",
|
||
"video",
|
||
"custom"
|
||
],
|
||
"description": "ファイルタイプ。"
|
||
},
|
||
"transfer_method": {
|
||
"type": "string",
|
||
"enum": [
|
||
"remote_url",
|
||
"local_file"
|
||
],
|
||
"description": "転送方法です。ファイル URL の場合は `remote_url`、アップロードファイルの場合は `local_file` です。"
|
||
},
|
||
"url": {
|
||
"type": "string",
|
||
"format": "url",
|
||
"description": "ファイル URL(`transfer_method` が `remote_url` の場合)です。"
|
||
},
|
||
"upload_file_id": {
|
||
"type": "string",
|
||
"description": "事前に [ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード) API でアップロードして取得したファイル ID です(`transfer_method` が `local_file` の場合に使用)。"
|
||
}
|
||
},
|
||
"anyOf": [
|
||
{
|
||
"properties": {
|
||
"transfer_method": {
|
||
"enum": [
|
||
"remote_url"
|
||
]
|
||
},
|
||
"url": {
|
||
"type": "string",
|
||
"format": "url"
|
||
}
|
||
},
|
||
"required": [
|
||
"url"
|
||
],
|
||
"not": {
|
||
"required": [
|
||
"upload_file_id"
|
||
]
|
||
}
|
||
},
|
||
{
|
||
"properties": {
|
||
"transfer_method": {
|
||
"enum": [
|
||
"local_file"
|
||
]
|
||
},
|
||
"upload_file_id": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"required": [
|
||
"upload_file_id"
|
||
],
|
||
"not": {
|
||
"required": [
|
||
"url"
|
||
]
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"CompletionResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"event": {
|
||
"type": "string",
|
||
"description": "イベントタイプ。`message` に固定されています。"
|
||
},
|
||
"task_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "リクエスト追跡および [生成を停止](/api-reference/完了メッセージ/生成を停止) API 用のタスク ID です。"
|
||
},
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "このレスポンスイベントの一意 ID です。"
|
||
},
|
||
"message_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "一意のメッセージ ID です。フィードバックや推奨質問のエンドポイントを呼び出す際に `message_id` パラメータとして使用します。"
|
||
},
|
||
"mode": {
|
||
"type": "string",
|
||
"description": "アプリモード、`completion` 固定です。"
|
||
},
|
||
"answer": {
|
||
"type": "string",
|
||
"description": "完全なレスポンスコンテンツ。"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"description": "使用量と検索リソースを含むメタデータ。",
|
||
"properties": {
|
||
"usage": {
|
||
"$ref": "#/components/schemas/Usage"
|
||
},
|
||
"retriever_resources": {
|
||
"type": "array",
|
||
"description": "使用された検索リソースのリスト。",
|
||
"items": {
|
||
"$ref": "#/components/schemas/RetrieverResource"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"created_at": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "メッセージ作成タイムスタンプ(Unix エポック秒)。"
|
||
}
|
||
}
|
||
},
|
||
"ChunkCompletionEvent": {
|
||
"type": "object",
|
||
"properties": {
|
||
"event": {
|
||
"type": "string",
|
||
"enum": [
|
||
"message",
|
||
"message_end",
|
||
"message_file",
|
||
"tts_message",
|
||
"tts_message_end",
|
||
"message_replace",
|
||
"error",
|
||
"ping"
|
||
],
|
||
"description": "ストリーミングイベントのタイプ。"
|
||
}
|
||
},
|
||
"discriminator": {
|
||
"propertyName": "event",
|
||
"mapping": {
|
||
"message": "#/components/schemas/StreamEventMessage",
|
||
"message_end": "#/components/schemas/StreamEventMessageEnd",
|
||
"message_file": "#/components/schemas/StreamEventMessageFile",
|
||
"tts_message": "#/components/schemas/StreamEventTtsMessage",
|
||
"tts_message_end": "#/components/schemas/StreamEventTtsMessageEnd",
|
||
"message_replace": "#/components/schemas/StreamEventMessageReplace",
|
||
"error": "#/components/schemas/StreamEventError",
|
||
"ping": "#/components/schemas/StreamEventPing"
|
||
}
|
||
}
|
||
},
|
||
"StreamEventBase": {
|
||
"type": "object",
|
||
"properties": {
|
||
"task_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "タスク ID。"
|
||
},
|
||
"message_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "一意のメッセージ ID。"
|
||
},
|
||
"created_at": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "作成タイムスタンプ。"
|
||
}
|
||
}
|
||
},
|
||
"StreamEventMessage": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/ChunkCompletionEvent"
|
||
},
|
||
{
|
||
"$ref": "#/components/schemas/StreamEventBase"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"description": "LLM がテキストチャンクイベントを返します。",
|
||
"properties": {
|
||
"answer": {
|
||
"type": "string",
|
||
"description": "LLM が返したテキストチャンクのコンテンツ。"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"StreamEventMessageEnd": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/ChunkCompletionEvent"
|
||
},
|
||
{
|
||
"$ref": "#/components/schemas/StreamEventBase"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"description": "メッセージ終了イベント。このイベントを受信すると、ストリーミングが終了したことを意味します。",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "メッセージの一意な ID。"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"description": "使用量と検索リソースを含むメタデータ。",
|
||
"properties": {
|
||
"usage": {
|
||
"$ref": "#/components/schemas/Usage"
|
||
},
|
||
"retriever_resources": {
|
||
"type": "array",
|
||
"description": "使用された検索リソースのリスト。",
|
||
"items": {
|
||
"$ref": "#/components/schemas/RetrieverResource"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"StreamEventTtsMessage": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/ChunkCompletionEvent"
|
||
},
|
||
{
|
||
"$ref": "#/components/schemas/StreamEventBase"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"description": "TTS 音声ストリームイベント(base64 エンコード MP3)。自動再生が有効な場合に利用できます。",
|
||
"properties": {
|
||
"audio": {
|
||
"type": "string",
|
||
"format": "byte",
|
||
"description": "Base64 エンコードされた MP3 音声チャンク。すべてのチャンクを順番にデコードして連結すると、完全な音声ファイルが生成されます。"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"StreamEventTtsMessageEnd": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/ChunkCompletionEvent"
|
||
},
|
||
{
|
||
"$ref": "#/components/schemas/StreamEventBase"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"description": "TTS 音声ストリーム終了イベント。",
|
||
"properties": {
|
||
"audio": {
|
||
"type": "string",
|
||
"description": "空の文字列。音声ストリームの終了を示します。"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"StreamEventMessageFile": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/ChunkCompletionEvent"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"description": "メッセージファイルイベント。ツールによって作成された新しいファイルです。",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "ファイルの一意の ID。"
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"description": "ファイルタイプ(例:`image`)。"
|
||
},
|
||
"belongs_to": {
|
||
"type": "string",
|
||
"enum": [
|
||
"assistant"
|
||
],
|
||
"description": "このファイルの所有者。ここでは常に `assistant` です。"
|
||
},
|
||
"url": {
|
||
"type": "string",
|
||
"format": "url",
|
||
"description": "ファイルのリモート URL。"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"StreamEventMessageReplace": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/ChunkCompletionEvent"
|
||
},
|
||
{
|
||
"$ref": "#/components/schemas/StreamEventBase"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"description": "メッセージコンテンツ置換イベント(例:コンテンツモデレーションによるもの)。",
|
||
"properties": {
|
||
"answer": {
|
||
"type": "string",
|
||
"description": "置換コンテンツ。"
|
||
},
|
||
"reason": {
|
||
"type": "string",
|
||
"description": "コンテンツ置換の理由。"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"StreamEventError": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/ChunkCompletionEvent"
|
||
},
|
||
{
|
||
"$ref": "#/components/schemas/StreamEventBase"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"description": "ストリーミング中のエラーイベント。",
|
||
"properties": {
|
||
"status": {
|
||
"type": "integer",
|
||
"description": "HTTP ステータスコード。"
|
||
},
|
||
"code": {
|
||
"type": "string",
|
||
"description": "エラーコード。"
|
||
},
|
||
"message": {
|
||
"type": "string",
|
||
"description": "エラーメッセージ。"
|
||
}
|
||
}
|
||
}
|
||
]
|
||
},
|
||
"StreamEventPing": {
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/components/schemas/ChunkCompletionEvent"
|
||
},
|
||
{
|
||
"type": "object",
|
||
"description": "接続を維持するための Ping イベント。"
|
||
}
|
||
]
|
||
},
|
||
"Usage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"prompt_tokens": {
|
||
"type": "integer",
|
||
"description": "プロンプト内のトークン数。"
|
||
},
|
||
"prompt_unit_price": {
|
||
"type": "string",
|
||
"format": "decimal",
|
||
"description": "プロンプトトークンあたりの単価。"
|
||
},
|
||
"prompt_price_unit": {
|
||
"type": "string",
|
||
"format": "decimal",
|
||
"description": "プロンプトトークンの価格単位。"
|
||
},
|
||
"prompt_price": {
|
||
"type": "string",
|
||
"format": "decimal",
|
||
"description": "プロンプトトークンの合計価格。"
|
||
},
|
||
"completion_tokens": {
|
||
"type": "integer",
|
||
"description": "補完のトークン数。"
|
||
},
|
||
"completion_unit_price": {
|
||
"type": "string",
|
||
"format": "decimal",
|
||
"description": "補完トークンあたりの単価。"
|
||
},
|
||
"completion_price_unit": {
|
||
"type": "string",
|
||
"format": "decimal",
|
||
"description": "補完トークンの価格単位。"
|
||
},
|
||
"completion_price": {
|
||
"type": "string",
|
||
"format": "decimal",
|
||
"description": "補完トークンの合計価格。"
|
||
},
|
||
"total_tokens": {
|
||
"type": "integer",
|
||
"description": "使用されたトークンの合計数。"
|
||
},
|
||
"total_price": {
|
||
"type": "string",
|
||
"format": "decimal",
|
||
"description": "すべてのトークンの合計価格。"
|
||
},
|
||
"currency": {
|
||
"type": "string",
|
||
"description": "課金通貨。"
|
||
},
|
||
"latency": {
|
||
"type": "number",
|
||
"format": "double",
|
||
"description": "レイテンシ(秒)。"
|
||
}
|
||
}
|
||
},
|
||
"RetrieverResource": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "検索リソースの一意の ID。"
|
||
},
|
||
"message_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "このリソースが属するメッセージの ID。"
|
||
},
|
||
"position": {
|
||
"type": "integer",
|
||
"description": "リスト内のリソースの位置。"
|
||
},
|
||
"dataset_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "ナレッジベース ID。"
|
||
},
|
||
"dataset_name": {
|
||
"type": "string",
|
||
"description": "ナレッジベース名。"
|
||
},
|
||
"document_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "ドキュメント ID。"
|
||
},
|
||
"document_name": {
|
||
"type": "string",
|
||
"description": "ドキュメント名。"
|
||
},
|
||
"data_source_type": {
|
||
"type": "string",
|
||
"description": "データソースのタイプ。"
|
||
},
|
||
"segment_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "ドキュメント内の特定のチャンクの ID。"
|
||
},
|
||
"score": {
|
||
"type": "number",
|
||
"format": "float",
|
||
"description": "リソースの関連性スコア。"
|
||
},
|
||
"hit_count": {
|
||
"type": "integer",
|
||
"description": "このチャンクがヒットした回数。"
|
||
},
|
||
"word_count": {
|
||
"type": "integer",
|
||
"description": "チャンクの単語数。"
|
||
},
|
||
"segment_position": {
|
||
"type": "integer",
|
||
"description": "ドキュメント内のチャンクの位置。"
|
||
},
|
||
"index_node_hash": {
|
||
"type": "string",
|
||
"description": "インデックスノードのハッシュ。"
|
||
},
|
||
"content": {
|
||
"type": "string",
|
||
"description": "リソースからのコンテンツスニペット。"
|
||
},
|
||
"summary": {
|
||
"type": "string",
|
||
"nullable": true,
|
||
"description": "チャンクコンテンツの要約。"
|
||
},
|
||
"created_at": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "作成タイムスタンプ(Unix エポック秒)。"
|
||
}
|
||
}
|
||
},
|
||
"FileUploadResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "一意のファイル ID。"
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"description": "ファイル名。"
|
||
},
|
||
"size": {
|
||
"type": "integer",
|
||
"description": "ファイルサイズ(バイト)。"
|
||
},
|
||
"extension": {
|
||
"type": "string",
|
||
"nullable": true,
|
||
"description": "ファイル拡張子。"
|
||
},
|
||
"mime_type": {
|
||
"type": "string",
|
||
"nullable": true,
|
||
"description": "ファイルの MIME タイプ。"
|
||
},
|
||
"created_by": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"nullable": true,
|
||
"description": "ファイルをアップロードしたユーザーの ID。"
|
||
},
|
||
"created_at": {
|
||
"type": "integer",
|
||
"format": "int64",
|
||
"description": "アップロードタイムスタンプ(Unix エポック秒)。"
|
||
},
|
||
"preview_url": {
|
||
"type": "string",
|
||
"nullable": true,
|
||
"description": "ファイルのプレビュー URL。"
|
||
},
|
||
"source_url": {
|
||
"type": "string",
|
||
"nullable": true,
|
||
"description": "ファイルのソース URL。"
|
||
},
|
||
"original_url": {
|
||
"type": "string",
|
||
"nullable": true,
|
||
"description": "ファイルの元の URL。"
|
||
},
|
||
"user_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"nullable": true,
|
||
"description": "関連付けられたユーザーの ID。"
|
||
},
|
||
"tenant_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"nullable": true,
|
||
"description": "関連付けられたテナントの ID。"
|
||
},
|
||
"conversation_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"nullable": true,
|
||
"description": "関連付けられた会話の ID。"
|
||
},
|
||
"file_key": {
|
||
"type": "string",
|
||
"nullable": true,
|
||
"description": "ファイルのストレージキー。"
|
||
}
|
||
}
|
||
},
|
||
"EndUserDetail": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "エンドユーザー ID。"
|
||
},
|
||
"tenant_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "テナント ID。"
|
||
},
|
||
"app_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"nullable": true,
|
||
"description": "アプリケーション ID。"
|
||
},
|
||
"type": {
|
||
"type": "string",
|
||
"description": "エンドユーザーのタイプ。Service API ユーザーの場合は常に `service_api` です。"
|
||
},
|
||
"external_user_id": {
|
||
"type": "string",
|
||
"nullable": true,
|
||
"description": "API リクエストで提供された `user` 識別子です(例:[完了メッセージを送信](/api-reference/完了メッセージ/完了メッセージを送信) の `user` フィールド)。"
|
||
},
|
||
"name": {
|
||
"type": "string",
|
||
"nullable": true,
|
||
"description": "エンドユーザー名。"
|
||
},
|
||
"is_anonymous": {
|
||
"type": "boolean",
|
||
"description": "ユーザーが匿名かどうかを示します。元の API リクエストで `user` 識別子が提供されなかった場合、`true` になります。"
|
||
},
|
||
"session_id": {
|
||
"type": "string",
|
||
"description": "セッション識別子。デフォルトは `external_user_id` の値です。"
|
||
},
|
||
"created_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"description": "作成タイムスタンプ。"
|
||
},
|
||
"updated_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"description": "最終更新タイムスタンプ。"
|
||
}
|
||
}
|
||
},
|
||
"MessageFeedbackRequest": {
|
||
"type": "object",
|
||
"description": "メッセージフィードバックを送信するためのリクエストボディ。",
|
||
"required": [
|
||
"user"
|
||
],
|
||
"properties": {
|
||
"rating": {
|
||
"type": "string",
|
||
"enum": [
|
||
"like",
|
||
"dislike",
|
||
null
|
||
],
|
||
"nullable": true,
|
||
"description": "フィードバック評価。以前送信したフィードバックを取り消すには `null` に設定します。"
|
||
},
|
||
"user": {
|
||
"type": "string",
|
||
"description": "ユーザー識別子。開発者が定義し、アプリケーション内での一意性を確保する必要があります。"
|
||
},
|
||
"content": {
|
||
"type": "string",
|
||
"description": "追加の詳細を提供する任意のテキストフィードバック。"
|
||
}
|
||
}
|
||
},
|
||
"AppFeedbacksResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"description": "フィードバック項目のリスト。",
|
||
"items": {
|
||
"$ref": "#/components/schemas/FeedbackItem"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"FeedbackItem": {
|
||
"type": "object",
|
||
"description": "単一のフィードバック項目。",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "フィードバック ID。"
|
||
},
|
||
"app_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "アプリケーション ID。"
|
||
},
|
||
"conversation_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "会話 ID。"
|
||
},
|
||
"message_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "メッセージ ID。"
|
||
},
|
||
"rating": {
|
||
"type": "string",
|
||
"description": "フィードバック評価。肯定的な場合は `like`、否定的な場合は `dislike`。"
|
||
},
|
||
"content": {
|
||
"type": "string",
|
||
"nullable": true,
|
||
"description": "任意のテキストフィードバック。"
|
||
},
|
||
"from_source": {
|
||
"type": "string",
|
||
"description": "フィードバックのソース。API 経由でエンドユーザーが送信したフィードバックの場合は `user`、コンソールから送信されたフィードバックの場合は `admin`。"
|
||
},
|
||
"from_end_user_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"nullable": true,
|
||
"description": "フィードバックを送信したエンドユーザー ID。`from_source` が `user` の場合に存在します。"
|
||
},
|
||
"from_account_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"nullable": true,
|
||
"description": "フィードバックを送信したアカウント ID。`from_source` が `admin` の場合に存在します。"
|
||
},
|
||
"created_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"description": "作成タイムスタンプ。"
|
||
},
|
||
"updated_at": {
|
||
"type": "string",
|
||
"format": "date-time",
|
||
"description": "最終更新タイムスタンプ。"
|
||
}
|
||
}
|
||
},
|
||
"AudioToTextRequest": {
|
||
"type": "object",
|
||
"description": "音声からテキストへの変換のリクエストボディ。",
|
||
"required": [
|
||
"file"
|
||
],
|
||
"properties": {
|
||
"file": {
|
||
"type": "string",
|
||
"format": "binary",
|
||
"description": "音声ファイルです。対応形式:`mp3`、`mp4`、`mpeg`、`mpga`、`m4a`、`wav`、`webm`。上限:`30 MB`。"
|
||
},
|
||
"user": {
|
||
"type": "string",
|
||
"description": "ユーザー識別子。"
|
||
}
|
||
}
|
||
},
|
||
"AudioToTextResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"text": {
|
||
"type": "string",
|
||
"description": "音声認識からの出力テキスト。"
|
||
}
|
||
}
|
||
},
|
||
"TextToAudioRequest": {
|
||
"type": "object",
|
||
"description": "テキストから音声への変換のリクエストボディ。`message_id` または `text` のいずれかを指定してください。",
|
||
"properties": {
|
||
"message_id": {
|
||
"type": "string",
|
||
"format": "uuid",
|
||
"description": "メッセージ ID です。両方が指定された場合、`text` よりも優先されます。"
|
||
},
|
||
"text": {
|
||
"type": "string",
|
||
"description": "変換する音声コンテンツ。"
|
||
},
|
||
"user": {
|
||
"type": "string",
|
||
"description": "ユーザー識別子。"
|
||
},
|
||
"voice": {
|
||
"type": "string",
|
||
"description": "テキスト読み上げに使用する音声。利用可能な音声は、このアプリに設定された TTS プロバイダーによって異なります。デフォルトには[アプリケーションのパラメータ情報を取得](/api-reference/アプリケーション設定/アプリケーションのパラメータ情報を取得) → `text_to_speech.voice` の `voice` 値を使用してください。"
|
||
},
|
||
"streaming": {
|
||
"type": "boolean",
|
||
"description": "ストリーミングレスポンスを有効にするかどうか。"
|
||
}
|
||
}
|
||
},
|
||
"AppInfoResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string",
|
||
"description": "アプリケーション名。"
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"description": "アプリケーションの説明。"
|
||
},
|
||
"tags": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"description": "アプリケーションタグ。"
|
||
},
|
||
"mode": {
|
||
"type": "string",
|
||
"description": "アプリケーションモード。`completion` はテキスト生成アプリ、`chat` は基本チャットアプリ、`agent-chat` はエージェントベースのアプリ、`advanced-chat` は Chatflow アプリ、`workflow` はワークフローアプリです。"
|
||
},
|
||
"author_name": {
|
||
"type": "string",
|
||
"description": "アプリケーション作成者の名前。"
|
||
}
|
||
}
|
||
},
|
||
"CompletionAppParametersResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"opening_statement": {
|
||
"type": "string",
|
||
"description": "開始時に表示されるオープニングステートメント。"
|
||
},
|
||
"suggested_questions": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"description": "推奨される初期質問のリスト。"
|
||
},
|
||
"suggested_questions_after_answer": {
|
||
"type": "object",
|
||
"description": "回答後の推奨質問の設定。",
|
||
"properties": {
|
||
"enabled": {
|
||
"type": "boolean",
|
||
"description": "この機能が有効かどうか。"
|
||
}
|
||
}
|
||
},
|
||
"speech_to_text": {
|
||
"type": "object",
|
||
"description": "音声からテキストへの変換設定。",
|
||
"properties": {
|
||
"enabled": {
|
||
"type": "boolean",
|
||
"description": "この機能が有効かどうか。"
|
||
}
|
||
}
|
||
},
|
||
"text_to_speech": {
|
||
"type": "object",
|
||
"description": "テキストから音声への変換設定。",
|
||
"properties": {
|
||
"enabled": {
|
||
"type": "boolean",
|
||
"description": "この機能が有効かどうか。"
|
||
},
|
||
"voice": {
|
||
"type": "string",
|
||
"description": "TTS の音声識別子。"
|
||
},
|
||
"language": {
|
||
"type": "string",
|
||
"description": "TTS の言語。"
|
||
},
|
||
"autoPlay": {
|
||
"type": "string",
|
||
"enum": [
|
||
"enabled",
|
||
"disabled"
|
||
],
|
||
"description": "自動再生設定。"
|
||
}
|
||
}
|
||
},
|
||
"retriever_resource": {
|
||
"type": "object",
|
||
"description": "検索リソースの設定。",
|
||
"properties": {
|
||
"enabled": {
|
||
"type": "boolean",
|
||
"description": "この機能が有効かどうか。"
|
||
}
|
||
}
|
||
},
|
||
"annotation_reply": {
|
||
"type": "object",
|
||
"description": "アノテーション返信の設定。",
|
||
"properties": {
|
||
"enabled": {
|
||
"type": "boolean",
|
||
"description": "この機能が有効かどうか。"
|
||
}
|
||
}
|
||
},
|
||
"more_like_this": {
|
||
"type": "object",
|
||
"description": "類似コンテンツの設定。",
|
||
"properties": {
|
||
"enabled": {
|
||
"type": "boolean",
|
||
"description": "この機能が有効かどうか。"
|
||
}
|
||
}
|
||
},
|
||
"sensitive_word_avoidance": {
|
||
"type": "object",
|
||
"description": "センシティブワードフィルタリングの設定。",
|
||
"properties": {
|
||
"enabled": {
|
||
"type": "boolean",
|
||
"description": "この機能が有効かどうか。"
|
||
}
|
||
}
|
||
},
|
||
"user_input_form": {
|
||
"type": "array",
|
||
"description": "ユーザー入力フォーム要素のリスト。",
|
||
"items": {
|
||
"$ref": "#/components/schemas/UserInputFormItem"
|
||
}
|
||
},
|
||
"file_upload": {
|
||
"type": "object",
|
||
"description": "ファイルアップロードの設定。",
|
||
"properties": {
|
||
"image": {
|
||
"type": "object",
|
||
"description": "画像アップロードの設定。",
|
||
"properties": {
|
||
"enabled": {
|
||
"type": "boolean",
|
||
"description": "画像アップロードが有効かどうか。"
|
||
},
|
||
"number_limits": {
|
||
"type": "integer",
|
||
"description": "最大画像数。"
|
||
},
|
||
"detail": {
|
||
"type": "string",
|
||
"description": "画像の詳細レベル。"
|
||
},
|
||
"transfer_methods": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string",
|
||
"enum": [
|
||
"remote_url",
|
||
"local_file"
|
||
]
|
||
},
|
||
"description": "許可された転送方法。"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"system_parameters": {
|
||
"type": "object",
|
||
"description": "システムレベルのパラメータと制限。",
|
||
"properties": {
|
||
"file_size_limit": {
|
||
"type": "integer",
|
||
"description": "最大ファイルサイズ(MB)。"
|
||
},
|
||
"image_file_size_limit": {
|
||
"type": "integer",
|
||
"description": "最大画像ファイルサイズ(MB)。"
|
||
},
|
||
"audio_file_size_limit": {
|
||
"type": "integer",
|
||
"description": "最大音声ファイルサイズ(MB)。"
|
||
},
|
||
"video_file_size_limit": {
|
||
"type": "integer",
|
||
"description": "最大動画ファイルサイズ(MB)。"
|
||
},
|
||
"workflow_file_upload_limit": {
|
||
"type": "integer",
|
||
"description": "ワークフローファイルアップロードの最大ファイル数。"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"UserInputFormItem": {
|
||
"type": "object",
|
||
"oneOf": [
|
||
{
|
||
"$ref": "#/components/schemas/TextInputControlWrapper"
|
||
},
|
||
{
|
||
"$ref": "#/components/schemas/ParagraphControlWrapper"
|
||
},
|
||
{
|
||
"$ref": "#/components/schemas/SelectControlWrapper"
|
||
}
|
||
]
|
||
},
|
||
"TextInputControlWrapper": {
|
||
"title": "Text Input",
|
||
"type": "object",
|
||
"properties": {
|
||
"text-input": {
|
||
"$ref": "#/components/schemas/TextInputControl"
|
||
}
|
||
}
|
||
},
|
||
"ParagraphControlWrapper": {
|
||
"title": "Paragraph",
|
||
"type": "object",
|
||
"properties": {
|
||
"paragraph": {
|
||
"$ref": "#/components/schemas/ParagraphControl"
|
||
}
|
||
}
|
||
},
|
||
"SelectControlWrapper": {
|
||
"title": "Select",
|
||
"type": "object",
|
||
"properties": {
|
||
"select": {
|
||
"$ref": "#/components/schemas/SelectControl"
|
||
}
|
||
}
|
||
},
|
||
"TextInputControl": {
|
||
"type": "object",
|
||
"properties": {
|
||
"label": {
|
||
"type": "string",
|
||
"description": "フォームフィールドの表示ラベル。"
|
||
},
|
||
"variable": {
|
||
"type": "string",
|
||
"description": "`inputs` オブジェクトのキーとして使用される変数名。"
|
||
},
|
||
"required": {
|
||
"type": "boolean",
|
||
"description": "送信前にこのフィールドを入力する必要があるかどうか。"
|
||
},
|
||
"default": {
|
||
"type": "string",
|
||
"description": "フォームフィールドに事前入力されるデフォルト値。"
|
||
}
|
||
}
|
||
},
|
||
"ParagraphControl": {
|
||
"type": "object",
|
||
"properties": {
|
||
"label": {
|
||
"type": "string",
|
||
"description": "フォームフィールドの表示ラベル。"
|
||
},
|
||
"variable": {
|
||
"type": "string",
|
||
"description": "`inputs` オブジェクトのキーとして使用される変数名。"
|
||
},
|
||
"required": {
|
||
"type": "boolean",
|
||
"description": "送信前にこのフィールドを入力する必要があるかどうか。"
|
||
},
|
||
"default": {
|
||
"type": "string",
|
||
"description": "フォームフィールドに事前入力されるデフォルト値。"
|
||
}
|
||
}
|
||
},
|
||
"SelectControl": {
|
||
"type": "object",
|
||
"properties": {
|
||
"label": {
|
||
"type": "string",
|
||
"description": "フォームフィールドの表示ラベル。"
|
||
},
|
||
"variable": {
|
||
"type": "string",
|
||
"description": "`inputs` オブジェクトのキーとして使用される変数名。"
|
||
},
|
||
"required": {
|
||
"type": "boolean",
|
||
"description": "送信前に選択を行う必要があるかどうか。"
|
||
},
|
||
"default": {
|
||
"type": "string",
|
||
"description": "デフォルトで選択される値。"
|
||
},
|
||
"options": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"description": "このフォームコントロールの選択可能な値のリスト。"
|
||
}
|
||
}
|
||
},
|
||
"AppMetaResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"tool_icons": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"oneOf": [
|
||
{
|
||
"title": "Icon URL",
|
||
"type": "string",
|
||
"format": "url",
|
||
"description": "アイコンの URL。"
|
||
},
|
||
{
|
||
"$ref": "#/components/schemas/ToolIconDetail"
|
||
}
|
||
]
|
||
},
|
||
"description": "ツールアイコン。キーはツール名です。"
|
||
}
|
||
}
|
||
},
|
||
"ToolIconDetail": {
|
||
"title": "Emoji Icon",
|
||
"type": "object",
|
||
"description": "絵文字を使用したツールアイコンの詳細。",
|
||
"properties": {
|
||
"background": {
|
||
"type": "string",
|
||
"description": "16進数形式の背景色。"
|
||
},
|
||
"content": {
|
||
"type": "string",
|
||
"description": "Emoji コンテンツ。"
|
||
}
|
||
}
|
||
},
|
||
"WebAppSettingsResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"title": {
|
||
"type": "string",
|
||
"description": "WebApp タイトル。"
|
||
},
|
||
"chat_color_theme": {
|
||
"type": "string",
|
||
"description": "チャットカラーテーマ。"
|
||
},
|
||
"chat_color_theme_inverted": {
|
||
"type": "boolean",
|
||
"description": "チャットカラーテーマが反転しているかどうか。"
|
||
},
|
||
"icon_type": {
|
||
"type": "string",
|
||
"description": "使用されるアイコンのタイプ。`emoji` は絵文字アイコン、`image` はアップロードされた画像アイコンです。"
|
||
},
|
||
"icon": {
|
||
"type": "string",
|
||
"description": "アイコンのコンテンツ(絵文字または画像 ID)。"
|
||
},
|
||
"icon_background": {
|
||
"type": "string",
|
||
"description": "アイコンの背景色。"
|
||
},
|
||
"icon_url": {
|
||
"type": "string",
|
||
"format": "url",
|
||
"nullable": true,
|
||
"description": "アイコン画像の URL。"
|
||
},
|
||
"description": {
|
||
"type": "string",
|
||
"description": "WebApp の説明。"
|
||
},
|
||
"copyright": {
|
||
"type": "string",
|
||
"description": "著作権テキスト。"
|
||
},
|
||
"privacy_policy": {
|
||
"type": "string",
|
||
"description": "プライバシーポリシー URL。"
|
||
},
|
||
"custom_disclaimer": {
|
||
"type": "string",
|
||
"description": "カスタム免責事項テキスト。"
|
||
},
|
||
"default_language": {
|
||
"type": "string",
|
||
"description": "デフォルト言語コード。"
|
||
},
|
||
"show_workflow_steps": {
|
||
"type": "boolean",
|
||
"description": "ワークフローステップを表示するかどうか。"
|
||
},
|
||
"use_icon_as_answer_icon": {
|
||
"type": "boolean",
|
||
"description": "アプリアイコンを回答アイコンとして使用するかどうか。"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"tags": [
|
||
{
|
||
"name": "完了メッセージ",
|
||
"description": "テキスト生成に関連する操作です。"
|
||
},
|
||
{
|
||
"name": "ファイル操作",
|
||
"description": "ファイル管理に関連する操作です。"
|
||
},
|
||
{
|
||
"name": "エンドユーザー",
|
||
"description": "エンドユーザー情報に関連する操作です。"
|
||
},
|
||
{
|
||
"name": "メッセージフィードバック",
|
||
"description": "ユーザーフィードバックに関連する操作です。"
|
||
},
|
||
{
|
||
"name": "音声・テキスト変換",
|
||
"description": "テキスト読み上げと音声認識に関連する操作です。"
|
||
},
|
||
{
|
||
"name": "アプリケーション設定",
|
||
"description": "アプリケーション設定と情報を取得する操作です。"
|
||
}
|
||
]
|
||
}
|