86 lines
2.1 KiB
TypeScript
86 lines
2.1 KiB
TypeScript
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
import type { ContentBlockOutput } from "./ContentBlockOutput";
|
|
import type { StoredRequestMessage } from "./StoredRequestMessage";
|
|
|
|
/**
|
|
* Wire type for a single ModelInference (raw request and response sent to a model).
|
|
*/
|
|
export type ModelInference = {
|
|
/**
|
|
* Unique identifier for the ModelInference.
|
|
*/
|
|
id: string;
|
|
/**
|
|
* Unique identifier for the inference.
|
|
*/
|
|
inference_id: string;
|
|
/**
|
|
* Raw request sent to the model.
|
|
*/
|
|
raw_request?: string;
|
|
/**
|
|
* Raw response received from the model.
|
|
*/
|
|
raw_response?: string;
|
|
/**
|
|
* Name of the model used for the inference.
|
|
*/
|
|
model_name: string;
|
|
/**
|
|
* Name of the model provider used for the inference.
|
|
*/
|
|
model_provider_name: string;
|
|
/**
|
|
* Number of input tokens used for the inference.
|
|
* This may be missing if the model inference provider does not report token usage.
|
|
*/
|
|
input_tokens?: number;
|
|
/**
|
|
* Number of output tokens used for the inference.
|
|
* This may be missing if the model inference provider does not report token usage.
|
|
*/
|
|
output_tokens?: number;
|
|
/**
|
|
* Response time in milliseconds.
|
|
*/
|
|
response_time_ms?: number;
|
|
/**
|
|
* Time to first token in milliseconds.
|
|
*/
|
|
ttft_ms?: number;
|
|
/**
|
|
* Timestamp of the inference.
|
|
*/
|
|
timestamp: string;
|
|
/**
|
|
* System prompt used for the inference.
|
|
*/
|
|
system?: string;
|
|
/**
|
|
* Input messages sent to the model.
|
|
*/
|
|
input_messages?: Array<StoredRequestMessage>;
|
|
/**
|
|
* Output content blocks from the model.
|
|
*/
|
|
output?: Array<ContentBlockOutput>;
|
|
/**
|
|
* Number of input tokens read from the provider's prompt cache.
|
|
* None if the provider does not report cache token counts.
|
|
*/
|
|
provider_cache_read_input_tokens?: number;
|
|
/**
|
|
* Number of input tokens written to the provider's prompt cache.
|
|
* None if the provider does not report cache token counts.
|
|
*/
|
|
provider_cache_write_input_tokens?: number;
|
|
/**
|
|
* Whether the inference was cached.
|
|
*/
|
|
cached: boolean;
|
|
/**
|
|
* Cost of the inference.
|
|
*/
|
|
cost: number | undefined;
|
|
};
|