Labelling
Listar projetos de rotulagem
Lista os projetos de rotulagem que o chamador pode ver, por data de criação. Um detentor de can_list_llm_resources vê todos os projetos da organização; qualquer outra pessoa vê os projetos que criou ou que a nomeiam como rotulador ou revisor.
GET
/
api
/
v1
/
llm
/
labelling
/
projects
Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.labelling.list_projects(limit=20, order="desc")
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.labelling.listProjects({});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.Llm.Labelling.ListProjects(ctx, operations.ListLabellingProjectsRequest{})
if err != nil {
log.Fatal(err)
}
if res.ListLabellingProjectsResponse != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
ListLabellingProjectsRequest req = new ListLabellingProjectsRequest() {};
var res = await sdk.Llm.Labelling.ListProjectsAsync(req);
// handle responsecurl --request GET \
--url https://apigw.mka1.com/api/v1/llm/labelling/projects \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/llm/labelling/projects', 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://apigw.mka1.com/api/v1/llm/labelling/projects",
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;
}HttpResponse<String> response = Unirest.get("https://apigw.mka1.com/api/v1/llm/labelling/projects")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/labelling/projects")
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{
"object": "list",
"data": [
{
"object": "labelling.project",
"id": "<string>",
"name": "<string>",
"instructions": "<string>",
"status": "active",
"source": {
"type": "upload"
},
"labels_per_item": 1,
"review_rule": "all",
"labeller_user_ids": [
"<string>"
],
"reviewer_user_ids": [
"<string>"
],
"schema_version": 0,
"questions": [
{
"id": "<string>",
"kind": "single_choice",
"prompt": "<string>",
"required": true,
"options": [
{
"id": "<string>",
"label": "<string>"
}
],
"tags": [
{
"id": "<string>",
"label": "<string>"
}
],
"field": "<string>",
"shown_when": {
"question": "<string>",
"in": [
"<string>"
]
}
}
],
"counts": {
"total": 0,
"to_label": 0,
"in_review": 0,
"sent_back": 0,
"accepted": 0,
"excluded": 0
},
"last_export": {
"version": 0,
"item_count": 0,
"published_at": "2023-11-07T05:31:56Z"
},
"my_roles": [
"manager"
],
"created_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"first_id": "<string>",
"last_id": "<string>"
}Autorizações
Parâmetros de consulta
Esta página foi útil?
⌘I
Python (SDK)
from meetkai_mka1 import SDK
with SDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as sdk:
res = sdk.llm.labelling.list_projects(limit=20, order="desc")
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK({
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});
async function run() {
const result = await sdk.llm.labelling.listProjects({});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New(
mka1.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
)
res, err := s.Llm.Labelling.ListProjects(ctx, operations.ListLabellingProjectsRequest{})
if err != nil {
log.Fatal(err)
}
if res.ListLabellingProjectsResponse != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Components;
using MeetKai.MKA1.Types.Requests;
var sdk = new SDK(bearerAuth: "<YOUR_BEARER_TOKEN_HERE>");
ListLabellingProjectsRequest req = new ListLabellingProjectsRequest() {};
var res = await sdk.Llm.Labelling.ListProjectsAsync(req);
// handle responsecurl --request GET \
--url https://apigw.mka1.com/api/v1/llm/labelling/projects \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apigw.mka1.com/api/v1/llm/labelling/projects', 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://apigw.mka1.com/api/v1/llm/labelling/projects",
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;
}HttpResponse<String> response = Unirest.get("https://apigw.mka1.com/api/v1/llm/labelling/projects")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/llm/labelling/projects")
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{
"object": "list",
"data": [
{
"object": "labelling.project",
"id": "<string>",
"name": "<string>",
"instructions": "<string>",
"status": "active",
"source": {
"type": "upload"
},
"labels_per_item": 1,
"review_rule": "all",
"labeller_user_ids": [
"<string>"
],
"reviewer_user_ids": [
"<string>"
],
"schema_version": 0,
"questions": [
{
"id": "<string>",
"kind": "single_choice",
"prompt": "<string>",
"required": true,
"options": [
{
"id": "<string>",
"label": "<string>"
}
],
"tags": [
{
"id": "<string>",
"label": "<string>"
}
],
"field": "<string>",
"shown_when": {
"question": "<string>",
"in": [
"<string>"
]
}
}
],
"counts": {
"total": 0,
"to_label": 0,
"in_review": 0,
"sent_back": 0,
"accepted": 0,
"excluded": 0
},
"last_export": {
"version": 0,
"item_count": 0,
"published_at": "2023-11-07T05:31:56Z"
},
"my_roles": [
"manager"
],
"created_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"first_id": "<string>",
"last_id": "<string>"
}