INNER CODE UNIT · TypeScript

newImageTurnState

growthbook/growthbook · packages/back-end/src/api/visual-editor-ai/aiTools/index.ts:41

export function newImageTurnState(): ImageTurnState {
  return {
    count: 0,
    max: IMAGE_GEN_PER_TURN_MAX,
    generated: [],
    warnings: [],
  };
}

export function buildVisualEditorTools({
  context,
  job,
  pageStructure,
  disabled = false,
  imageState,
  quarantineImages = true,
}: VisualEditorToolsetOptions): ToolSet | undefined {
  if (disabled) return undefined;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…