Files
log10ts/docs/sdks/feedbacktasks/README.md

143 lines
12 KiB
Markdown

# FeedbackTasks
(*feedbackTasks*)
## Overview
FeedbackTasks
### Available Operations
* [list](#list) - List feedback tasks.
* [create](#create) - Create a new task.
* [get](#get) - Retrieves feedback task `taskId`.
## list
List feedback tasks.
### Example Usage
```typescript
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 | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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\<[models.ListFeedbackTasksResponse](../../models/listfeedbacktasksresponse.md)\>**
### Errors
| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| models.SDKError | 4xx-5xx | */* |
## create
Create a new task.
### Example Usage
```typescript
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` | [models.Task](../../models/task.md) | :heavy_check_mark: | The request object to use for the request. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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\<[models.CreateFeedbackTaskResponse](../../models/createfeedbacktaskresponse.md)\>**
### Errors
| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| models.SDKError | 4xx-5xx | */* |
## get
Retrieves feedback task `taskId`.
### Example Usage
```typescript
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* | :heavy_check_mark: | The task id to fetch. |
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | 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\<[models.GetFeedbackTaskResponse](../../models/getfeedbacktaskresponse.md)\>**
### Errors
| Error Object | Status Code | Content Type |
| --------------- | --------------- | --------------- |
| models.SDKError | 4xx-5xx | */* |