AI-1 & AI-2:完整性判定及发言整理
curl --request POST \
--url https://api.example.com/ai/v1/speech-process \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "<string>",
"cancer_type": "<string>",
"standard_department_code": "<string>",
"points": [
{
"seq": 123,
"name": "<string>"
}
],
"speech_text": "<string>",
"voice_segments": [
{
"voice_url": "<string>",
"start_ms": 123,
"end_ms": 123,
"text": "<string>"
}
]
}
'import requests
url = "https://api.example.com/ai/v1/speech-process"
payload = {
"request_id": "<string>",
"cancer_type": "<string>",
"standard_department_code": "<string>",
"points": [
{
"seq": 123,
"name": "<string>"
}
],
"speech_text": "<string>",
"voice_segments": [
{
"voice_url": "<string>",
"start_ms": 123,
"end_ms": 123,
"text": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
request_id: '<string>',
cancer_type: '<string>',
standard_department_code: '<string>',
points: [{seq: 123, name: '<string>'}],
speech_text: '<string>',
voice_segments: [{voice_url: '<string>', start_ms: 123, end_ms: 123, text: '<string>'}]
})
};
fetch('https://api.example.com/ai/v1/speech-process', 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.example.com/ai/v1/speech-process",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'request_id' => '<string>',
'cancer_type' => '<string>',
'standard_department_code' => '<string>',
'points' => [
[
'seq' => 123,
'name' => '<string>'
]
],
'speech_text' => '<string>',
'voice_segments' => [
[
'voice_url' => '<string>',
'start_ms' => 123,
'end_ms' => 123,
'text' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/ai/v1/speech-process"
payload := strings.NewReader("{\n \"request_id\": \"<string>\",\n \"cancer_type\": \"<string>\",\n \"standard_department_code\": \"<string>\",\n \"points\": [\n {\n \"seq\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"speech_text\": \"<string>\",\n \"voice_segments\": [\n {\n \"voice_url\": \"<string>\",\n \"start_ms\": 123,\n \"end_ms\": 123,\n \"text\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/ai/v1/speech-process")
.header("Content-Type", "application/json")
.body("{\n \"request_id\": \"<string>\",\n \"cancer_type\": \"<string>\",\n \"standard_department_code\": \"<string>\",\n \"points\": [\n {\n \"seq\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"speech_text\": \"<string>\",\n \"voice_segments\": [\n {\n \"voice_url\": \"<string>\",\n \"start_ms\": 123,\n \"end_ms\": 123,\n \"text\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/v1/speech-process")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"request_id\": \"<string>\",\n \"cancer_type\": \"<string>\",\n \"standard_department_code\": \"<string>\",\n \"points\": [\n {\n \"seq\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"speech_text\": \"<string>\",\n \"voice_segments\": [\n {\n \"voice_url\": \"<string>\",\n \"start_ms\": 123,\n \"end_ms\": 123,\n \"text\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"is_complete": true,
"covered": [
{
"seq": 123,
"name": "<string>"
}
],
"missing": [
{
"seq": 123,
"name": "<string>"
}
],
"organized": {
"structured": [
{
"seq": 123,
"point": "<string>",
"value": "<string>",
"source_text": "<string>",
"voices": [
"<string>"
]
}
],
"conclusion": "<string>"
},
"processor_version": {
"prompt": "<string>",
"model": "<string>"
},
"artifact_key": "<string>",
"from_cache": true
}{
"error": {
"kind": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"kind": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"kind": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"kind": "<string>",
"message": "<string>",
"retryable": true
}
}API Reference
AI-1 & AI-2:完整性判定及发言整理
同步调用。只判要点覆盖、不判对错;缺项时 organized 为 null。
POST
/
ai
/
v1
/
speech-process
AI-1 & AI-2:完整性判定及发言整理
curl --request POST \
--url https://api.example.com/ai/v1/speech-process \
--header 'Content-Type: application/json' \
--data '
{
"request_id": "<string>",
"cancer_type": "<string>",
"standard_department_code": "<string>",
"points": [
{
"seq": 123,
"name": "<string>"
}
],
"speech_text": "<string>",
"voice_segments": [
{
"voice_url": "<string>",
"start_ms": 123,
"end_ms": 123,
"text": "<string>"
}
]
}
'import requests
url = "https://api.example.com/ai/v1/speech-process"
payload = {
"request_id": "<string>",
"cancer_type": "<string>",
"standard_department_code": "<string>",
"points": [
{
"seq": 123,
"name": "<string>"
}
],
"speech_text": "<string>",
"voice_segments": [
{
"voice_url": "<string>",
"start_ms": 123,
"end_ms": 123,
"text": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
request_id: '<string>',
cancer_type: '<string>',
standard_department_code: '<string>',
points: [{seq: 123, name: '<string>'}],
speech_text: '<string>',
voice_segments: [{voice_url: '<string>', start_ms: 123, end_ms: 123, text: '<string>'}]
})
};
fetch('https://api.example.com/ai/v1/speech-process', 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.example.com/ai/v1/speech-process",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'request_id' => '<string>',
'cancer_type' => '<string>',
'standard_department_code' => '<string>',
'points' => [
[
'seq' => 123,
'name' => '<string>'
]
],
'speech_text' => '<string>',
'voice_segments' => [
[
'voice_url' => '<string>',
'start_ms' => 123,
'end_ms' => 123,
'text' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/ai/v1/speech-process"
payload := strings.NewReader("{\n \"request_id\": \"<string>\",\n \"cancer_type\": \"<string>\",\n \"standard_department_code\": \"<string>\",\n \"points\": [\n {\n \"seq\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"speech_text\": \"<string>\",\n \"voice_segments\": [\n {\n \"voice_url\": \"<string>\",\n \"start_ms\": 123,\n \"end_ms\": 123,\n \"text\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/ai/v1/speech-process")
.header("Content-Type", "application/json")
.body("{\n \"request_id\": \"<string>\",\n \"cancer_type\": \"<string>\",\n \"standard_department_code\": \"<string>\",\n \"points\": [\n {\n \"seq\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"speech_text\": \"<string>\",\n \"voice_segments\": [\n {\n \"voice_url\": \"<string>\",\n \"start_ms\": 123,\n \"end_ms\": 123,\n \"text\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/ai/v1/speech-process")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"request_id\": \"<string>\",\n \"cancer_type\": \"<string>\",\n \"standard_department_code\": \"<string>\",\n \"points\": [\n {\n \"seq\": 123,\n \"name\": \"<string>\"\n }\n ],\n \"speech_text\": \"<string>\",\n \"voice_segments\": [\n {\n \"voice_url\": \"<string>\",\n \"start_ms\": 123,\n \"end_ms\": 123,\n \"text\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"request_id": "<string>",
"is_complete": true,
"covered": [
{
"seq": 123,
"name": "<string>"
}
],
"missing": [
{
"seq": 123,
"name": "<string>"
}
],
"organized": {
"structured": [
{
"seq": 123,
"point": "<string>",
"value": "<string>",
"source_text": "<string>",
"voices": [
"<string>"
]
}
],
"conclusion": "<string>"
},
"processor_version": {
"prompt": "<string>",
"model": "<string>"
},
"artifact_key": "<string>",
"from_cache": true
}{
"error": {
"kind": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"kind": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"kind": "<string>",
"message": "<string>",
"retryable": true
}
}{
"error": {
"kind": "<string>",
"message": "<string>",
"retryable": true
}
}Body
application/json
Minimum string length:
1Minimum array length:
1Show child attributes
Show child attributes
医生完整发言文本;传全量,被退回补充后也是发全量
Minimum string length:
1首版不传:不实现追溯到原语音
Show child attributes
Show child attributes
Response
判定整理结果
覆盖到的要点(含医生表示不适用的)
Show child attributes
Show child attributes
未覆盖的要点;covered ∪ missing == 请求的 points 全集
Show child attributes
Show child attributes
★ 要点未说完时整块为 null,不产出任何整理结果与结语
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I