アプリケーションのパラメータ情報を取得
対象アプリ:Chatflow、Workflow、Agent、チャットボット、レガシー Agent、テキストジェネレーター。
アプリのフロントエンド設定(開始文と推奨質問、機能トグル、ユーザー入力フォーム、ファイルアップロード上限)を返します。アプリの入力をレンダリングし、正しいアップロード上限を適用するために使用します。
curl --request GET \
--url https://{api_base_url}/parameters \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/parameters"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{api_base_url}/parameters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api_base_url}/parameters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{api_base_url}/parameters"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{api_base_url}/parameters")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/parameters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"annotation_reply": {
"enabled": false
},
"file_upload": {
"image": {
"detail": "high",
"enabled": true,
"number_limits": 3,
"transfer_methods": [
"remote_url",
"local_file"
]
}
},
"more_like_this": {
"enabled": false
},
"opening_statement": "Hello! How can I help you today?",
"retriever_resource": {
"enabled": true
},
"sensitive_word_avoidance": {
"enabled": false
},
"speech_to_text": {
"enabled": false
},
"suggested_questions": [
"What can you do?",
"Tell me about your features."
],
"suggested_questions_after_answer": {
"enabled": true
},
"system_parameters": {
"audio_file_size_limit": 50,
"file_size_limit": 15,
"image_file_size_limit": 10,
"video_file_size_limit": 100,
"workflow_file_upload_limit": 10
},
"text_to_speech": {
"autoPlay": "disabled",
"enabled": false,
"language": "en-US",
"voice": "alloy"
},
"user_input_form": [
{
"text-input": {
"default": "",
"label": "City",
"required": true,
"variable": "city"
}
}
]
}Authorizations
すべてのリクエストは API キーで認証します:Authorization: Bearer {API_KEY}。アプリのエンドポイントにはアプリの API キーを、ナレッジのエンドポイントにはナレッジベースの API キーを使用します(Dify API クイックスタート)。
キーはサーバーサイドで保管し、クライアントコードには決して埋め込まないでください。キーが欠落または無効なリクエストは HTTP 401(unauthorized)で失敗します。
Response
アプリケーションパラメータ情報。
アノテーション返信機能の設定です。
Show child attributes
Show child attributes
ファイルアップロードの設定。
Show child attributes
Show child attributes
類似コンテンツ機能の設定です。
Show child attributes
Show child attributes
オープニングステートメントのテキストです。
ナレッジ検索の引用リソース設定です。
Show child attributes
Show child attributes
コンテンツモデレーション機能の設定です。
Show child attributes
Show child attributes
音声テキスト変換機能の設定です。
Show child attributes
Show child attributes
提案された質問のリストです。
回答後の提案質問の設定です。
Show child attributes
Show child attributes
システムレベルのパラメータ制限です。
Show child attributes
Show child attributes
テキスト音声変換機能の設定です。
Show child attributes
Show child attributes
ユーザー入力フォームの設定です。
- Text Input
- Paragraph
- Select
Show child attributes
Show child attributes
Was this page helpful?
curl --request GET \
--url https://{api_base_url}/parameters \
--header 'Authorization: Bearer <token>'import requests
url = "https://{api_base_url}/parameters"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{api_base_url}/parameters', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{api_base_url}/parameters",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{api_base_url}/parameters"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{api_base_url}/parameters")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{api_base_url}/parameters")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"annotation_reply": {
"enabled": false
},
"file_upload": {
"image": {
"detail": "high",
"enabled": true,
"number_limits": 3,
"transfer_methods": [
"remote_url",
"local_file"
]
}
},
"more_like_this": {
"enabled": false
},
"opening_statement": "Hello! How can I help you today?",
"retriever_resource": {
"enabled": true
},
"sensitive_word_avoidance": {
"enabled": false
},
"speech_to_text": {
"enabled": false
},
"suggested_questions": [
"What can you do?",
"Tell me about your features."
],
"suggested_questions_after_answer": {
"enabled": true
},
"system_parameters": {
"audio_file_size_limit": 50,
"file_size_limit": 15,
"image_file_size_limit": 10,
"video_file_size_limit": 100,
"workflow_file_upload_limit": 10
},
"text_to_speech": {
"autoPlay": "disabled",
"enabled": false,
"language": "en-US",
"voice": "alloy"
},
"user_input_form": [
{
"text-input": {
"default": "",
"label": "City",
"required": true,
"variable": "city"
}
}
]
}