Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:FlowiseAI Flowise RunAgain

From Leeroopedia
Property Value
Implementation Name RunAgain
Implements Principle:FlowiseAI_Flowise_Evaluation_Rerun
Source packages/ui/src/api/evaluations.js
Repository FlowiseAI/Flowise
Domain API Client, Evaluation Re-execution
Last Updated 2026-02-12 14:00 GMT

Code Reference

Source Location

The evaluation re-run API function is defined in packages/ui/src/api/evaluations.js at line 9.

Signature

// packages/ui/src/api/evaluations.js:L9
const runAgain = (id) => client.post(`/evaluations/run-again/${id}`)

The API client is configured at packages/ui/src/api/client.js with a base URL of ${baseURL}/api/v1, making the full endpoint:

  • POST /api/v1/evaluations/run-again/{id}

Import

import evaluationApi from '@/api/evaluations'

I/O Contract

runAgain

Inputs:

  • id (string, required): The unique identifier of the evaluation to re-run

Outputs:

  • Promise<void>: Resolves when the re-run has been initiated. The re-run creates a new version of the evaluation with incremented version number and a new runDate. After the re-run is triggered, the UI typically redirects to the evaluations list page.

Side Effects:

  • Creates a new version entry for the evaluation with the same dataset, evaluators, and chatflow configuration
  • The new version tests against the current state of the chatflow, capturing any modifications made since the previous run
  • The new version appears in the version timeline accessible via getVersions

Usage Examples

Re-running an Evaluation After Chatflow Modification

import evaluationApi from '@/api/evaluations'

// After modifying the chatflow (e.g., updated system prompt),
// re-run the same evaluation to measure improvement
await evaluationApi.runAgain('eval-run-123')

// The system creates a new version automatically.
// Navigate to the evaluation results to compare versions.

Using with useApi Hook and Navigation

import React from 'react'
import { useNavigate } from 'react-router-dom'
import useApi from '@/hooks/useApi'
import evaluationApi from '@/api/evaluations'

const EvaluationActions = ({ evaluationId }) => {
    const navigate = useNavigate()
    const runAgainApi = useApi(evaluationApi.runAgain)

    const handleRunAgain = async () => {
        await runAgainApi.request(evaluationId)
        // Redirect to evaluations list to see the new version
        navigate('/evaluations')
    }

    return (
        <button onClick={handleRunAgain}>
            Run Again
        </button>
    )
}

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment