@promptbook/google
Version:
Promptbook: Turn your company's scattered knowledge into AI ready books
117 lines (116 loc) • 3.08 kB
TypeScript
import type { TODO_any } from '../utils/organization/TODO_any';
import type { string_date_iso8601 } from './typeAliases';
/**
* Represents a single tool call with its inputs, outputs, and timing.
*
* Note: This is fully serializable as JSON.
*/
export type ToolCall = {
/**
* Name of the tool.
*/
readonly name: string;
/**
* Arguments for the tool call.
*/
readonly arguments?: string | Record<string, TODO_any>;
/**
* Result of the tool call.
*/
readonly result?: TODO_any;
/**
* Raw tool call payload from the model.
*/
readonly rawToolCall?: TODO_any;
/**
* Timestamp when the tool call was initiated.
*/
readonly createdAt?: string_date_iso8601;
/**
* Errors thrown during tool execution.
*/
readonly errors?: ReadonlyArray<TODO_any>;
/**
* Warnings reported during tool execution.
*/
readonly warnings?: ReadonlyArray<TODO_any>;
};
/**
* Breakdown of teacher-learned commitment categories for self-learning.
*/
export type SelfLearningCommitmentTypeCounts = {
/**
* Total number of learned commitments.
*/
readonly total: number;
/**
* Count of knowledge commitments.
*/
readonly knowledge: number;
/**
* Count of rule commitments.
*/
readonly rule: number;
/**
* Count of persona commitments.
*/
readonly persona: number;
/**
* Count of other commitment types.
*/
readonly other: number;
};
/**
* Summary of the teacher review step during self-learning.
*/
export type SelfLearningTeacherSummary = {
/**
* Indicates whether the teacher step was used.
*/
readonly used: boolean;
/**
* Commitment breakdown produced by the teacher step.
*/
readonly commitmentTypes: SelfLearningCommitmentTypeCounts;
/**
* Normalized commitment lines produced by the teacher step.
*/
readonly commitments?: ReadonlyArray<string>;
};
/**
* Result payload for the self-learning tool call.
*/
export type SelfLearningToolCallResult = {
/**
* Indicates whether self-learning completed successfully.
*/
readonly success: boolean;
/**
* Timestamp for when self-learning started.
*/
readonly startedAt?: string_date_iso8601;
/**
* Timestamp for when self-learning finished.
*/
readonly completedAt?: string_date_iso8601;
/**
* Number of conversation examples saved from this turn.
*/
readonly samplesAdded?: number;
/**
* Summary of the teacher review step.
*/
readonly teacher?: SelfLearningTeacherSummary;
};
/**
* Tool call name emitted while preparing a GPT assistant for an agent.
*
* @public exported from `@promptbook/types`
*/
export declare const ASSISTANT_PREPARATION_TOOL_CALL_NAME = "assistant_preparation";
/**
* Checks whether a tool call is the assistant preparation marker.
*
* @public exported from `@promptbook/types`
*/
export declare function isAssistantPreparationToolCall(toolCall: ToolCall): boolean;