Update Eval Source
curl --request PATCH \
--url https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "eval-source-patch",
"id": "<string>",
"source": {
"filePath": "<string>",
"exportName": "<string>",
"content": "<string>"
},
"fields": {
"name": "<string>",
"description": "<string>",
"target": "<string>",
"repetitions": 1,
"tags": [
"<string>"
],
"metadata": {},
"metrics": [
{
"name": "<string>",
"editable": true,
"dynamic": true,
"threshold": {
"min": 123,
"max": 123
},
"config": {}
}
]
}
}
'import requests
url = "https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source"
payload = {
"kind": "eval-source-patch",
"id": "<string>",
"source": {
"filePath": "<string>",
"exportName": "<string>",
"content": "<string>"
},
"fields": {
"name": "<string>",
"description": "<string>",
"target": "<string>",
"repetitions": 1,
"tags": ["<string>"],
"metadata": {},
"metrics": [
{
"name": "<string>",
"editable": True,
"dynamic": True,
"threshold": {
"min": 123,
"max": 123
},
"config": {}
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
kind: 'eval-source-patch',
id: '<string>',
source: {filePath: '<string>', exportName: '<string>', content: '<string>'},
fields: {
name: '<string>',
description: '<string>',
target: '<string>',
repetitions: 1,
tags: ['<string>'],
metadata: {},
metrics: [
{
name: '<string>',
editable: true,
dynamic: true,
threshold: {min: 123, max: 123},
config: {}
}
]
}
})
};
fetch('https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source', 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.veryfront.com/projects/{project_reference}/evals/{eval_id}/source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'kind' => 'eval-source-patch',
'id' => '<string>',
'source' => [
'filePath' => '<string>',
'exportName' => '<string>',
'content' => '<string>'
],
'fields' => [
'name' => '<string>',
'description' => '<string>',
'target' => '<string>',
'repetitions' => 1,
'tags' => [
'<string>'
],
'metadata' => [
],
'metrics' => [
[
'name' => '<string>',
'editable' => true,
'dynamic' => true,
'threshold' => [
'min' => 123,
'max' => 123
],
'config' => [
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.veryfront.com/projects/{project_reference}/evals/{eval_id}/source"
payload := strings.NewReader("{\n \"kind\": \"eval-source-patch\",\n \"id\": \"<string>\",\n \"source\": {\n \"filePath\": \"<string>\",\n \"exportName\": \"<string>\",\n \"content\": \"<string>\"\n },\n \"fields\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"target\": \"<string>\",\n \"repetitions\": 1,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"metrics\": [\n {\n \"name\": \"<string>\",\n \"editable\": true,\n \"dynamic\": true,\n \"threshold\": {\n \"min\": 123,\n \"max\": 123\n },\n \"config\": {}\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"eval-source-patch\",\n \"id\": \"<string>\",\n \"source\": {\n \"filePath\": \"<string>\",\n \"exportName\": \"<string>\",\n \"content\": \"<string>\"\n },\n \"fields\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"target\": \"<string>\",\n \"repetitions\": 1,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"metrics\": [\n {\n \"name\": \"<string>\",\n \"editable\": true,\n \"dynamic\": true,\n \"threshold\": {\n \"min\": 123,\n \"max\": 123\n },\n \"config\": {}\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"kind\": \"eval-source-patch\",\n \"id\": \"<string>\",\n \"source\": {\n \"filePath\": \"<string>\",\n \"exportName\": \"<string>\",\n \"content\": \"<string>\"\n },\n \"fields\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"target\": \"<string>\",\n \"repetitions\": 1,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"metrics\": [\n {\n \"name\": \"<string>\",\n \"editable\": true,\n \"dynamic\": true,\n \"threshold\": {\n \"min\": 123,\n \"max\": 123\n },\n \"config\": {}\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"kind": "eval-source-document",
"id": "<string>",
"name": "<string>",
"targetKind": "agent",
"target": "<string>",
"source": {
"filePath": "<string>",
"exportName": "<string>",
"content": "<string>"
},
"dataset": {
"editable": true,
"dynamic": true,
"path": "<string>",
"examples": [
{
"id": "<string>",
"input": null,
"reference": null,
"metadata": {}
}
]
},
"metrics": [
{
"name": "<string>",
"editable": true,
"dynamic": true,
"threshold": {
"min": 123,
"max": 123
},
"config": {}
}
],
"repetitions": 1,
"tags": [
"<string>"
],
"metadata": {},
"editableFields": [],
"dynamicFields": [],
"capabilities": [],
"description": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}Updates a structured eval source document.
PATCH
/
projects
/
{project_reference}
/
evals
/
{eval_id}
/
source
Update Eval Source
curl --request PATCH \
--url https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "eval-source-patch",
"id": "<string>",
"source": {
"filePath": "<string>",
"exportName": "<string>",
"content": "<string>"
},
"fields": {
"name": "<string>",
"description": "<string>",
"target": "<string>",
"repetitions": 1,
"tags": [
"<string>"
],
"metadata": {},
"metrics": [
{
"name": "<string>",
"editable": true,
"dynamic": true,
"threshold": {
"min": 123,
"max": 123
},
"config": {}
}
]
}
}
'import requests
url = "https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source"
payload = {
"kind": "eval-source-patch",
"id": "<string>",
"source": {
"filePath": "<string>",
"exportName": "<string>",
"content": "<string>"
},
"fields": {
"name": "<string>",
"description": "<string>",
"target": "<string>",
"repetitions": 1,
"tags": ["<string>"],
"metadata": {},
"metrics": [
{
"name": "<string>",
"editable": True,
"dynamic": True,
"threshold": {
"min": 123,
"max": 123
},
"config": {}
}
]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
kind: 'eval-source-patch',
id: '<string>',
source: {filePath: '<string>', exportName: '<string>', content: '<string>'},
fields: {
name: '<string>',
description: '<string>',
target: '<string>',
repetitions: 1,
tags: ['<string>'],
metadata: {},
metrics: [
{
name: '<string>',
editable: true,
dynamic: true,
threshold: {min: 123, max: 123},
config: {}
}
]
}
})
};
fetch('https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source', 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.veryfront.com/projects/{project_reference}/evals/{eval_id}/source",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'kind' => 'eval-source-patch',
'id' => '<string>',
'source' => [
'filePath' => '<string>',
'exportName' => '<string>',
'content' => '<string>'
],
'fields' => [
'name' => '<string>',
'description' => '<string>',
'target' => '<string>',
'repetitions' => 1,
'tags' => [
'<string>'
],
'metadata' => [
],
'metrics' => [
[
'name' => '<string>',
'editable' => true,
'dynamic' => true,
'threshold' => [
'min' => 123,
'max' => 123
],
'config' => [
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.veryfront.com/projects/{project_reference}/evals/{eval_id}/source"
payload := strings.NewReader("{\n \"kind\": \"eval-source-patch\",\n \"id\": \"<string>\",\n \"source\": {\n \"filePath\": \"<string>\",\n \"exportName\": \"<string>\",\n \"content\": \"<string>\"\n },\n \"fields\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"target\": \"<string>\",\n \"repetitions\": 1,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"metrics\": [\n {\n \"name\": \"<string>\",\n \"editable\": true,\n \"dynamic\": true,\n \"threshold\": {\n \"min\": 123,\n \"max\": 123\n },\n \"config\": {}\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"eval-source-patch\",\n \"id\": \"<string>\",\n \"source\": {\n \"filePath\": \"<string>\",\n \"exportName\": \"<string>\",\n \"content\": \"<string>\"\n },\n \"fields\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"target\": \"<string>\",\n \"repetitions\": 1,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"metrics\": [\n {\n \"name\": \"<string>\",\n \"editable\": true,\n \"dynamic\": true,\n \"threshold\": {\n \"min\": 123,\n \"max\": 123\n },\n \"config\": {}\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/projects/{project_reference}/evals/{eval_id}/source")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"kind\": \"eval-source-patch\",\n \"id\": \"<string>\",\n \"source\": {\n \"filePath\": \"<string>\",\n \"exportName\": \"<string>\",\n \"content\": \"<string>\"\n },\n \"fields\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"target\": \"<string>\",\n \"repetitions\": 1,\n \"tags\": [\n \"<string>\"\n ],\n \"metadata\": {},\n \"metrics\": [\n {\n \"name\": \"<string>\",\n \"editable\": true,\n \"dynamic\": true,\n \"threshold\": {\n \"min\": 123,\n \"max\": 123\n },\n \"config\": {}\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"kind": "eval-source-document",
"id": "<string>",
"name": "<string>",
"targetKind": "agent",
"target": "<string>",
"source": {
"filePath": "<string>",
"exportName": "<string>",
"content": "<string>"
},
"dataset": {
"editable": true,
"dynamic": true,
"path": "<string>",
"examples": [
{
"id": "<string>",
"input": null,
"reference": null,
"metadata": {}
}
]
},
"metrics": [
{
"name": "<string>",
"editable": true,
"dynamic": true,
"threshold": {
"min": 123,
"max": 123
},
"config": {}
}
],
"repetitions": 1,
"tags": [
"<string>"
],
"metadata": {},
"editableFields": [],
"dynamicFields": [],
"capabilities": [],
"description": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"error": "<string>",
"message": "<string>",
"source_only_reasons": [
"<string>"
],
"source_path": "<string>"
}Authorizations
bearerAuthapiKeyAuth
Use a JWT bearer token or a Veryfront API key in the Authorization header.
Body
application/json
Response
Updated eval source document
Available options:
eval-source-document Available options:
agent Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required range:
x > 0Show child attributes
Show child attributes
Available options:
name, description, target, dataset, repetitions, tags, metadata, metrics, check Available options:
name, description, target, dataset, repetitions, tags, metadata, metrics, check Available options:
project.evals.read, project.evals.write, project.evals.run ⌘I