UNPKG

@squidcloud/client

Version:

A typescript implementation of the Squid client

51 lines (50 loc) 1.79 kB
/** Backend related public types that should be available on the client SDK */ /** A type alias for a string that represents an AI function ID. */ export type AiFunctionId = string; /** A type alias for a string that represents an AI functions configurator ID. */ export type AiFunctionsConfiguratorId = string; /** * A type alias for a service identifier. * @category Queue */ export type TopicName = string; /** A type alias for a service class name. */ export type ServiceName = string; /** A type alias for a function name within a service. */ export type FunctionName = string; /** * Function name with contextual data, where the data must be serializable as JSON. */ export interface AiFunctionIdWithContext { /** * The ID of the AI function as described in @aiFunction decorator. * Historically named as 'name' because AI function name is the default value for 'ID'. */ name: AiFunctionId; /** A record of contextual data associated with the function call. */ context?: Record<string, unknown>; /** A list of predefined parameter values for the AI function. These parameters are hidden from the AI. */ predefinedParameters?: Record<string, unknown>; } /** * A combined service and function name in the format 'ServiceName:FunctionName'. * Uniquely identifies a function within a service. */ export type ServiceFunctionName = `${ServiceName}:${FunctionName}`; /** * LLM model name for use in API calls, eg. "gpt-4o-mini". */ export type LlmModelName = string; /** * Stats about a given LLM model. */ export type LlmModelMetadata = { /** * A friendly name for the model, to display in UIs. */ displayName: string; /** * The max number of input tokens that the model can handle. */ maxTokens: number; };