94 lines
3.6 KiB
TypeScript
94 lines
3.6 KiB
TypeScript
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
import type { InferenceFilter } from "./InferenceFilter";
|
|
import type { InferenceOutputSource } from "./InferenceOutputSource";
|
|
import type { OrderBy } from "./OrderBy";
|
|
|
|
/**
|
|
* Request to create datapoints from inferences.
|
|
*/
|
|
export type CreateDatapointsFromInferenceRequest =
|
|
| {
|
|
type: "inference_ids";
|
|
/**
|
|
* The inference IDs to create datapoints from.
|
|
*/
|
|
inference_ids: Array<string>;
|
|
/**
|
|
* When creating the datapoint, this specifies the source of the output for the datapoint.
|
|
* If not provided, by default we will use the original inference output as the datapoint's output
|
|
* (equivalent to `inference`).
|
|
*/
|
|
output_source?: InferenceOutputSource;
|
|
}
|
|
| {
|
|
type: "inference_query";
|
|
/**
|
|
* Optional function name to filter inferences by.
|
|
* If provided, only inferences from this function will be returned.
|
|
*/
|
|
function_name?: string;
|
|
/**
|
|
* Optional variant name to filter inferences by.
|
|
* If provided, only inferences from this variant will be returned.
|
|
*/
|
|
variant_name?: string;
|
|
/**
|
|
* Optional episode ID to filter inferences by.
|
|
* If provided, only inferences from this episode will be returned.
|
|
*/
|
|
episode_id?: string;
|
|
/**
|
|
* Source of the inference output. Determines whether to return the original
|
|
* inference output or demonstration feedback (manually-curated output) if available.
|
|
* Defaults to `Inference` if not specified.
|
|
*/
|
|
output_source?: InferenceOutputSource;
|
|
/**
|
|
* The maximum number of inferences to return.
|
|
* Defaults to 20.
|
|
*/
|
|
limit?: number;
|
|
/**
|
|
* The number of inferences to skip before starting to return results.
|
|
* Defaults to 0.
|
|
*/
|
|
offset?: number;
|
|
/**
|
|
* Optional inference ID to paginate before (exclusive).
|
|
* Returns inferences with IDs before this one (earlier in time).
|
|
* Cannot be used together with `after` or `offset`.
|
|
*/
|
|
before?: string;
|
|
/**
|
|
* Optional inference ID to paginate after (exclusive).
|
|
* Returns inferences with IDs after this one (later in time).
|
|
* Cannot be used together with `before` or `offset`.
|
|
*/
|
|
after?: string;
|
|
/**
|
|
* Optional filter to apply when querying inferences.
|
|
* Supports filtering by metrics, tags, time, and logical combinations (AND/OR/NOT).
|
|
*/
|
|
filters?: InferenceFilter;
|
|
/**
|
|
* Optional ordering criteria for the results.
|
|
* Supports multiple sort criteria (e.g., sort by timestamp then by metric).
|
|
*/
|
|
order_by?: Array<OrderBy>;
|
|
/**
|
|
* Text query to filter. Case-insensitive substring search over the inferences' input and output.
|
|
*
|
|
* THIS FEATURE IS EXPERIMENTAL, and we may change or remove it at any time.
|
|
* We recommend against depending on this feature for critical use cases.
|
|
*
|
|
* Important limitations:
|
|
* - This requires an exact substring match; we do not tokenize this query string.
|
|
* - This doesn't search for any content in the template itself.
|
|
* - Quality is based on term frequency > 0, without any relevance scoring.
|
|
* - There are no performance guarantees (it's best effort only). Today, with no other
|
|
* filters, it will perform a full table scan, which may be extremely slow depending
|
|
* on the data volume.
|
|
*/
|
|
search_query_experimental?: string;
|
|
};
|