donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
64 lines • 2.73 kB
TypeScript
import { CustomTool } from './CustomTool';
import { ProposedToolCall } from './ProposedToolCall';
import { RunMode } from './FlowMetadata';
import { JSONSchema7 } from 'json-schema';
import { BrowserConfig } from './BrowserConfig';
/**
* This is the expected payload for a request to create a new DonobuFlow flow.
*/
export type CreateDonobuFlow = {
/** The initial website to load */
readonly targetWebsite: string;
/**
* The overall objective to pursue; can only be omitted if `initialRunMode`
* has an effective value of `INSTRUCT` or `DETEMINISTIC`.
*/
readonly overallObjective?: string;
/** The name for this flow; if present, must be fewer than 256 characters. */
readonly name?: string;
readonly browser?: BrowserConfig;
/**
* The URL to HTTP POST to when the flow completes. The body will contain a
* JSON object with single field, "id", of which is the ID of the flow that
* completed.
*/
readonly callbackUrl?: string;
/**
* Custom tools to enable for this flow. Any tools specified here will be
* implicitly added to allowedTools.
*/
readonly customTools?: CustomTool[];
/**
* The maximum number of times to iterate with the underlying GPT.
*/
readonly maxIterations?: number;
/**
* The name of a specific GPT configuration to use. If the corresponding GPT
* configuration is not defined or unresolvable, the default flow agent
* configuration will be used.
**/
readonly gptConfigNameOverride?: string;
/** The default amount of time a tool tip should show (in milliseconds). */
readonly defaultToolTipDurationMilliseconds?: number;
/**
* The initial run mode of the flow. If not specified, defaults to
* AUTONOMOUS if gptPlatform is non-null, otherwise, defaults to INSTRUCT.
*/
readonly initialRunMode?: RunMode;
/**
* Set to true if the in-browser control panel should be enabled.
* If the headless parameter is true, then this parameter is ignored.
*/
readonly isControlPanelEnabled?: boolean;
/**
* If present and non-empty, will constrain the flow to only use these tools (by
* Tool.name()). If null or empty, then there are no constraints on the types of
* tools used. Note that all tools in customTools are implicitly added here.
*/
readonly allowedTools?: string[];
/** An ordered series of tool calls to invoke when starting the flow. */
readonly toolCallsOnStart?: ProposedToolCall<any>[];
/** If non-null, the Donobu flow will attempt to save its result using this JSON-schema. */
readonly resultJsonSchema?: JSONSchema7;
};
//# sourceMappingURL=CreateDonobuFlow.d.ts.map