curl --request POST \
--url https://api.example.com/feedback/replace \
--header 'Content-Type: application/json' \
--data '
{
"feedback_id": "<string>",
"feedback_type": "<string>",
"payload": {},
"project_id": "<string>",
"weave_ref": "<string>",
"annotation_ref": "weave:///entity/project/object/name:digest",
"call_ref": "weave:///entity/project/call/call_id",
"creator": "Jane Smith",
"id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"queue_id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"runnable_ref": "weave:///entity/project/op/name:digest",
"scorer_rating_confidences": {},
"scorer_rating_reasons": {},
"scorer_ratings": {},
"scorer_tag_confidences": {},
"scorer_tag_reasons": {},
"scorer_tags": [
"<string>"
],
"span_agent_name": "",
"span_agent_version": "",
"span_status_code": "UNSET",
"trigger_ref": "weave:///entity/project/object/name:digest",
"wb_user_id": "<string>"
}
'import requests
url = "https://api.example.com/feedback/replace"
payload = {
"feedback_id": "<string>",
"feedback_type": "<string>",
"payload": {},
"project_id": "<string>",
"weave_ref": "<string>",
"annotation_ref": "weave:///entity/project/object/name:digest",
"call_ref": "weave:///entity/project/call/call_id",
"creator": "Jane Smith",
"id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"queue_id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"runnable_ref": "weave:///entity/project/op/name:digest",
"scorer_rating_confidences": {},
"scorer_rating_reasons": {},
"scorer_ratings": {},
"scorer_tag_confidences": {},
"scorer_tag_reasons": {},
"scorer_tags": ["<string>"],
"span_agent_name": "",
"span_agent_version": "",
"span_status_code": "UNSET",
"trigger_ref": "weave:///entity/project/object/name:digest",
"wb_user_id": "<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({
feedback_id: '<string>',
feedback_type: '<string>',
payload: {},
project_id: '<string>',
weave_ref: '<string>',
annotation_ref: 'weave:///entity/project/object/name:digest',
call_ref: 'weave:///entity/project/call/call_id',
creator: 'Jane Smith',
id: '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
queue_id: '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
runnable_ref: 'weave:///entity/project/op/name:digest',
scorer_rating_confidences: {},
scorer_rating_reasons: {},
scorer_ratings: {},
scorer_tag_confidences: {},
scorer_tag_reasons: {},
scorer_tags: ['<string>'],
span_agent_name: '',
span_agent_version: '',
span_status_code: 'UNSET',
trigger_ref: 'weave:///entity/project/object/name:digest',
wb_user_id: '<string>'
})
};
fetch('https://api.example.com/feedback/replace', 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/feedback/replace",
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([
'feedback_id' => '<string>',
'feedback_type' => '<string>',
'payload' => [
],
'project_id' => '<string>',
'weave_ref' => '<string>',
'annotation_ref' => 'weave:///entity/project/object/name:digest',
'call_ref' => 'weave:///entity/project/call/call_id',
'creator' => 'Jane Smith',
'id' => '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
'queue_id' => '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
'runnable_ref' => 'weave:///entity/project/op/name:digest',
'scorer_rating_confidences' => [
],
'scorer_rating_reasons' => [
],
'scorer_ratings' => [
],
'scorer_tag_confidences' => [
],
'scorer_tag_reasons' => [
],
'scorer_tags' => [
'<string>'
],
'span_agent_name' => '',
'span_agent_version' => '',
'span_status_code' => 'UNSET',
'trigger_ref' => 'weave:///entity/project/object/name:digest',
'wb_user_id' => '<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/feedback/replace"
payload := strings.NewReader("{\n \"feedback_id\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"creator\": \"Jane Smith\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"scorer_rating_confidences\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_ratings\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_tag_reasons\": {},\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"span_agent_name\": \"\",\n \"span_agent_version\": \"\",\n \"span_status_code\": \"UNSET\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"wb_user_id\": \"<string>\"\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/feedback/replace")
.header("Content-Type", "application/json")
.body("{\n \"feedback_id\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"creator\": \"Jane Smith\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"scorer_rating_confidences\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_ratings\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_tag_reasons\": {},\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"span_agent_name\": \"\",\n \"span_agent_version\": \"\",\n \"span_status_code\": \"UNSET\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"wb_user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/feedback/replace")
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 \"feedback_id\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"creator\": \"Jane Smith\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"scorer_rating_confidences\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_ratings\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_tag_reasons\": {},\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"span_agent_name\": \"\",\n \"span_agent_version\": \"\",\n \"span_status_code\": \"UNSET\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"wb_user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"payload": {},
"wb_user_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Remplacement de feedback
curl --request POST \
--url https://api.example.com/feedback/replace \
--header 'Content-Type: application/json' \
--data '
{
"feedback_id": "<string>",
"feedback_type": "<string>",
"payload": {},
"project_id": "<string>",
"weave_ref": "<string>",
"annotation_ref": "weave:///entity/project/object/name:digest",
"call_ref": "weave:///entity/project/call/call_id",
"creator": "Jane Smith",
"id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"queue_id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"runnable_ref": "weave:///entity/project/op/name:digest",
"scorer_rating_confidences": {},
"scorer_rating_reasons": {},
"scorer_ratings": {},
"scorer_tag_confidences": {},
"scorer_tag_reasons": {},
"scorer_tags": [
"<string>"
],
"span_agent_name": "",
"span_agent_version": "",
"span_status_code": "UNSET",
"trigger_ref": "weave:///entity/project/object/name:digest",
"wb_user_id": "<string>"
}
'import requests
url = "https://api.example.com/feedback/replace"
payload = {
"feedback_id": "<string>",
"feedback_type": "<string>",
"payload": {},
"project_id": "<string>",
"weave_ref": "<string>",
"annotation_ref": "weave:///entity/project/object/name:digest",
"call_ref": "weave:///entity/project/call/call_id",
"creator": "Jane Smith",
"id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"queue_id": "018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b",
"runnable_ref": "weave:///entity/project/op/name:digest",
"scorer_rating_confidences": {},
"scorer_rating_reasons": {},
"scorer_ratings": {},
"scorer_tag_confidences": {},
"scorer_tag_reasons": {},
"scorer_tags": ["<string>"],
"span_agent_name": "",
"span_agent_version": "",
"span_status_code": "UNSET",
"trigger_ref": "weave:///entity/project/object/name:digest",
"wb_user_id": "<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({
feedback_id: '<string>',
feedback_type: '<string>',
payload: {},
project_id: '<string>',
weave_ref: '<string>',
annotation_ref: 'weave:///entity/project/object/name:digest',
call_ref: 'weave:///entity/project/call/call_id',
creator: 'Jane Smith',
id: '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
queue_id: '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
runnable_ref: 'weave:///entity/project/op/name:digest',
scorer_rating_confidences: {},
scorer_rating_reasons: {},
scorer_ratings: {},
scorer_tag_confidences: {},
scorer_tag_reasons: {},
scorer_tags: ['<string>'],
span_agent_name: '',
span_agent_version: '',
span_status_code: 'UNSET',
trigger_ref: 'weave:///entity/project/object/name:digest',
wb_user_id: '<string>'
})
};
fetch('https://api.example.com/feedback/replace', 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/feedback/replace",
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([
'feedback_id' => '<string>',
'feedback_type' => '<string>',
'payload' => [
],
'project_id' => '<string>',
'weave_ref' => '<string>',
'annotation_ref' => 'weave:///entity/project/object/name:digest',
'call_ref' => 'weave:///entity/project/call/call_id',
'creator' => 'Jane Smith',
'id' => '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
'queue_id' => '018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b',
'runnable_ref' => 'weave:///entity/project/op/name:digest',
'scorer_rating_confidences' => [
],
'scorer_rating_reasons' => [
],
'scorer_ratings' => [
],
'scorer_tag_confidences' => [
],
'scorer_tag_reasons' => [
],
'scorer_tags' => [
'<string>'
],
'span_agent_name' => '',
'span_agent_version' => '',
'span_status_code' => 'UNSET',
'trigger_ref' => 'weave:///entity/project/object/name:digest',
'wb_user_id' => '<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/feedback/replace"
payload := strings.NewReader("{\n \"feedback_id\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"creator\": \"Jane Smith\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"scorer_rating_confidences\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_ratings\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_tag_reasons\": {},\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"span_agent_name\": \"\",\n \"span_agent_version\": \"\",\n \"span_status_code\": \"UNSET\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"wb_user_id\": \"<string>\"\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/feedback/replace")
.header("Content-Type", "application/json")
.body("{\n \"feedback_id\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"creator\": \"Jane Smith\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"scorer_rating_confidences\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_ratings\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_tag_reasons\": {},\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"span_agent_name\": \"\",\n \"span_agent_version\": \"\",\n \"span_status_code\": \"UNSET\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"wb_user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/feedback/replace")
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 \"feedback_id\": \"<string>\",\n \"feedback_type\": \"<string>\",\n \"payload\": {},\n \"project_id\": \"<string>\",\n \"weave_ref\": \"<string>\",\n \"annotation_ref\": \"weave:///entity/project/object/name:digest\",\n \"call_ref\": \"weave:///entity/project/call/call_id\",\n \"creator\": \"Jane Smith\",\n \"id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"queue_id\": \"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b\",\n \"runnable_ref\": \"weave:///entity/project/op/name:digest\",\n \"scorer_rating_confidences\": {},\n \"scorer_rating_reasons\": {},\n \"scorer_ratings\": {},\n \"scorer_tag_confidences\": {},\n \"scorer_tag_reasons\": {},\n \"scorer_tags\": [\n \"<string>\"\n ],\n \"span_agent_name\": \"\",\n \"span_agent_version\": \"\",\n \"span_status_code\": \"UNSET\",\n \"trigger_ref\": \"weave:///entity/project/object/name:digest\",\n \"wb_user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"payload": {},
"wb_user_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Corps
"custom"
{ "key": "value" }"entity/project"
"weave:///entity/project/object/name:digest"
"weave:///entity/project/object/name:digest"
"weave:///entity/project/call/call_id"
"Jane Smith"
S'il est fourni par le client, cet ID sera utilisé pour la ligne de feedback au lieu d'un ID généré par le serveur.
"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b"
ID de la file d'attente d'annotation à partir de laquelle ce feedback a été créé. Référence à annotation_queues.id. NULL lorsque le feedback est créé en dehors des files d'attente.
"018f1f2a-9c2b-7d3e-b5a1-8c9d2e4f6a7b"
"weave:///entity/project/op/name:digest"
confiance (0-1) par note, avec le nom de la note comme clé
Show child attributes
Show child attributes
{ "_rating_": 0.92 }texte explicatif par note, avec le nom de la note comme clé
Show child attributes
Show child attributes
{ "_rating_": "very confident response" }notes numériques (0-1), avec le nom de la note comme clé
Show child attributes
Show child attributes
{ "_rating_": 0.87 }confiance (0-1) par tag, avec le nom du tag comme clé
Show child attributes
Show child attributes
{ "nsfw": 0.92 }texte explicatif par tag, avec le nom du tag comme clé
Show child attributes
Show child attributes
{ "nsfw": "Contains explicit language" }Tags appliqués à la ref par un scorer
["nsfw", "high-quality"]Nom d’affichage de l’agent évalué (à partir de spans.agent_name)
"midi-generator"
Version de l’agent évalué (à partir de spans.agent_version)
"1.2.0"
Statut du tour de conversation évalué (à partir de spans.status_code)
"SUCCESS"
"weave:///entity/project/object/name:digest"
Ne définissez pas ce champ directement. Le serveur le renseignera automatiquement.
Cette page vous a-t-elle été utile ?