Files
log10ts/docs/sdks/feedbacktasks/README.md
2024-05-24 17:16:47 -07:00

12 KiB
Raw Permalink Blame History

FeedbackTasks

(feedbackTasks)

Overview

FeedbackTasks

Available Operations

  • list - List feedback tasks.
  • create - Create a new task.
  • get - Retrieves feedback task taskId.

list

List feedback tasks.

Example Usage

import { Log10 } from "log10ts";

const log10 = new Log10({
  log10Token: "<YOUR_API_KEY_HERE>",
  xLog10Organization: "<value>",
});

async function run() {
  const result = await log10.feedbackTasks.list();

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.ListFeedbackTasksResponse>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

create

Create a new task.

Example Usage

import { Log10 } from "log10ts";

const log10 = new Log10({
  log10Token: "<YOUR_API_KEY_HERE>",
  xLog10Organization: "<value>",
});

async function run() {
  const result = await log10.feedbackTasks.create({
    jsonSchema: {},
    name: "<value>",
    instruction: "<value>",
    completionTagsSelector: {},
  });

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
request components.Task ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.CreateFeedbackTaskResponse>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /

get

Retrieves feedback task taskId.

Example Usage

import { Log10 } from "log10ts";

const log10 = new Log10({
  log10Token: "<YOUR_API_KEY_HERE>",
  xLog10Organization: "<value>",
});

async function run() {
  const result = await log10.feedbackTasks.get("<value>");

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
taskId string ✔️ The task id to fetch.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetFeedbackTaskResponse>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /