mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-23 21:21:20 +08:00
Merge feat/content-blocks-backend-v2 (rebuilt content_blocks + v1-compat) into feat/content-blocks-frontend-v2
Restack onto the rebuilt #13364. The backend (v2 epic, content_blocks model, AG-UI translator) is already merged into release-1.11.0 and superseded by the rebuilt #13364, so all backend conflicts resolve to the new base; #13391's contribution reduces to the content_blocks frontend renderer.
This commit is contained in:
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -260,7 +260,8 @@ jobs:
|
||||
(
|
||||
inputs.run-all-tests ||
|
||||
(needs.path-filter.result != 'skipped' &&
|
||||
needs.path-filter.outputs.docs-only != 'true')
|
||||
needs.path-filter.outputs.docs-only != 'true' &&
|
||||
needs.path-filter.outputs.python == 'true')
|
||||
)
|
||||
uses: ./.github/workflows/python_test.yml
|
||||
with:
|
||||
|
||||
162
.github/workflows/cross-bundle-test.yml
vendored
Normal file
162
.github/workflows/cross-bundle-test.yml
vendored
Normal file
@ -0,0 +1,162 @@
|
||||
name: Cross-Bundle Test
|
||||
|
||||
# Tests every extracted bundle (the lfx-bundles metapackage + each graduated
|
||||
# lfx-<provider>) against the lfx contract surface it depends on. lfx is the
|
||||
# PRIMARY axis because the BUNDLE_API contract lives in lfx: a bundle that
|
||||
# imports cleanly, validates, and passes its tests against a given lfx is
|
||||
# compatible with that lfx minor.
|
||||
#
|
||||
# Cost-control shape (from the bundle-separation epic):
|
||||
# - contract-smoke (install + import + discover + validate): every bundle,
|
||||
# on the oldest and latest supported Python.
|
||||
# - bundle tests (pytest the bundle's own tests/): same matrix.
|
||||
# - scheduled run: weekly, the exhaustive grid.
|
||||
#
|
||||
# The lfx-minor axis is currently a single entry -- the IN-REPO lfx -- because
|
||||
# the 1.10 line is not yet published to PyPI. When lfx minors publish, add an
|
||||
# explicit lfx-version matrix dimension here (oldest + latest get the full
|
||||
# tests; every supported minor gets contract-smoke), and wire langflow RCs as
|
||||
# the secondary axis via workflow_call from the release pipeline.
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths:
|
||||
- "src/bundles/**"
|
||||
- "src/lfx/**"
|
||||
- ".github/workflows/cross-bundle-test.yml"
|
||||
schedule:
|
||||
- cron: "0 6 * * 1" # Monday 06:00 UTC -- exhaustive grid
|
||||
|
||||
# Stacked bundle PRs would otherwise queue N-bundles x N-pythons jobs per push.
|
||||
concurrency:
|
||||
group: cross-bundle-${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
discover:
|
||||
name: Discover bundles
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
outputs:
|
||||
bundles: ${{ steps.find.outputs.bundles }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- id: find
|
||||
name: Enumerate src/bundles/*/pyproject.toml
|
||||
run: |
|
||||
shopt -s nullglob
|
||||
dirs=()
|
||||
for p in src/bundles/*/pyproject.toml; do
|
||||
dirs+=("$(dirname "$p")")
|
||||
done
|
||||
if [ ${#dirs[@]} -eq 0 ]; then
|
||||
echo "No bundles found under src/bundles/*/" >&2
|
||||
echo "bundles=[]" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
json=$(printf '%s\n' "${dirs[@]}" | sort | jq -R . | jq -cs .)
|
||||
echo "bundles=$json" >> "$GITHUB_OUTPUT"
|
||||
echo "Discovered bundles: $json"
|
||||
|
||||
bundle:
|
||||
name: ${{ matrix.bundle }} (py${{ matrix.python-version }})
|
||||
needs: discover
|
||||
if: needs.discover.outputs.bundles != '[]'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
bundle: ${{ fromJson(needs.discover.outputs.bundles) }}
|
||||
# PR runs: oldest + latest supported Python (cost-control smoke).
|
||||
# Scheduled runs: every supported Python (the exhaustive grid).
|
||||
# The lfx-minor axis collapses to the in-repo lfx until the 1.10 line
|
||||
# publishes (see header).
|
||||
python-version: ${{ github.event_name == 'schedule' && fromJson('["3.10", "3.11", "3.12", "3.13", "3.14"]') || fromJson('["3.10", "3.13"]') }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "uv.lock"
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install in-repo lfx + the bundle into a clean venv
|
||||
run: |
|
||||
uv venv
|
||||
# The in-repo lfx satisfies the bundle's `lfx>=X,<Y` pin and is the
|
||||
# contract surface under test; pytest is for the bundle's own tests.
|
||||
# tomli backports stdlib tomllib for the py3.10 matrix leg.
|
||||
uv pip install ./src/lfx "./${{ matrix.bundle }}" pytest pytest-asyncio tomli
|
||||
|
||||
- name: Contract smoke -- import + discovery
|
||||
run: |
|
||||
.venv/bin/python - "${{ matrix.bundle }}" <<'PY'
|
||||
import importlib
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
try:
|
||||
import tomllib # stdlib from 3.11
|
||||
except ModuleNotFoundError:
|
||||
import tomli as tomllib # py3.10 backport, installed above
|
||||
|
||||
bundle_dir = Path(sys.argv[1])
|
||||
meta = tomllib.loads((bundle_dir / "pyproject.toml").read_text())
|
||||
name = meta["project"]["name"]
|
||||
eps = meta["project"].get("entry-points", {})
|
||||
|
||||
# Manifest bundles declare langflow.extensions; the manifest-less
|
||||
# metapackage declares lfx.bundles. Either way the declared package
|
||||
# must import.
|
||||
modules = list(eps.get("langflow.extensions", {}).values()) or list(eps.get("lfx.bundles", {}).values())
|
||||
assert modules, f"{name}: no langflow.extensions or lfx.bundles entry-point declared"
|
||||
for value in modules:
|
||||
importlib.import_module(value.split(":", 1)[0])
|
||||
print(f" imported {value}")
|
||||
|
||||
# The manifest-less metapackage must be discoverable by the loader.
|
||||
# This venv installs the bundle WITHOUT its per-provider extras, so
|
||||
# providers whose modules import their SDK at top level degrade with
|
||||
# `module-import-failed` -- that is the expected graceful-degradation
|
||||
# contract, not a failure. Structural errors (bundle-empty,
|
||||
# path-escape, invalid names, ...) still fail the smoke. A provider
|
||||
# whose every module failed import also reports no components, which
|
||||
# is fine here; the bundle's own tests cover behavior with SDKs.
|
||||
if "lfx.bundles" in eps:
|
||||
from lfx.extension import load_lfx_bundles_extensions
|
||||
|
||||
EXPECTED_WITHOUT_EXTRAS = {"module-import-failed"}
|
||||
results = load_lfx_bundles_extensions()
|
||||
bad = [e.code for r in results for e in r.errors if e.code not in EXPECTED_WITHOUT_EXTRAS]
|
||||
assert not bad, f"{name}: lfx.bundles structural discovery errors: {bad}"
|
||||
providers = sum(1 for r in results if r.bundle)
|
||||
degraded = sum(1 for r in results for e in r.errors if e.code in EXPECTED_WITHOUT_EXTRAS)
|
||||
print(f" lfx.bundles discovery OK ({providers} providers; {degraded} module(s) degraded sans extras)")
|
||||
print(f"{name}: contract smoke OK")
|
||||
PY
|
||||
|
||||
- name: Validate manifest (manifest-shipping bundles only)
|
||||
run: |
|
||||
# Manifest bundles ship extension.json; the manifest-less metapackage
|
||||
# has none and is exempt from `lfx extension validate`.
|
||||
manifest=$(ls "${{ matrix.bundle }}"/src/*/extension.json 2>/dev/null | head -1 || true)
|
||||
if [ -n "$manifest" ]; then
|
||||
.venv/bin/lfx extension validate "$(dirname "$manifest")"
|
||||
else
|
||||
echo "manifest-less bundle; skipping extension validate"
|
||||
fi
|
||||
|
||||
- name: Run the bundle's own tests
|
||||
run: |
|
||||
if [ -d "${{ matrix.bundle }}/tests" ]; then
|
||||
.venv/bin/python -m pytest "${{ matrix.bundle }}/tests" -q
|
||||
else
|
||||
echo "no tests/ directory in ${{ matrix.bundle }}; skipping"
|
||||
fi
|
||||
23
.github/workflows/cross-platform-test.md
vendored
23
.github/workflows/cross-platform-test.md
vendored
@ -58,9 +58,14 @@ jobs:
|
||||
- **macOS**: Intel (AMD64), Apple Silicon (ARM64)
|
||||
- **Windows**: AMD64
|
||||
- **Python versions**:
|
||||
- **All platforms**: 3.10, 3.12, and 3.13
|
||||
- **Stability**: 3.10 and 3.12 are required to pass (blocking)
|
||||
- **Preview**: 3.13 testing is optional (non-blocking) to monitor ecosystem readiness
|
||||
- **All platforms**: 3.10, 3.12, 3.13, and 3.14
|
||||
- **Stability**: 3.10, 3.12, and 3.13 are required to pass (blocking)
|
||||
- **Preview**: 3.14 testing is optional (non-blocking) to monitor ecosystem readiness
|
||||
- **Note**: macOS Intel (x86_64) is tested only on Python 3.12. macOS x86_64 is
|
||||
being dropped across the ecosystem — PyTorch ships no x86_64 wheels for py>=3.13
|
||||
and onnxruntime shipped none after 1.23 — and langflow requires `onnxruntime>=1.26`
|
||||
on py>=3.14, so macOS Intel + py>=3.14 cannot resolve. The 3.13 (blocking) and
|
||||
3.14 (preview) sets therefore run on Linux, Windows, and macOS arm64 only
|
||||
|
||||
## What Gets Tested
|
||||
|
||||
@ -103,8 +108,8 @@ gh workflow run cross-platform-test.yml \
|
||||
- **Timeout**: Configurable timeout with proper cross-platform handling
|
||||
|
||||
### Platform-Specific Optimizations
|
||||
- **Stable versions**: Python 3.10 and 3.12 provide reliable package ecosystem support
|
||||
- **Preview testing**: Python 3.13 runs as non-blocking to monitor when it becomes viable
|
||||
- **Stable versions**: Python 3.10, 3.12, and 3.13 provide reliable package ecosystem support
|
||||
- **Preview testing**: Python 3.14 runs as non-blocking to monitor when it becomes viable
|
||||
- **Virtual Environments**: Uses `uv venv --seed` for consistent pip availability
|
||||
|
||||
### Workflow Architecture
|
||||
@ -187,9 +192,11 @@ error: command '/usr/bin/clang++' failed with exit code 1
|
||||
3. **macOS clang** doesn't support `-march=native` flag used by `chroma-hnswlib` compilation
|
||||
|
||||
**Current Status**:
|
||||
- **Stable testing**: Python 3.10 and 3.12 are required to pass (blocking jobs)
|
||||
- **Preview testing**: Python 3.13 runs as non-blocking to monitor ecosystem readiness
|
||||
- **Compilation issues**: Python 3.13 may still fail due to `chroma-hnswlib` but won't block releases
|
||||
- **Stable testing**: Python 3.10, 3.12, and 3.13 are required to pass (blocking jobs)
|
||||
- **Preview testing**: Python 3.14 runs as non-blocking to monitor ecosystem readiness
|
||||
- **Compilation issues**: the historical `chroma-hnswlib` failure is avoided on the tested install
|
||||
paths (workspace/source builds exclude `chromadb`); a similar upstream issue surfacing on the
|
||||
preview (3.14) tier stays non-blocking
|
||||
- **Manual testing**: Source builds now use the same dependency transformation as nightly builds for testing parity
|
||||
|
||||
**Files Involved**:
|
||||
|
||||
82
.github/workflows/cross-platform-test.yml
vendored
82
.github/workflows/cross-platform-test.yml
vendored
@ -178,6 +178,23 @@ jobs:
|
||||
arch: amd64
|
||||
runner: windows-latest
|
||||
python-version: "3.12"
|
||||
# Python 3.13 - graduated from experimental to stable (blocking).
|
||||
# macOS Intel (amd64) is intentionally omitted here: like 3.10/3.12 above
|
||||
# it stays on the costly macos-latest-large runner only at 3.12. Intel
|
||||
# coverage for newer Python continues (non-blocking) in the experimental
|
||||
# 3.14 set below.
|
||||
- os: linux
|
||||
arch: amd64
|
||||
runner: ubuntu-latest
|
||||
python-version: "3.13"
|
||||
- os: macos
|
||||
arch: arm64
|
||||
runner: macos-latest
|
||||
python-version: "3.13"
|
||||
- os: windows
|
||||
arch: amd64
|
||||
runner: windows-latest
|
||||
python-version: "3.13"
|
||||
|
||||
steps:
|
||||
- name: Determine install method
|
||||
@ -454,23 +471,26 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Python 3.13 - Experimental
|
||||
# Python 3.14 - Experimental (non-blocking) to monitor ecosystem readiness.
|
||||
# macOS Intel (x86_64) is intentionally omitted: langflow requires
|
||||
# onnxruntime>=1.26 on Python >=3.14 (pyproject.toml), but onnxruntime
|
||||
# dropped macOS x86_64 wheels at 1.24 — so macOS Intel + py3.14 is
|
||||
# permanently unsatisfiable (older onnxruntime that still ships macOS
|
||||
# x86_64 wheels has no cp314 ABI). macOS Intel resolves fine through 3.13;
|
||||
# arm64 has cp314 wheels. Running it would only burn the costly
|
||||
# macos-latest-large runner on a guaranteed, no-signal failure.
|
||||
- os: linux
|
||||
arch: amd64
|
||||
runner: ubuntu-latest
|
||||
python-version: "3.13"
|
||||
python-version: "3.14"
|
||||
- os: windows
|
||||
arch: amd64
|
||||
runner: windows-latest
|
||||
python-version: "3.13"
|
||||
- os: macos
|
||||
arch: amd64
|
||||
runner: macos-latest-large
|
||||
python-version: "3.13"
|
||||
python-version: "3.14"
|
||||
- os: macos
|
||||
arch: arm64
|
||||
runner: macos-latest
|
||||
python-version: "3.13"
|
||||
python-version: "3.14"
|
||||
|
||||
steps:
|
||||
- name: Determine install method
|
||||
@ -615,6 +635,19 @@ jobs:
|
||||
- name: Force reinstall local wheels to prevent downgrades (Windows)
|
||||
if: steps.install-method.outputs.method == 'wheel' && matrix.os == 'windows'
|
||||
run: |
|
||||
# Expose the local wheel dirs so dependency re-resolution (the
|
||||
# pre-release path below drops --no-deps) can find the local
|
||||
# pre-release lfx/base wheels. Without these, uv re-resolves
|
||||
# langflow-base's `lfx>=X.Y.Zrc0` constraint against PyPI only, where
|
||||
# the matching rc/dev wheel is not published yet, and fails with
|
||||
# "No solution found when resolving dependencies".
|
||||
FIND_LINKS=()
|
||||
for wheel_dir in ./sdk-dist ./lfx-dist ./base-dist ./bundles-dist; do
|
||||
if [ -d "$wheel_dir" ]; then
|
||||
FIND_LINKS+=(--find-links "$wheel_dir")
|
||||
fi
|
||||
done
|
||||
|
||||
# Reinstall LFX if it was provided
|
||||
if [ -n "${{ inputs.lfx-artifact-name || needs.build-if-needed.outputs.lfx-artifact-name }}" ]; then
|
||||
LFX_WHEEL=$(find ./lfx-dist -name "*.whl" -type f | head -1)
|
||||
@ -633,7 +666,7 @@ jobs:
|
||||
if [ "${{ inputs.pre_release }}" = "true" ]; then
|
||||
NO_DEPS=""
|
||||
fi
|
||||
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/Scripts/python.exe "${INSTALL_WHEELS[@]}"
|
||||
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit "${FIND_LINKS[@]}" --python ./test-env/Scripts/python.exe "${INSTALL_WHEELS[@]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -645,13 +678,26 @@ jobs:
|
||||
if [ "${{ inputs.pre_release }}" = "true" ]; then
|
||||
NO_DEPS=""
|
||||
fi
|
||||
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/Scripts/python.exe "$BASE_WHEEL"
|
||||
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit "${FIND_LINKS[@]}" --python ./test-env/Scripts/python.exe "$BASE_WHEEL"
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Force reinstall local wheels to prevent downgrades (Unix)
|
||||
if: steps.install-method.outputs.method == 'wheel' && matrix.os != 'windows'
|
||||
run: |
|
||||
# Expose the local wheel dirs so dependency re-resolution (the
|
||||
# pre-release path below drops --no-deps) can find the local
|
||||
# pre-release lfx/base wheels. Without these, uv re-resolves
|
||||
# langflow-base's `lfx>=X.Y.Zrc0` constraint against PyPI only, where
|
||||
# the matching rc/dev wheel is not published yet, and fails with
|
||||
# "No solution found when resolving dependencies".
|
||||
FIND_LINKS=()
|
||||
for wheel_dir in ./sdk-dist ./lfx-dist ./base-dist ./bundles-dist; do
|
||||
if [ -d "$wheel_dir" ]; then
|
||||
FIND_LINKS+=(--find-links "$wheel_dir")
|
||||
fi
|
||||
done
|
||||
|
||||
# Reinstall LFX if it was provided
|
||||
if [ -n "${{ inputs.lfx-artifact-name || needs.build-if-needed.outputs.lfx-artifact-name }}" ]; then
|
||||
LFX_WHEEL=$(find ./lfx-dist -name "*.whl" -type f | head -1)
|
||||
@ -670,7 +716,7 @@ jobs:
|
||||
if [ "${{ inputs.pre_release }}" = "true" ]; then
|
||||
NO_DEPS=""
|
||||
fi
|
||||
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/bin/python "${INSTALL_WHEELS[@]}"
|
||||
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit "${FIND_LINKS[@]}" --python ./test-env/bin/python "${INSTALL_WHEELS[@]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -682,7 +728,7 @@ jobs:
|
||||
if [ "${{ inputs.pre_release }}" = "true" ]; then
|
||||
NO_DEPS=""
|
||||
fi
|
||||
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit --python ./test-env/bin/python "$BASE_WHEEL"
|
||||
uv pip install --force-reinstall $NO_DEPS --prerelease=if-necessary-or-explicit "${FIND_LINKS[@]}" --python ./test-env/bin/python "$BASE_WHEEL"
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
@ -826,9 +872,9 @@ jobs:
|
||||
if [ "$experimental_result" = "success" ]; then
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
if [ -n "${{ inputs.langflow-version }}" ]; then
|
||||
echo "✅ All PyPI installation tests passed (including Python 3.13)"
|
||||
echo "✅ All PyPI installation tests passed (including Python 3.14)"
|
||||
else
|
||||
echo "✅ All source build and installation tests passed (including Python 3.13)"
|
||||
echo "✅ All source build and installation tests passed (including Python 3.14)"
|
||||
fi
|
||||
else
|
||||
echo "✅ All cross-platform tests passed - PyPI upload can proceed"
|
||||
@ -836,17 +882,17 @@ jobs:
|
||||
else
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
if [ -n "${{ inputs.langflow-version }}" ]; then
|
||||
echo "✅ PyPI installation tests passed (Python 3.13 experimental failures are acceptable)"
|
||||
echo "✅ PyPI installation tests passed (Python 3.14 experimental failures are acceptable)"
|
||||
else
|
||||
echo "✅ Source build and installation tests passed (Python 3.13 experimental failures are acceptable)"
|
||||
echo "✅ Source build and installation tests passed (Python 3.14 experimental failures are acceptable)"
|
||||
fi
|
||||
else
|
||||
echo "✅ Cross-platform tests passed - Python 3.13 experimental failures are acceptable - PyPI upload can proceed"
|
||||
echo "✅ Cross-platform tests passed - Python 3.14 experimental failures are acceptable - PyPI upload can proceed"
|
||||
fi
|
||||
fi
|
||||
elif [ "$stable_result" = "failure" ]; then
|
||||
echo "❌ Critical platform tests failed - blocking release"
|
||||
echo "Stable platforms (Python 3.10, 3.12) must pass for release"
|
||||
echo "Stable platforms (Python 3.10, 3.12, 3.13) must pass for release"
|
||||
exit 1
|
||||
elif [ "$stable_result" = "cancelled" ]; then
|
||||
echo "❌ Critical platform tests were cancelled"
|
||||
|
||||
20
.github/workflows/db-migration-validation.yml
vendored
20
.github/workflows/db-migration-validation.yml
vendored
@ -178,20 +178,26 @@ jobs:
|
||||
VERSION="${VERSION#v}"
|
||||
echo "Version for PyPI: $VERSION"
|
||||
|
||||
# Scope pre-release resolution to the langflow stack only. uv accepts a
|
||||
# pre-release for a package when its own requirement carries a pre-release
|
||||
# marker, but NOT via transitive pins (langflow -> langflow-base -> lfx ->
|
||||
# langflow-sdk are exact ==devN pins on nightlies), so each lockstep package
|
||||
# must be requested directly. A global --prerelease=allow is NOT safe here:
|
||||
# it lets unrelated dependencies resolve to alphas (pydantic 2.14.0a1 broke
|
||||
# langchain-core imports on the first canonical-prerelease nightly).
|
||||
# langflow-sdk has its own version line, so an explicit .dev0 floor marks it
|
||||
# pre-release-eligible while the lfx pin selects the exact version.
|
||||
if [[ "$VERSION" == "latest" ]]; then
|
||||
# Install latest nightly (canonical pre-release) from PyPI
|
||||
uv pip install --upgrade --prerelease=allow 'langflow[postgresql]'
|
||||
uv pip install --upgrade 'langflow[postgresql]>=0.0.0.dev0' 'langflow-base>=0.0.0.dev0' 'lfx>=0.0.0.dev0' 'langflow-sdk>=0.0.0.dev0'
|
||||
else
|
||||
# Install specific version. --prerelease=allow is required even for an
|
||||
# exact ==X.Y.Z.devN pin: uv only implicitly allows the pre-release for
|
||||
# the directly requested package, while langflow's metadata pins
|
||||
# langflow-base==X.Y.Z.devN transitively, which uv rejects without it.
|
||||
uv pip install --upgrade --prerelease=allow "langflow[postgresql]==$VERSION"
|
||||
# Install specific version
|
||||
uv pip install --upgrade "langflow[postgresql]==$VERSION" "langflow-base==$VERSION" "lfx==$VERSION" 'langflow-sdk>=0.0.0.dev0'
|
||||
fi
|
||||
else
|
||||
# Direct version string (strip 'v' prefix if present)
|
||||
VERSION="${NIGHTLY_TAG#v}"
|
||||
uv pip install --upgrade --prerelease=allow "langflow[postgresql]==$VERSION"
|
||||
uv pip install --upgrade "langflow[postgresql]==$VERSION" "langflow-base==$VERSION" "lfx==$VERSION" 'langflow-sdk>=0.0.0.dev0'
|
||||
fi
|
||||
|
||||
# Verify upgrade
|
||||
|
||||
42
.github/workflows/docker-build-v2.yml
vendored
42
.github/workflows/docker-build-v2.yml
vendored
@ -16,6 +16,11 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
description: "Ref to check out (branch, tag, or commit). This is required -- it specifies where the source code for the release is located."
|
||||
version_override:
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
description: "Resolved version to use for image tags. When omitted, the workflow computes the version from the checked-out ref and registry history."
|
||||
push_to_registry:
|
||||
required: false
|
||||
type: boolean
|
||||
@ -44,6 +49,11 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
description: "Ref to check out (branch, tag, or commit). This is required -- it specifies where the source code for the release is located."
|
||||
version_override:
|
||||
description: "Resolved version to use for image tags. Leave blank to compute from the checked-out ref and registry history."
|
||||
required: false
|
||||
type: string
|
||||
default: ""
|
||||
push_to_registry:
|
||||
description: "Whether to push images to registries. Set to false for testing builds without publishing."
|
||||
required: false
|
||||
@ -81,10 +91,16 @@ jobs:
|
||||
version=$(uv tree 2>/dev/null | grep '^langflow-base' | cut -d' ' -f2 | sed 's/^v//')
|
||||
echo "Base version from pyproject.toml: $version"
|
||||
|
||||
if [ ${{inputs.pre_release}} == "true" ]; then
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -E '^base-.*\.rc[0-9]+' | grep -vE '\-(amd64|arm64)$' | sed 's/^base-//' | sort -V | tail -n 1)
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" "$last_released_version")"
|
||||
echo "Latest base pre-release version: $last_released_version"
|
||||
if [ -n "${{ inputs.version_override }}" ]; then
|
||||
version="${{ inputs.version_override }}"
|
||||
echo "Using version override: $version"
|
||||
if [ ${{inputs.pre_release}} != "true" ]; then
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -E '^base-' | grep -vE '\-(amd64|arm64)$' | grep -v 'latest' | sed 's/^base-//' | sort -V | tail -n 1)
|
||||
echo "Latest base release version: $last_released_version"
|
||||
fi
|
||||
elif [ ${{inputs.pre_release}} == "true" ]; then
|
||||
released_versions=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -E '^base-' | grep -vE '\-(amd64|arm64)$' | sed 's/^base-//' || true)
|
||||
version="$(printf '%s\n' "$released_versions" | uv run ./scripts/ci/langflow_pre_release_tag.py "$version" -)"
|
||||
echo "Base pre-release version to be released: $version"
|
||||
else
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -E '^base-' | grep -vE '\-(amd64|arm64)$' | grep -v 'latest' | sed 's/^base-//' | sort -V | tail -n 1)
|
||||
@ -127,10 +143,16 @@ jobs:
|
||||
version=$(uv tree 2>/dev/null | grep -E '^langflow(-nightly)?[[:space:]]' | cut -d' ' -f2 | sed 's/^v//')
|
||||
echo "Main version from pyproject.toml: $version"
|
||||
|
||||
if [ ${{inputs.pre_release}} == "true" ]; then
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -E '\.rc[0-9]+' | grep -v '^base-' | grep -vE '\-(amd64|arm64)$' | sort -V | tail -n 1)
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" "$last_released_version")"
|
||||
echo "Latest main pre-release version: $last_released_version"
|
||||
if [ -n "${{ inputs.version_override }}" ]; then
|
||||
version="${{ inputs.version_override }}"
|
||||
echo "Using version override: $version"
|
||||
if [ ${{inputs.pre_release}} != "true" ]; then
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -v '^base-' | grep -vE '\-(amd64|arm64)$' | grep -v 'latest' | sort -V | tail -n 1)
|
||||
echo "Latest main release version: $last_released_version"
|
||||
fi
|
||||
elif [ ${{inputs.pre_release}} == "true" ]; then
|
||||
released_versions=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -v '^base-' | grep -vE '\-(amd64|arm64)$' || true)
|
||||
version="$(printf '%s\n' "$released_versions" | uv run ./scripts/ci/langflow_pre_release_tag.py "$version" -)"
|
||||
echo "Main pre-release version to be released: $version"
|
||||
else
|
||||
last_released_version=$(curl -s "https://registry.hub.docker.com/v2/repositories/langflowai/langflow/tags?page_size=100" | jq -r '.results[].name' | grep -v '^base-' | grep -vE '\-(amd64|arm64)$' | grep -v 'latest' | sort -V | tail -n 1)
|
||||
@ -335,7 +357,7 @@ jobs:
|
||||
context: .
|
||||
push: ${{ inputs.push_to_registry }}
|
||||
build-args: |
|
||||
LANGFLOW_IMAGE=langflowai/langflow:${{ steps.version.outputs.version }}-${{ matrix.arch }}
|
||||
LANGFLOW_IMAGE=langflowai/langflow:${{ needs.determine-main-version.outputs.version }}-${{ matrix.arch }}
|
||||
file: ./docker/build_and_push_backend.Dockerfile
|
||||
tags: ${{ steps.tags.outputs.docker_tags }}
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
@ -356,7 +378,7 @@ jobs:
|
||||
context: .
|
||||
push: ${{ inputs.push_to_registry }}
|
||||
build-args: |
|
||||
LANGFLOW_IMAGE=ghcr.io/langflow-ai/langflow:${{ steps.version.outputs.version }}-${{ matrix.arch }}
|
||||
LANGFLOW_IMAGE=ghcr.io/langflow-ai/langflow:${{ needs.determine-main-version.outputs.version }}-${{ matrix.arch }}
|
||||
file: ./docker/build_and_push_backend.Dockerfile
|
||||
tags: ${{ steps.tags.outputs.ghcr_tags }}
|
||||
platforms: linux/${{ matrix.arch }}
|
||||
|
||||
45
.github/workflows/docs_test.yml
vendored
45
.github/workflows/docs_test.yml
vendored
@ -36,3 +36,48 @@ jobs:
|
||||
|
||||
- name: Build docs
|
||||
run: cd docs && npm run build
|
||||
|
||||
test-docs-accessibility:
|
||||
name: Docs Accessibility (IBM Equal Access)
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.branch || github.ref }}
|
||||
|
||||
- name: Allow Chrome sandbox (Ubuntu 24.04 AppArmor restriction)
|
||||
# Ubuntu 24.04 runners restrict unprivileged user namespaces, which
|
||||
# breaks Chrome's sandbox (used by the IBM checker via puppeteer).
|
||||
# This re-enables them — the documented GitHub Actions workaround.
|
||||
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: npm
|
||||
cache-dependency-path: ./docs/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: cd docs && npm install
|
||||
|
||||
- name: Build docs (light theme)
|
||||
run: cd docs && npm run build
|
||||
|
||||
- name: Scan light theme
|
||||
run: cd docs && ./scripts/a11y-ci.sh
|
||||
|
||||
- name: Rebuild with dark theme as default
|
||||
# The IBM CLI scans the page in its default color mode, so the dark
|
||||
# scan flips the Docusaurus default and rebuilds (build-only change,
|
||||
# nothing is committed).
|
||||
run: |
|
||||
cd docs
|
||||
sed -i 's/defaultMode: "light"/defaultMode: "dark"/; s/respectPrefersColorScheme: true/respectPrefersColorScheme: false/' docusaurus.config.js
|
||||
rm -rf build .docusaurus
|
||||
npm run build
|
||||
|
||||
- name: Scan dark theme
|
||||
run: cd docs && ./scripts/a11y-ci.sh
|
||||
|
||||
33
.github/workflows/extension-migration-checks.yml
vendored
33
.github/workflows/extension-migration-checks.yml
vendored
@ -10,6 +10,8 @@ on:
|
||||
- "src/lfx/src/lfx/components/**"
|
||||
- "src/bundles/**"
|
||||
- "src/backend/base/langflow/api/**.py"
|
||||
- "scripts/ci/check_components_frozen.py"
|
||||
- "scripts/ci/frozen_component_dirs.txt"
|
||||
- ".github/workflows/extension-migration-checks.yml"
|
||||
|
||||
jobs:
|
||||
@ -84,3 +86,34 @@ jobs:
|
||||
|
||||
- name: Run check_router_trust.py
|
||||
run: python scripts/migrate/check_router_trust.py
|
||||
|
||||
freeze-components:
|
||||
name: Freeze lfx/components
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
# Stdlib-only gate; no uv sync needed. After the bundle metapackage
|
||||
# split, new providers go to lfx-bundles, not src/lfx/src/lfx/components/.
|
||||
- name: Forbid new top-level directories under lfx/components (post-freeze)
|
||||
run: python3 scripts/ci/check_components_frozen.py
|
||||
|
||||
env-writes:
|
||||
name: No process-global os.environ writes in components
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
# Stdlib-only gate; no uv sync needed. Mirrors the pre-commit
|
||||
# `component-env-writes` hook so the credential-bleed guard is enforced
|
||||
# in CI even when a contributor skips local hooks (git commit -n, web UI).
|
||||
- name: Forbid component writes to process-global os.environ
|
||||
run: python3 scripts/lint/check_component_env_writes.py
|
||||
|
||||
5
.github/workflows/gp-backend-check.yml
vendored
5
.github/workflows/gp-backend-check.yml
vendored
@ -4,6 +4,11 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- "src/lfx/src/lfx/components/**"
|
||||
# Bundle component strings reach core locales/en.json through the
|
||||
# lfx/components/<provider> import shims, so an edit to a bundle's
|
||||
# display_name/description/info must re-trigger the extractor too --
|
||||
# otherwise en.json silently drifts from src/bundles/**.
|
||||
- "src/bundles/**"
|
||||
- "src/backend/base/langflow/initial_setup/starter_projects/**"
|
||||
|
||||
jobs:
|
||||
|
||||
16
.github/workflows/lint-js.yml
vendored
16
.github/workflows/lint-js.yml
vendored
@ -90,12 +90,16 @@ jobs:
|
||||
RELATIVE_FILES=$(echo "$CHANGED_FILES" | sed 's|^src/frontend/||')
|
||||
|
||||
cd src/frontend
|
||||
# NUL-delimit so paths containing spaces (e.g. starter-project
|
||||
# specs like "Basic Prompting.spec.ts") aren't split by xargs.
|
||||
if ${{ inputs.allow-failure || 'false' }}; then
|
||||
echo "$RELATIVE_FILES" | xargs npx @biomejs/biome check \
|
||||
--files-ignore-unknown=true \
|
||||
--diagnostic-level=error || echo "Biome found errors (non-blocking for this run)."
|
||||
printf '%s\n' "$RELATIVE_FILES" | tr '\n' '\0' \
|
||||
| xargs -0 npx @biomejs/biome check \
|
||||
--files-ignore-unknown=true \
|
||||
--diagnostic-level=error || echo "Biome found errors (non-blocking for this run)."
|
||||
else
|
||||
echo "$RELATIVE_FILES" | xargs npx @biomejs/biome check \
|
||||
--files-ignore-unknown=true \
|
||||
--diagnostic-level=error
|
||||
printf '%s\n' "$RELATIVE_FILES" | tr '\n' '\0' \
|
||||
| xargs -0 npx @biomejs/biome check \
|
||||
--files-ignore-unknown=true \
|
||||
--diagnostic-level=error
|
||||
fi
|
||||
|
||||
5
.github/workflows/release-lfx.yml
vendored
5
.github/workflows/release-lfx.yml
vendored
@ -276,7 +276,7 @@ jobs:
|
||||
|
||||
create-release:
|
||||
name: Create GitHub Release
|
||||
needs: [release-lfx, build-docker]
|
||||
needs: [validate-version, release-lfx, build-docker]
|
||||
if: always() && github.event.inputs.create_github_release == 'true' && needs.release-lfx.result == 'success'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@ -337,6 +337,9 @@ jobs:
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: lfx-v${{ github.event.inputs.version }}
|
||||
# Pin the minted tag to the commit this release was built from;
|
||||
# without it GitHub creates the tag at the default-branch HEAD.
|
||||
target_commitish: ${{ github.sha }}
|
||||
name: LFX ${{ github.event.inputs.version }}
|
||||
body_path: release_notes.md
|
||||
draft: false
|
||||
|
||||
294
.github/workflows/release.yml
vendored
294
.github/workflows/release.yml
vendored
@ -177,9 +177,164 @@ jobs:
|
||||
|
||||
echo "✅ Release dependencies validated successfully."
|
||||
|
||||
determine-rc-number:
|
||||
name: Determine Shared RC Number
|
||||
needs: [validate-tag, validate-dependencies]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
rc_number: ${{ steps.rc.outputs.rc_number || steps.stable.outputs.rc_number }}
|
||||
steps:
|
||||
- name: Use stable RC number
|
||||
id: stable
|
||||
if: ${{ !inputs.pre_release }}
|
||||
run: |
|
||||
echo "rc_number=0" >> "$GITHUB_OUTPUT"
|
||||
echo "Not a pre-release; shared rc number is 0."
|
||||
|
||||
- name: Checkout code
|
||||
if: ${{ inputs.pre_release }}
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.release_tag }}
|
||||
|
||||
- name: Setup Environment
|
||||
if: ${{ inputs.pre_release }}
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
cache-dependency-glob: "uv.lock"
|
||||
python-version: "3.13"
|
||||
prune-cache: false
|
||||
|
||||
- name: Determine shared pre-release RC number
|
||||
id: rc
|
||||
if: ${{ inputs.pre_release }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
read_pyproject_version() {
|
||||
python3 - "$1" <<'PY'
|
||||
import pathlib
|
||||
import sys
|
||||
import tomllib
|
||||
|
||||
data = tomllib.loads(pathlib.Path(sys.argv[1]).read_text())
|
||||
print(data["project"]["version"])
|
||||
PY
|
||||
}
|
||||
|
||||
fetch_pypi_versions() {
|
||||
local package_name="$1"
|
||||
local output_file="$2"
|
||||
local response_file
|
||||
response_file="$(mktemp)"
|
||||
local status
|
||||
status=$(curl --retry 3 --retry-delay 2 --retry-connrefused -sS -o "$response_file" -w "%{http_code}" "https://pypi.org/pypi/${package_name}/json")
|
||||
if [ "$status" = "404" ]; then
|
||||
: > "$output_file"
|
||||
return
|
||||
fi
|
||||
if [ "$status" != "200" ]; then
|
||||
echo "Failed to fetch PyPI releases for ${package_name}: HTTP ${status}" >&2
|
||||
cat "$response_file" >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
jq -r '.releases | keys[]' "$response_file" > "$output_file"
|
||||
}
|
||||
|
||||
fetch_docker_tags() {
|
||||
local repository="$1"
|
||||
local output_file="$2"
|
||||
local response_file
|
||||
response_file="$(mktemp)"
|
||||
local status
|
||||
status=$(curl --retry 3 --retry-delay 2 --retry-connrefused -sS -o "$response_file" -w "%{http_code}" "https://registry.hub.docker.com/v2/repositories/${repository}/tags?page_size=100")
|
||||
if [ "$status" != "200" ]; then
|
||||
echo "Failed to fetch Docker tags for ${repository}: HTTP ${status}" >&2
|
||||
cat "$response_file" >&2 || true
|
||||
exit 1
|
||||
fi
|
||||
jq -r '.results[].name' "$response_file" > "$output_file"
|
||||
}
|
||||
|
||||
max_rc=0
|
||||
consider_versions() {
|
||||
local label="$1"
|
||||
local base_version="$2"
|
||||
local versions_file="$3"
|
||||
local rc_number
|
||||
rc_number=$(uv run ./scripts/ci/langflow_pre_release_tag.py "$base_version" --print-rc-number - < "$versions_file")
|
||||
echo "${label}: next rc number for ${base_version} is ${rc_number}"
|
||||
if [ "$rc_number" -gt "$max_rc" ]; then
|
||||
max_rc="$rc_number"
|
||||
fi
|
||||
}
|
||||
|
||||
tmp_dir="$(mktemp -d)"
|
||||
|
||||
if [ "${{ inputs.release_package_main }}" = "true" ]; then
|
||||
version="$(read_pyproject_version pyproject.toml)"
|
||||
fetch_pypi_versions "langflow" "$tmp_dir/langflow-pypi.txt"
|
||||
consider_versions "PyPI langflow" "$version" "$tmp_dir/langflow-pypi.txt"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.release_package_base }}" = "true" ]; then
|
||||
version="$(read_pyproject_version src/backend/base/pyproject.toml)"
|
||||
fetch_pypi_versions "langflow-base" "$tmp_dir/langflow-base-pypi.txt"
|
||||
consider_versions "PyPI langflow-base" "$version" "$tmp_dir/langflow-base-pypi.txt"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.release_lfx }}" = "true" ]; then
|
||||
version="$(read_pyproject_version src/lfx/pyproject.toml)"
|
||||
fetch_pypi_versions "lfx" "$tmp_dir/lfx-pypi.txt"
|
||||
consider_versions "PyPI lfx" "$version" "$tmp_dir/lfx-pypi.txt"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.release_sdk || inputs.release_lfx }}" = "true" ]; then
|
||||
version="$(read_pyproject_version src/sdk/pyproject.toml)"
|
||||
fetch_pypi_versions "langflow-sdk" "$tmp_dir/langflow-sdk-pypi.txt"
|
||||
consider_versions "PyPI langflow-sdk" "$version" "$tmp_dir/langflow-sdk-pypi.txt"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.release_bundles }}" = "true" ]; then
|
||||
for pyproject in src/bundles/*/pyproject.toml; do
|
||||
package_name=$(python3 - "$pyproject" <<'PY'
|
||||
import pathlib
|
||||
import sys
|
||||
import tomllib
|
||||
|
||||
data = tomllib.loads(pathlib.Path(sys.argv[1]).read_text())
|
||||
print(data["project"]["name"])
|
||||
PY
|
||||
)
|
||||
version="$(read_pyproject_version "$pyproject")"
|
||||
output_file="$tmp_dir/${package_name}-pypi.txt"
|
||||
fetch_pypi_versions "$package_name" "$output_file"
|
||||
consider_versions "PyPI ${package_name}" "$version" "$output_file"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.build_docker_main }}" = "true" ]; then
|
||||
version="$(read_pyproject_version pyproject.toml)"
|
||||
fetch_docker_tags "langflowai/langflow" "$tmp_dir/langflow-docker.txt"
|
||||
grep -v '^base-' "$tmp_dir/langflow-docker.txt" | grep -vE '\-(amd64|arm64)$' > "$tmp_dir/langflow-docker-release-tags.txt" || true
|
||||
consider_versions "Docker langflowai/langflow" "$version" "$tmp_dir/langflow-docker-release-tags.txt"
|
||||
fi
|
||||
|
||||
if [ "${{ inputs.build_docker_base }}" = "true" ]; then
|
||||
version="$(read_pyproject_version src/backend/base/pyproject.toml)"
|
||||
fetch_docker_tags "langflowai/langflow" "$tmp_dir/langflow-base-docker.txt"
|
||||
grep -E '^base-' "$tmp_dir/langflow-base-docker.txt" | grep -vE '\-(amd64|arm64)$' | sed 's/^base-//' > "$tmp_dir/langflow-base-docker-release-tags.txt" || true
|
||||
consider_versions "Docker langflowai/langflow base" "$version" "$tmp_dir/langflow-base-docker-release-tags.txt"
|
||||
fi
|
||||
|
||||
echo "Shared pre-release rc number: ${max_rc}"
|
||||
echo "rc_number=${max_rc}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
determine-base-version:
|
||||
name: Determine Base Version
|
||||
needs: [validate-tag, validate-dependencies]
|
||||
needs: [validate-tag, validate-dependencies, determine-rc-number]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
@ -212,16 +367,16 @@ jobs:
|
||||
echo "Base version from pyproject.toml: $version"
|
||||
|
||||
if [ ${{inputs.pre_release}} == "true" ]; then
|
||||
last_released_version=$(curl -s "https://pypi.org/pypi/langflow-base/json" | jq -r '.releases | keys | .[]' | grep -E '(a|b|rc|dev|alpha|beta)' | sort -V | tail -n 1)
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" "$last_released_version")"
|
||||
echo "Latest base pre-release version: $last_released_version"
|
||||
rc_number="${{ needs.determine-rc-number.outputs.rc_number }}"
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" --rc-number "$rc_number")"
|
||||
echo "Shared release candidate number: rc$rc_number"
|
||||
echo "Base pre-release version to be released: $version"
|
||||
else
|
||||
last_released_version=$(curl -s "https://pypi.org/pypi/langflow-base/json" | jq -r '.releases | keys | .[]' | grep -vE '(a|b|rc|dev|alpha|beta)' | sort -V | tail -n 1)
|
||||
echo "Latest base release version: $last_released_version"
|
||||
fi
|
||||
|
||||
if [ "$version" = "$last_released_version" ]; then
|
||||
if [ "$version" = "$last_released_version" ] && [ "${{ inputs.release_package_base }}" = "true" ]; then
|
||||
echo "Base pypi version $version is already released. Skipping release."
|
||||
echo skipped=true >> $GITHUB_OUTPUT
|
||||
exit 1
|
||||
@ -232,7 +387,7 @@ jobs:
|
||||
|
||||
determine-main-version:
|
||||
name: Determine Main Version
|
||||
needs: [validate-tag, validate-dependencies]
|
||||
needs: [validate-tag, validate-dependencies, determine-rc-number]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
@ -261,16 +416,16 @@ jobs:
|
||||
echo "Main version from pyproject.toml: $version"
|
||||
|
||||
if [ ${{inputs.pre_release}} == "true" ]; then
|
||||
last_released_version=$(curl -s "https://pypi.org/pypi/langflow/json" | jq -r '.releases | keys | .[]' | grep -E '(a|b|rc|dev|alpha|beta)' | sort -V | tail -n 1)
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" "$last_released_version")"
|
||||
echo "Latest main pre-release version: $last_released_version"
|
||||
rc_number="${{ needs.determine-rc-number.outputs.rc_number }}"
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" --rc-number "$rc_number")"
|
||||
echo "Shared release candidate number: rc$rc_number"
|
||||
echo "Main pre-release version to be released: $version"
|
||||
else
|
||||
last_released_version=$(curl -s "https://pypi.org/pypi/langflow/json" | jq -r '.releases | keys | .[]' | grep -vE '(a|b|rc|dev|alpha|beta)' | sort -V | tail -n 1)
|
||||
echo "Latest main release version: $last_released_version"
|
||||
fi
|
||||
|
||||
if [ "$version" = "$last_released_version" ]; then
|
||||
if [ "$version" = "$last_released_version" ] && [ "${{ inputs.release_package_main }}" = "true" ]; then
|
||||
echo "Main pypi version $version is already released. Skipping release."
|
||||
echo skipped=true >> $GITHUB_OUTPUT
|
||||
exit 1
|
||||
@ -281,7 +436,7 @@ jobs:
|
||||
|
||||
determine-lfx-version:
|
||||
name: Determine LFX Version
|
||||
needs: [validate-tag, validate-dependencies]
|
||||
needs: [validate-tag, validate-dependencies, determine-rc-number]
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
version: ${{ steps.version.outputs.version }}
|
||||
@ -310,9 +465,9 @@ jobs:
|
||||
echo "LFX version from pyproject.toml: $version"
|
||||
|
||||
if [ ${{inputs.pre_release}} == "true" ]; then
|
||||
last_released_version=$(curl -s "https://pypi.org/pypi/lfx/json" | jq -r '.releases | keys | .[]' | grep -E '(a|b|rc|dev|alpha|beta)' | sort -V | tail -n 1)
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" "$last_released_version")"
|
||||
echo "Latest LFX pre-release version: $last_released_version"
|
||||
rc_number="${{ needs.determine-rc-number.outputs.rc_number }}"
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" --rc-number "$rc_number")"
|
||||
echo "Shared release candidate number: rc$rc_number"
|
||||
echo "LFX pre-release version to be released: $version"
|
||||
else
|
||||
last_released_version=$(curl -s "https://pypi.org/pypi/lfx/json" | jq -r '.releases | keys | .[]' | grep -vE '(a|b|rc|dev|alpha|beta)' | sort -V | tail -n 1)
|
||||
@ -330,7 +485,7 @@ jobs:
|
||||
|
||||
determine-sdk-version:
|
||||
name: Determine SDK Version
|
||||
needs: [validate-tag, validate-dependencies]
|
||||
needs: [validate-tag, validate-dependencies, determine-rc-number]
|
||||
if: ${{ inputs.release_sdk || inputs.release_lfx }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
@ -368,11 +523,17 @@ jobs:
|
||||
if [ "$pypi_response" = "404" ]; then
|
||||
echo "langflow-sdk has never been published to PyPI. This will be the first release."
|
||||
last_released_version=""
|
||||
if [ ${{inputs.pre_release}} == "true" ]; then
|
||||
rc_number="${{ needs.determine-rc-number.outputs.rc_number }}"
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" --rc-number "$rc_number")"
|
||||
echo "Shared release candidate number: rc$rc_number"
|
||||
echo "SDK pre-release version to be released: $version"
|
||||
fi
|
||||
else
|
||||
if [ ${{inputs.pre_release}} == "true" ]; then
|
||||
last_released_version=$(curl -s "https://pypi.org/pypi/langflow-sdk/json" | jq -r '.releases | keys | .[]' | grep -E '(a|b|rc|dev|alpha|beta)' | sort -V | tail -n 1)
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" "$last_released_version")"
|
||||
echo "Latest SDK pre-release version: $last_released_version"
|
||||
rc_number="${{ needs.determine-rc-number.outputs.rc_number }}"
|
||||
version="$(uv run ./scripts/ci/langflow_pre_release_tag.py "$version" --rc-number "$rc_number")"
|
||||
echo "Shared release candidate number: rc$rc_number"
|
||||
echo "SDK pre-release version to be released: $version"
|
||||
else
|
||||
last_released_version=$(curl -s "https://pypi.org/pypi/langflow-sdk/json" | jq -r '.releases | keys | .[]' | grep -vE '(a|b|rc|dev|alpha|beta)' | sort -V | tail -n 1)
|
||||
@ -862,7 +1023,7 @@ jobs:
|
||||
|
||||
build-bundles:
|
||||
name: Build Langflow Bundles
|
||||
needs: [build-lfx, determine-lfx-version]
|
||||
needs: [build-lfx, determine-lfx-version, determine-rc-number]
|
||||
if: |
|
||||
always() &&
|
||||
!cancelled() &&
|
||||
@ -888,6 +1049,26 @@ jobs:
|
||||
prune-cache: false
|
||||
- name: Install the project
|
||||
run: uv sync
|
||||
- name: Set bundle versions for pre-release
|
||||
if: ${{ inputs.pre_release }}
|
||||
run: |
|
||||
RC_NUMBER="${{ needs.determine-rc-number.outputs.rc_number }}"
|
||||
echo "Setting bundle pre-release versions with shared rc number: rc$RC_NUMBER"
|
||||
for pyproject in src/bundles/*/pyproject.toml; do
|
||||
CURRENT_VERSION=$(python3 - "$pyproject" <<'PY'
|
||||
import pathlib
|
||||
import sys
|
||||
import tomllib
|
||||
|
||||
data = tomllib.loads(pathlib.Path(sys.argv[1]).read_text())
|
||||
print(data["project"]["version"])
|
||||
PY
|
||||
)
|
||||
VERSION=$(uv run ./scripts/ci/langflow_pre_release_tag.py "$CURRENT_VERSION" --rc-number "$RC_NUMBER")
|
||||
sed -i.bak "0,/^version = /s|^version = .*|version = \"$VERSION\"|" "$pyproject"
|
||||
rm -f "${pyproject}.bak"
|
||||
grep "^version" "$pyproject" | sed "s|^| ${pyproject}: |"
|
||||
done
|
||||
- name: Relax bundle lfx floor for pre-release
|
||||
if: ${{ inputs.pre_release }}
|
||||
run: |
|
||||
@ -1013,19 +1194,44 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
failed=0
|
||||
pypi_publish_delay_seconds=60
|
||||
pypi_publish_max_attempts=5
|
||||
wheel_count=${#wheels[@]}
|
||||
wheel_number=0
|
||||
for wheel in "${wheels[@]}"; do
|
||||
wheel_number=$((wheel_number + 1))
|
||||
echo "Publishing $wheel"
|
||||
# Tolerate "already exists" so reruns -- or a bundle whose version is
|
||||
# unchanged and already on PyPI -- do not fail the job. Matches the
|
||||
# duplicate-tolerant publish in release_bundles.yml.
|
||||
if ! err=$(uv publish "$wheel" 2>&1); then
|
||||
attempt=1
|
||||
published=0
|
||||
while true; do
|
||||
# Tolerate "already exists" so reruns -- or a bundle whose version is
|
||||
# unchanged and already on PyPI -- do not fail the job. Matches the
|
||||
# duplicate-tolerant publish in release_bundles.yml.
|
||||
if err=$(uv publish "$wheel" 2>&1); then
|
||||
echo "$err"
|
||||
published=1
|
||||
break
|
||||
fi
|
||||
echo "$err"
|
||||
if echo "$err" | grep -qiE 'already exists|file already exists|HTTP 400|duplicate'; then
|
||||
echo "Skipping $wheel: already published."
|
||||
else
|
||||
echo "Publish failed for $wheel"
|
||||
failed=1
|
||||
break
|
||||
fi
|
||||
if echo "$err" | grep -qiE 'HTTP 429|429 Too Many Requests|Too many new projects created'; then
|
||||
if [ "$attempt" -lt "$pypi_publish_max_attempts" ]; then
|
||||
echo "PyPI rate limited $wheel; sleeping ${pypi_publish_delay_seconds}s before retry $((attempt + 1))/${pypi_publish_max_attempts}."
|
||||
sleep "$pypi_publish_delay_seconds"
|
||||
attempt=$((attempt + 1))
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
echo "Publish failed for $wheel"
|
||||
failed=1
|
||||
break
|
||||
done
|
||||
if [ "$published" = "1" ] && [ "$wheel_number" -lt "$wheel_count" ]; then
|
||||
echo "Sleeping ${pypi_publish_delay_seconds}s before the next PyPI upload."
|
||||
sleep "$pypi_publish_delay_seconds"
|
||||
fi
|
||||
done
|
||||
if [ "$failed" = "1" ]; then
|
||||
@ -1129,72 +1335,78 @@ jobs:
|
||||
call_docker_build_base:
|
||||
name: Call Docker Build Workflow for Langflow Base
|
||||
if: ${{ inputs.build_docker_base }}
|
||||
needs: [ci]
|
||||
needs: [ci, determine-base-version]
|
||||
uses: ./.github/workflows/docker-build-v2.yml
|
||||
with:
|
||||
ref: ${{ inputs.release_tag }}
|
||||
release_type: base
|
||||
pre_release: ${{ inputs.pre_release }}
|
||||
version_override: ${{ needs.determine-base-version.outputs.version }}
|
||||
push_to_registry: ${{ !inputs.dry_run }}
|
||||
secrets: inherit
|
||||
|
||||
call_docker_build_main:
|
||||
name: Call Docker Build Workflow for Langflow
|
||||
if: ${{ inputs.build_docker_main }}
|
||||
needs: [ci]
|
||||
needs: [ci, determine-main-version]
|
||||
uses: ./.github/workflows/docker-build-v2.yml
|
||||
with:
|
||||
ref: ${{ inputs.release_tag }}
|
||||
release_type: main
|
||||
pre_release: ${{ inputs.pre_release }}
|
||||
version_override: ${{ needs.determine-main-version.outputs.version }}
|
||||
push_to_registry: ${{ !inputs.dry_run }}
|
||||
secrets: inherit
|
||||
|
||||
call_docker_build_main_backend:
|
||||
name: Call Docker Build Workflow for Langflow Backend
|
||||
if: ${{ inputs.build_docker_main && !inputs.dry_run }}
|
||||
needs: [call_docker_build_main]
|
||||
needs: [call_docker_build_main, determine-main-version]
|
||||
uses: ./.github/workflows/docker-build-v2.yml
|
||||
with:
|
||||
ref: ${{ inputs.release_tag }}
|
||||
release_type: main-backend
|
||||
pre_release: ${{ inputs.pre_release }}
|
||||
version_override: ${{ needs.determine-main-version.outputs.version }}
|
||||
push_to_registry: ${{ !inputs.dry_run }}
|
||||
secrets: inherit
|
||||
|
||||
call_docker_build_main_frontend:
|
||||
name: Call Docker Build Workflow for Langflow Frontend
|
||||
if: ${{ inputs.build_docker_main && !inputs.dry_run }}
|
||||
needs: [call_docker_build_main]
|
||||
needs: [call_docker_build_main, determine-main-version]
|
||||
uses: ./.github/workflows/docker-build-v2.yml
|
||||
with:
|
||||
ref: ${{ inputs.release_tag }}
|
||||
release_type: main-frontend
|
||||
pre_release: ${{ inputs.pre_release }}
|
||||
version_override: ${{ needs.determine-main-version.outputs.version }}
|
||||
push_to_registry: ${{ !inputs.dry_run }}
|
||||
secrets: inherit
|
||||
|
||||
call_docker_build_main_ep:
|
||||
name: Call Docker Build Workflow for Langflow with Entrypoint
|
||||
if: ${{ inputs.build_docker_main }}
|
||||
needs: [ci]
|
||||
needs: [ci, determine-main-version]
|
||||
uses: ./.github/workflows/docker-build-v2.yml
|
||||
with:
|
||||
ref: ${{ inputs.release_tag }}
|
||||
release_type: main-ep
|
||||
pre_release: ${{ inputs.pre_release }}
|
||||
version_override: ${{ needs.determine-main-version.outputs.version }}
|
||||
push_to_registry: ${{ !inputs.dry_run }}
|
||||
secrets: inherit
|
||||
|
||||
call_docker_build_main_all:
|
||||
name: Call Docker Build Workflow for langflow-all
|
||||
if: ${{ inputs.build_docker_main }}
|
||||
needs: [ci]
|
||||
needs: [ci, determine-main-version]
|
||||
uses: ./.github/workflows/docker-build-v2.yml
|
||||
with:
|
||||
ref: ${{ inputs.release_tag }}
|
||||
release_type: main-all
|
||||
pre_release: ${{ inputs.pre_release }}
|
||||
version_override: ${{ needs.determine-main-version.outputs.version }}
|
||||
push_to_registry: ${{ !inputs.dry_run }}
|
||||
secrets: inherit
|
||||
|
||||
@ -1216,6 +1428,20 @@ jobs:
|
||||
with:
|
||||
name: dist-main
|
||||
path: dist
|
||||
# The release must attach to the dispatched v-prefixed tag. Passing the
|
||||
# bare version as `tag` made GitHub mint a new lightweight tag at the
|
||||
# default-branch HEAD — the wrong commit, still carrying the previous
|
||||
# version (main only adopts the new version via the post-release
|
||||
# back-merge). Pre-releases keep their computed tag (e.g. 1.10.0rc1),
|
||||
# but `commit` pins any newly minted tag to the release commit.
|
||||
- name: Resolve release commit
|
||||
id: release_commit
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
sha=$(gh api "repos/${{ github.repository }}/commits/${{ inputs.release_tag }}" --jq '.sha')
|
||||
echo "Release tag '${{ inputs.release_tag }}' resolves to commit $sha"
|
||||
echo "sha=$sha" >> "$GITHUB_OUTPUT"
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
@ -1224,6 +1450,8 @@ jobs:
|
||||
draft: false
|
||||
generateReleaseNotes: true
|
||||
prerelease: ${{ inputs.pre_release }}
|
||||
tag: ${{ needs.determine-main-version.outputs.version }}
|
||||
tag: ${{ inputs.pre_release && needs.determine-main-version.outputs.version || inputs.release_tag }}
|
||||
name: ${{ needs.determine-main-version.outputs.version }}
|
||||
commit: ${{ steps.release_commit.outputs.sha }}
|
||||
allowUpdates: true
|
||||
updateOnlyUnreleased: false
|
||||
|
||||
154
.github/workflows/release_bundles.yml
vendored
154
.github/workflows/release_bundles.yml
vendored
@ -3,8 +3,8 @@ name: Release Bundles
|
||||
# Manually-triggered workflow for publishing stable `lfx-<name>` bundle wheels
|
||||
# from src/bundles/* to PyPI. Bundles change infrequently, so we release them
|
||||
# on demand rather than on a schedule. Re-running the workflow without a
|
||||
# version bump is a no-op (PyPI rejects the duplicate upload and we tolerate
|
||||
# the conflict).
|
||||
# version bump is a no-op; the publish job preflights PyPI and skips bundle
|
||||
# versions that are already present.
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@ -71,6 +71,13 @@ jobs:
|
||||
# matching lfx published when bundles are released ahead of a main
|
||||
# release. We build the lfx wheel from the current ref so the smoke
|
||||
# test resolves against it; this artifact is not published.
|
||||
- name: Build langflow-sdk wheel for smoke test
|
||||
if: steps.build.outputs.bundles-found == '1'
|
||||
run: |
|
||||
mkdir -p sdk-dist
|
||||
SDK_DIST="$PWD/sdk-dist"
|
||||
(cd src/sdk && uv build --wheel --out-dir "$SDK_DIST")
|
||||
ls -la sdk-dist/
|
||||
- name: Build lfx wheel for smoke test
|
||||
if: steps.build.outputs.bundles-found == '1'
|
||||
run: |
|
||||
@ -90,6 +97,12 @@ jobs:
|
||||
with:
|
||||
name: dist-lfx-smoketest
|
||||
path: lfx-dist
|
||||
- name: Upload langflow-sdk artifact (smoke-test only; not published)
|
||||
if: steps.build.outputs.bundles-found == '1'
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: dist-sdk-smoketest
|
||||
path: sdk-dist
|
||||
|
||||
test-install:
|
||||
name: Install Smoke Test - ${{ matrix.os }} ${{ matrix.python-version }}
|
||||
@ -132,6 +145,11 @@ jobs:
|
||||
with:
|
||||
name: dist-lfx-smoketest
|
||||
path: ./lfx-dist
|
||||
- name: Download langflow-sdk artifact
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
name: dist-sdk-smoketest
|
||||
path: ./sdk-dist
|
||||
- name: Create fresh virtual environment
|
||||
run: uv venv test-env --seed
|
||||
shell: bash
|
||||
@ -140,34 +158,44 @@ jobs:
|
||||
run: |
|
||||
shopt -s nullglob
|
||||
BUNDLE_WHEELS=(./bundles-dist/*.whl)
|
||||
SDK_WHEELS=(./sdk-dist/*.whl)
|
||||
LFX_WHEELS=(./lfx-dist/*.whl)
|
||||
if [ ${#BUNDLE_WHEELS[@]} -eq 0 ]; then
|
||||
echo "No bundle wheels found in ./bundles-dist/"
|
||||
exit 1
|
||||
fi
|
||||
if [ ${#SDK_WHEELS[@]} -eq 0 ]; then
|
||||
echo "No langflow-sdk wheel found in ./sdk-dist/"
|
||||
exit 1
|
||||
fi
|
||||
if [ ${#LFX_WHEELS[@]} -eq 0 ]; then
|
||||
echo "No lfx wheel found in ./lfx-dist/"
|
||||
exit 1
|
||||
fi
|
||||
printf 'Installing: %s\n' "${LFX_WHEELS[@]}" "${BUNDLE_WHEELS[@]}"
|
||||
uv pip install --prerelease=allow --python ./test-env/bin/python "${LFX_WHEELS[@]}" "${BUNDLE_WHEELS[@]}"
|
||||
printf 'Installing: %s\n' "${SDK_WHEELS[@]}" "${LFX_WHEELS[@]}" "${BUNDLE_WHEELS[@]}"
|
||||
uv pip install --prerelease=allow --python ./test-env/bin/python "${SDK_WHEELS[@]}" "${LFX_WHEELS[@]}" "${BUNDLE_WHEELS[@]}"
|
||||
shell: bash
|
||||
- name: Install lfx + bundle wheels (Windows)
|
||||
if: matrix.os == 'windows'
|
||||
run: |
|
||||
shopt -s nullglob
|
||||
BUNDLE_WHEELS=(./bundles-dist/*.whl)
|
||||
SDK_WHEELS=(./sdk-dist/*.whl)
|
||||
LFX_WHEELS=(./lfx-dist/*.whl)
|
||||
if [ ${#BUNDLE_WHEELS[@]} -eq 0 ]; then
|
||||
echo "No bundle wheels found in ./bundles-dist/"
|
||||
exit 1
|
||||
fi
|
||||
if [ ${#SDK_WHEELS[@]} -eq 0 ]; then
|
||||
echo "No langflow-sdk wheel found in ./sdk-dist/"
|
||||
exit 1
|
||||
fi
|
||||
if [ ${#LFX_WHEELS[@]} -eq 0 ]; then
|
||||
echo "No lfx wheel found in ./lfx-dist/"
|
||||
exit 1
|
||||
fi
|
||||
printf 'Installing: %s\n' "${LFX_WHEELS[@]}" "${BUNDLE_WHEELS[@]}"
|
||||
uv pip install --prerelease=allow --python ./test-env/Scripts/python.exe "${LFX_WHEELS[@]}" "${BUNDLE_WHEELS[@]}"
|
||||
printf 'Installing: %s\n' "${SDK_WHEELS[@]}" "${LFX_WHEELS[@]}" "${BUNDLE_WHEELS[@]}"
|
||||
uv pip install --prerelease=allow --python ./test-env/Scripts/python.exe "${SDK_WHEELS[@]}" "${LFX_WHEELS[@]}" "${BUNDLE_WHEELS[@]}"
|
||||
shell: bash
|
||||
|
||||
publish-bundles:
|
||||
@ -182,6 +210,10 @@ jobs:
|
||||
needs.test-install.result == 'success'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.release_tag || github.ref }}
|
||||
- name: Download bundles artifact
|
||||
uses: actions/download-artifact@v7
|
||||
with:
|
||||
@ -196,26 +228,122 @@ jobs:
|
||||
env:
|
||||
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
shopt -s nullglob
|
||||
wheels=(bundles-dist/*.whl)
|
||||
if [ ${#wheels[@]} -eq 0 ]; then
|
||||
echo "No bundle wheels to publish."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
publish_plan="$(mktemp)"
|
||||
uv run --with packaging --no-project python - "${wheels[@]}" > "$publish_plan" <<'PY'
|
||||
import email
|
||||
import json
|
||||
import sys
|
||||
import tomllib
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
|
||||
from packaging.requirements import Requirement
|
||||
from packaging.utils import canonicalize_name
|
||||
from packaging.version import InvalidVersion, Version
|
||||
|
||||
root_order = {}
|
||||
root_dependencies = tomllib.loads(Path("pyproject.toml").read_text())["project"].get("dependencies", [])
|
||||
for index, dependency in enumerate(root_dependencies):
|
||||
try:
|
||||
requirement = Requirement(dependency)
|
||||
except Exception:
|
||||
continue
|
||||
root_order.setdefault(canonicalize_name(requirement.name), index)
|
||||
|
||||
def read_wheel_metadata(path: Path) -> tuple[str, Version]:
|
||||
with zipfile.ZipFile(path) as wheel:
|
||||
metadata_path = next(name for name in wheel.namelist() if name.endswith(".dist-info/METADATA"))
|
||||
metadata = email.message_from_bytes(wheel.read(metadata_path))
|
||||
return canonicalize_name(metadata["Name"]), Version(metadata["Version"])
|
||||
|
||||
plan = []
|
||||
for wheel_arg in sys.argv[1:]:
|
||||
wheel_path = Path(wheel_arg)
|
||||
name, version = read_wheel_metadata(wheel_path)
|
||||
url = f"https://pypi.org/pypi/{name}/json"
|
||||
try:
|
||||
with urllib.request.urlopen(url, timeout=30) as response:
|
||||
project = json.load(response)
|
||||
except urllib.error.HTTPError as exc:
|
||||
if exc.code != 404:
|
||||
raise
|
||||
print(f"Will publish new PyPI project {name} {version}: {wheel_path}", file=sys.stderr)
|
||||
plan.append((0, root_order.get(name, 9999), name, str(wheel_path)))
|
||||
continue
|
||||
|
||||
published_versions = set()
|
||||
for version_text in project.get("releases", {}):
|
||||
try:
|
||||
published_versions.add(Version(version_text))
|
||||
except InvalidVersion:
|
||||
continue
|
||||
|
||||
if version in published_versions:
|
||||
print(f"Skipping {name} {version}: already published.", file=sys.stderr)
|
||||
continue
|
||||
|
||||
print(f"Will publish new version {name} {version}: {wheel_path}", file=sys.stderr)
|
||||
plan.append((1, root_order.get(name, 9999), name, str(wheel_path)))
|
||||
|
||||
for _, _, _, wheel_path in sorted(plan):
|
||||
print(wheel_path)
|
||||
PY
|
||||
|
||||
if [ ! -s "$publish_plan" ]; then
|
||||
echo "No bundle wheels need publishing."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
mapfile -t wheels < "$publish_plan"
|
||||
failed=0
|
||||
pypi_publish_delay_seconds=60
|
||||
pypi_publish_max_attempts=5
|
||||
wheel_count=${#wheels[@]}
|
||||
wheel_number=0
|
||||
for wheel in "${wheels[@]}"; do
|
||||
wheel_number=$((wheel_number + 1))
|
||||
echo "Publishing $wheel"
|
||||
# Capture stderr so we can tolerate "already exists" without failing
|
||||
# the whole run — re-running this workflow without bumping a bundle
|
||||
# version should be a no-op for that bundle.
|
||||
if ! err=$(uv publish "$wheel" 2>&1); then
|
||||
attempt=1
|
||||
published=0
|
||||
while true; do
|
||||
# Capture stderr so we can tolerate "already exists" without failing
|
||||
# the whole run — re-running this workflow without bumping a bundle
|
||||
# version should be a no-op for that bundle.
|
||||
if err=$(uv publish "$wheel" 2>&1); then
|
||||
echo "$err"
|
||||
published=1
|
||||
break
|
||||
fi
|
||||
echo "$err"
|
||||
if echo "$err" | grep -qiE 'already exists|file already exists|HTTP 400|duplicate'; then
|
||||
echo "Skipping $wheel: already published."
|
||||
else
|
||||
echo "Publish failed for $wheel"
|
||||
failed=1
|
||||
break
|
||||
fi
|
||||
if echo "$err" | grep -qiE 'HTTP 429|429 Too Many Requests|Too many new projects created'; then
|
||||
if [ "$attempt" -lt "$pypi_publish_max_attempts" ]; then
|
||||
echo "PyPI rate limited $wheel; sleeping ${pypi_publish_delay_seconds}s before retry $((attempt + 1))/${pypi_publish_max_attempts}."
|
||||
sleep "$pypi_publish_delay_seconds"
|
||||
attempt=$((attempt + 1))
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
echo "Publish failed for $wheel"
|
||||
failed=1
|
||||
break
|
||||
done
|
||||
if [ "$published" = "1" ] && [ "$wheel_number" -lt "$wheel_count" ]; then
|
||||
echo "Sleeping ${pypi_publish_delay_seconds}s before the next PyPI upload."
|
||||
sleep "$pypi_publish_delay_seconds"
|
||||
fi
|
||||
done
|
||||
if [ "$failed" = "1" ]; then
|
||||
|
||||
114
.github/workflows/release_nightly.yml
vendored
114
.github/workflows/release_nightly.yml
vendored
@ -350,9 +350,32 @@ jobs:
|
||||
mkdir -p main-dist
|
||||
cp "${MAIN_WHEELS[0]}" main-dist/
|
||||
|
||||
# Bundles are NOT rebuilt/republished for nightly. The stable `lfx-*` bundles on
|
||||
# PyPI work as-is against the canonical `lfx` pre-release (see src/bundles/NIGHTLY.md). The
|
||||
# cross-platform test self-builds the bundles from src/bundles for install coverage.
|
||||
- name: Build bundle wheels for cross-platform test
|
||||
id: build-bundles
|
||||
run: |
|
||||
shopt -s nullglob
|
||||
bundles=(src/bundles/*/pyproject.toml)
|
||||
if [ ${#bundles[@]} -eq 0 ]; then
|
||||
echo "No bundles found under src/bundles/*/"
|
||||
echo "bundles-found=0" >> "$GITHUB_OUTPUT"
|
||||
exit 0
|
||||
fi
|
||||
mkdir -p bundles-dist
|
||||
BUNDLES_DIST="$PWD/bundles-dist"
|
||||
for bundle_pyproject in "${bundles[@]}"; do
|
||||
bundle_dir=$(dirname "$bundle_pyproject")
|
||||
echo "Building wheel for $bundle_dir"
|
||||
(cd "$bundle_dir" && uv build --wheel --out-dir "$BUNDLES_DIST")
|
||||
done
|
||||
echo "bundles-found=1" >> "$GITHUB_OUTPUT"
|
||||
ls -la bundles-dist/
|
||||
|
||||
- name: Upload Bundles Artifact
|
||||
if: steps.build-bundles.outputs.bundles-found == '1'
|
||||
uses: actions/upload-artifact@v6
|
||||
with:
|
||||
name: dist-nightly-bundles
|
||||
path: bundles-dist
|
||||
|
||||
# PyPI publishing moved to after cross-platform testing
|
||||
|
||||
@ -371,6 +394,8 @@ jobs:
|
||||
main-artifact-name: "dist-nightly-main"
|
||||
lfx-artifact-name: "dist-nightly-lfx"
|
||||
sdk-artifact-name: "dist-nightly-sdk"
|
||||
bundles-artifact-name: "dist-nightly-bundles"
|
||||
pre_release: true
|
||||
|
||||
publish-nightly-lfx:
|
||||
name: Publish LFX Nightly to PyPI
|
||||
@ -457,11 +482,90 @@ jobs:
|
||||
run: |
|
||||
make publish base=true
|
||||
|
||||
publish-nightly-main:
|
||||
name: Publish Langflow Main Nightly to PyPI
|
||||
check-nightly-main-pypi-dependencies:
|
||||
name: Check Main Nightly PyPI Dependencies
|
||||
needs: [build-nightly-main, test-cross-platform, publish-nightly-base]
|
||||
if: ${{ always() && needs.build-nightly-main.result == 'success' && needs.test-cross-platform.result == 'success' && needs.publish-nightly-base.result == 'success' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ inputs.nightly_tag_release }}
|
||||
persist-credentials: true
|
||||
- name: Setup Environment
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: false
|
||||
python-version: "3.13"
|
||||
- name: Check direct bundle dependencies on PyPI
|
||||
run: |
|
||||
uv run --with packaging --no-project python - <<'PY'
|
||||
import json
|
||||
import sys
|
||||
import tomllib
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
from pathlib import Path
|
||||
|
||||
from packaging.requirements import Requirement
|
||||
from packaging.utils import canonicalize_name
|
||||
from packaging.version import InvalidVersion, Version
|
||||
|
||||
data = tomllib.loads(Path("pyproject.toml").read_text())
|
||||
requirements = []
|
||||
for dependency in data["project"].get("dependencies", []):
|
||||
requirement = Requirement(dependency)
|
||||
name = canonicalize_name(requirement.name)
|
||||
if name.startswith("lfx-"):
|
||||
requirements.append(requirement)
|
||||
|
||||
if not requirements:
|
||||
print("No direct lfx-* dependencies found.")
|
||||
sys.exit(0)
|
||||
|
||||
missing = []
|
||||
unsatisfied = []
|
||||
for requirement in requirements:
|
||||
name = canonicalize_name(requirement.name)
|
||||
url = f"https://pypi.org/pypi/{name}/json"
|
||||
try:
|
||||
with urllib.request.urlopen(url, timeout=30) as response:
|
||||
project = json.load(response)
|
||||
except urllib.error.HTTPError as exc:
|
||||
if exc.code == 404:
|
||||
missing.append(name)
|
||||
continue
|
||||
raise
|
||||
|
||||
matching_versions = []
|
||||
for version_text in project.get("releases", {}):
|
||||
try:
|
||||
version = Version(version_text)
|
||||
except InvalidVersion:
|
||||
continue
|
||||
if version in requirement.specifier:
|
||||
matching_versions.append(version)
|
||||
|
||||
if not matching_versions:
|
||||
unsatisfied.append(f"{name}{requirement.specifier}")
|
||||
else:
|
||||
latest = max(matching_versions)
|
||||
print(f"{name}{requirement.specifier}: available, latest matching {latest}")
|
||||
|
||||
if missing or unsatisfied:
|
||||
if missing:
|
||||
print("Missing PyPI projects: " + ", ".join(missing), file=sys.stderr)
|
||||
if unsatisfied:
|
||||
print("No published version satisfies: " + ", ".join(unsatisfied), file=sys.stderr)
|
||||
sys.exit(1)
|
||||
PY
|
||||
|
||||
publish-nightly-main:
|
||||
name: Publish Langflow Main Nightly to PyPI
|
||||
needs: [build-nightly-main, test-cross-platform, publish-nightly-base, check-nightly-main-pypi-dependencies]
|
||||
if: ${{ always() && needs.build-nightly-main.result == 'success' && needs.test-cross-platform.result == 'success' && needs.publish-nightly-base.result == 'success' && needs.check-nightly-main-pypi-dependencies.result == 'success' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -195,6 +195,9 @@ instance/
|
||||
# Sphinx documentation
|
||||
docs/_build/
|
||||
|
||||
# IBM Equal Access accessibility scan results
|
||||
docs/a11y-results/
|
||||
|
||||
# PyBuilder
|
||||
target/
|
||||
|
||||
|
||||
3312
.secrets.baseline
3312
.secrets.baseline
File diff suppressed because it is too large
Load Diff
@ -58,6 +58,12 @@ that does not list `str(BUNDLE_API_VERSION)` is rejected at install time with
|
||||
| `DataFrame` | `lfx.schema.dataframe` |
|
||||
| `Message` | `lfx.schema.message` |
|
||||
|
||||
### Lazy-import helper (consumed by bundle ``__init__.py`` files)
|
||||
|
||||
| Symbol | Source |
|
||||
| --- | --- |
|
||||
| `import_mod(attr_name, module_name, package)` | `lfx.utils.lazy_import` (canonical; `lfx.components._importing` re-exports it for backward compatibility) |
|
||||
|
||||
### Manifest contract (consumed by the loader)
|
||||
|
||||
| Symbol | Source |
|
||||
@ -402,3 +408,67 @@ the deserialize half is covered by
|
||||
added to ``ERROR_CODES`` (additive; codes-as-contract semantics
|
||||
preserved). In-tree polling clients that never sent the parameter
|
||||
are unaffected.
|
||||
- **Manifest-less `lfx.bundles` discovery (metapackage split, 1.11).** A
|
||||
distribution may declare `[project.entry-points."lfx.bundles"]` whose
|
||||
value is an importable package; each immediate subdirectory is loaded as
|
||||
one bundle at the `@official` slot with **no `extension.json`** (the
|
||||
langchain-community model; these directories are not inputs to
|
||||
`lfx extension validate` -- the validator requires an `extension.json` or
|
||||
`[tool.langflow.extension]` manifest and reports `manifest-not-found`
|
||||
without one).
|
||||
`load_lfx_bundles_extensions` is exported from `lfx.extension` (additive).
|
||||
Discovery precedence for cross-source bundle-name collisions becomes
|
||||
`installed > seed > lfx_bundles > dev > inline` -- **manifest always
|
||||
wins**, so a manifest-shipping `lfx-<provider>` shadows the same-named
|
||||
provider in a metapackage with the existing `bundle-shadowed` warning
|
||||
(graduation requires no lockstep release). A metapackage provider whose
|
||||
name is already claimed by an installed or seed source is **never
|
||||
imported** -- all `@official` sources share the
|
||||
`_lfx_ext.official.<bundle>.*` sys.modules namespace, so importing the
|
||||
losing copy would overwrite the winner's live modules; the skipped copy
|
||||
carries the same typed `bundle-shadowed` diagnostic (on `errors`, matching
|
||||
the resolver) so filtering by code never mixes severities. Namespace
|
||||
packages are walked across **all portions**, and resolved roots are
|
||||
deduplicated by path so duplicate declarations never self-shadow. This
|
||||
precedence is a **startup-time** property: `load_lfx_bundles_extensions`
|
||||
runs in the component-loading path, not in `discover_all_extensions`, so
|
||||
`lfx extension list` -- which walks only the installed and seed
|
||||
(manifest-bearing) sources -- does **not** enumerate manifest-less
|
||||
metapackage providers. A live `lfx.bundles` provider is therefore
|
||||
invisible at list-time, and its shadowing against a manifest-shipping
|
||||
package is resolved only when the server assembles the
|
||||
`_lfx_ext.official.<bundle>.*` namespace at startup. New
|
||||
warning-only codes added to `ERROR_CODES` (additive), one per discovery
|
||||
failure mode and none of which abort startup: `bundle-discovery-malformed`
|
||||
(declaration does not resolve to an importable package directory --
|
||||
including a parent package whose `__init__` raises during `find_spec`),
|
||||
`bundles-provider-name-invalid` (provider folder is not a valid bundle
|
||||
name), `bundles-root-unreadable` (root cannot be enumerated), and
|
||||
`duplicate-lfx-bundles-provider` (same provider name in more than one
|
||||
root; first wins). Manifest-less bundles bypass the
|
||||
`version-constraint-unsatisfied` API-version gate by construction (no
|
||||
manifest to carry `lfx.compat`); install-time compatibility rides on the
|
||||
metapackage's PEP 508 `lfx>=X,<Y` pin instead. Manifest-less records
|
||||
register with `manifestless=True` (additive field on `LoadResult` /
|
||||
`BundleRecord`) and are **not hot-reloadable**: the reload pipeline
|
||||
refuses them with the new typed code `reload-manifestless-unsupported`
|
||||
(additive in `ERROR_CODES`) instead of failing `manifest-not-found`;
|
||||
pick up metapackage changes by upgrading the distribution and
|
||||
restarting the process.
|
||||
- **`import_mod` promoted to a stable public home.** The lazy-import helper
|
||||
that bundle packages call from their `__getattr__`-based `__init__.py`
|
||||
files moved from the internal `lfx.components._importing` to
|
||||
`lfx.utils.lazy_import` and is now part of the BUNDLE_API surface (name,
|
||||
signature, and semantics contract-stable). `lfx.components._importing`
|
||||
re-exports it unchanged, so existing in-tree and third-party callers are
|
||||
unaffected (additive).
|
||||
- **Validator accepts inherited entry-points.** `validate_extension` no
|
||||
longer emits `build-method-missing` for a Component subclass whose base
|
||||
is a *derived* Component base (name ends with `Component`, e.g.
|
||||
`LCVectorStoreComponent` / `LCToolComponent`): such classes inherit the
|
||||
class-level `outputs` declaration and only override the output method,
|
||||
which the AST-only check cannot resolve across modules. Direct
|
||||
subclasses of the root `Component` keep the strict inline
|
||||
`build`-or-`outputs` requirement. Surfaced by the partner graduations
|
||||
(`lfx-datastax` et al.); previously-passing bundles are unaffected
|
||||
(strictly fewer false positives).
|
||||
|
||||
@ -39,7 +39,7 @@ ENV VIRTUAL_ENV="/app/.venv"
|
||||
|
||||
# Install langflow-base with all extras except dev (which includes Playwright).
|
||||
# This image ships the langflow-base core only. Extension bundles
|
||||
# (lfx-duckduckgo, lfx-arxiv, lfx-ibm, lfx-docling) are intentionally NOT
|
||||
# (lfx-duckduckgo, lfx-arxiv, lfx-ibm, lfx-docling, lfx-oracle, lfx-firecrawl) are intentionally NOT
|
||||
# installed here -- they belong to the full ``langflow`` distribution, not
|
||||
# the lean core. Use the ``langflow`` image, or ``pip install`` the bundle
|
||||
# alongside this image, to add those components.
|
||||
|
||||
@ -75,7 +75,7 @@ RUN npm install \
|
||||
|
||||
WORKDIR /app/src/backend/base
|
||||
# langflow-base ships the core framework only. The extension bundles
|
||||
# (lfx-duckduckgo, lfx-arxiv, lfx-ibm, lfx-docling) are intentionally NOT
|
||||
# (lfx-duckduckgo, lfx-arxiv, lfx-ibm, lfx-docling, lfx-oracle, lfx-firecrawl) are intentionally NOT
|
||||
# installed in this image: they are dependencies of the full ``langflow``
|
||||
# distribution, not of the lean ``langflow-base`` core, and we keep that
|
||||
# boundary at the image layer too. Consumers who want those components
|
||||
|
||||
@ -39,12 +39,15 @@ http {
|
||||
|
||||
location /api {
|
||||
proxy_pass ${BACKEND_URL};
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
location /health_check {
|
||||
proxy_pass ${BACKEND_URL};
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
location /health {
|
||||
proxy_pass ${BACKEND_URL};
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
|
||||
include /etc/nginx/extra-conf.d/*.conf;
|
||||
|
||||
@ -18,12 +18,15 @@ server {
|
||||
}
|
||||
location /api {
|
||||
proxy_pass __BACKEND_URL__;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
location /health_check {
|
||||
proxy_pass __BACKEND_URL__;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
location /health {
|
||||
proxy_pass __BACKEND_URL__;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
|
||||
include /etc/nginx/extra-conf.d/*.conf;
|
||||
|
||||
@ -24,23 +24,17 @@ $ npm run build
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service, including `npm run serve`.
|
||||
|
||||
### Import code snippets from the repo with a line range
|
||||
### Import code snippets from the repo
|
||||
|
||||
To pull a slice of a file into the docs, source the content with `raw-loader` and present the code with the `CodeSnippet` component.
|
||||
For a working example, see the [Components overview](/concepts-components#component-code).
|
||||
To embed source files directly in the docs, use `raw-loader` to import the file as a string and pass it to the native `CodeBlock` component.
|
||||
|
||||
```mdx
|
||||
import CodeSnippet from "@site/src/components/CodeSnippet";
|
||||
import CodeBlock from "@theme/CodeBlock";
|
||||
import customComponent from "!!raw-loader!@langflow/src/lfx/src/lfx/custom/custom_component/custom_component.py";
|
||||
|
||||
<CodeSnippet
|
||||
source={customComponent}
|
||||
startLine={41}
|
||||
endLine={74}
|
||||
language="python"
|
||||
title="CustomComponent metadata (from codebase)"
|
||||
showLineNumbers
|
||||
/>
|
||||
<CodeBlock language="python" title="CustomComponent metadata (from codebase)">
|
||||
{customComponent}
|
||||
</CodeBlock>
|
||||
```
|
||||
|
||||
## Docusaurus Versioning
|
||||
|
||||
23
docs/aceconfig.js
Normal file
23
docs/aceconfig.js
Normal file
@ -0,0 +1,23 @@
|
||||
// IBM Equal Access accessibility-checker configuration
|
||||
// https://github.com/IBMa/equal-access/tree/master/accessibility-checker
|
||||
module.exports = {
|
||||
// Pinned rule archive — keeps CI deterministic (IBM updates "latest"
|
||||
// independently of this repo). Bump deliberately, like any dependency.
|
||||
ruleArchive: "19May2026",
|
||||
// IBM_Accessibility maps to WCAG 2.1 AA + IBM requirements
|
||||
policies: ["IBM_Accessibility"],
|
||||
// Fail levels: what makes the scan exit non-zero (kept to real violations)
|
||||
failLevels: ["violation"],
|
||||
// Report levels: what gets written to the reports
|
||||
reportLevels: [
|
||||
"violation",
|
||||
"potentialviolation",
|
||||
"recommendation",
|
||||
"potentialrecommendation",
|
||||
"manual",
|
||||
],
|
||||
outputFormat: ["json"],
|
||||
outputFolder: "a11y-results",
|
||||
// Don't fail the run when a newer rule archive exists
|
||||
ignoreArchiveVersionCheck: true,
|
||||
};
|
||||
@ -1,7 +1,78 @@
|
||||
/* Geist Mono (and other ligature-enabled fonts) merge ~= into one glyph in inline code */
|
||||
code,
|
||||
pre code {
|
||||
font-variant-ligatures: none;
|
||||
.theme-code-block {
|
||||
box-shadow: none !important;
|
||||
border: 1px solid #1e2128;
|
||||
border-radius: var(--ifm-global-radius);
|
||||
overflow: hidden;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
/* Keep inline code vertically aligned with surrounding text */
|
||||
:not(pre) > code {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
html[data-theme="light"] :not(pre) > code {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* =====================================================================
|
||||
Langflow custom code theme — CSS variables (dark/light switching).
|
||||
===================================================================== */
|
||||
:root,
|
||||
html[data-theme="dark"] {
|
||||
--lf-ch-bg: #18181a;
|
||||
--lf-ch-fg: #c8ccd4;
|
||||
--lf-ch-line-num: #798197;
|
||||
--lf-ch-selection: #264f78;
|
||||
--lf-ch-border: #1e2128;
|
||||
--lf-ch-title-bg: #0b0d10;
|
||||
--lf-ch-comment: #798197;
|
||||
--lf-ch-string: #51d0a5;
|
||||
--lf-ch-number: #ff9b7d;
|
||||
--lf-ch-boolean: #f7c93e;
|
||||
--lf-ch-import: #c791f1;
|
||||
--lf-ch-keyword: #ffffff;
|
||||
--lf-ch-function: #ed86bf;
|
||||
--lf-ch-decorator: #e45287;
|
||||
--lf-ch-variable: #c8ccd4;
|
||||
}
|
||||
|
||||
html[data-theme="light"] {
|
||||
--lf-ch-bg: #f9f9fd;
|
||||
--lf-ch-fg: #64748b;
|
||||
--lf-ch-line-num: #607491;
|
||||
--lf-ch-selection: #e2e8f0;
|
||||
--lf-ch-border: #e2e4f0;
|
||||
--lf-ch-title-bg: #f0f0f8;
|
||||
--lf-ch-comment: #607491;
|
||||
--lf-ch-string: #04835c;
|
||||
--lf-ch-number: #c74b0a;
|
||||
--lf-ch-boolean: #ae5f05;
|
||||
--lf-ch-import: #7c3aed;
|
||||
--lf-ch-keyword: #077d9a;
|
||||
--lf-ch-function: #d82474;
|
||||
--lf-ch-decorator: #be185d;
|
||||
--lf-ch-variable: #64748b;
|
||||
}
|
||||
|
||||
|
||||
/* Light mode: Prism / theme-code-block overrides */
|
||||
html[data-theme="light"] .theme-code-block {
|
||||
border-color: #e2e4f0;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .theme-code-block pre {
|
||||
background-color: #f9f9fd !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .theme-code-block code {
|
||||
color: #64748b !important;
|
||||
}
|
||||
|
||||
html[data-theme="light"] .theme-code-block div[class*="codeBlockTitle"] {
|
||||
background: #f0f0f8;
|
||||
border-bottom-color: #e2e4f0;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.docusaurus-highlight-code-line {
|
||||
@ -11,20 +82,6 @@ pre code {
|
||||
padding: 0 var(--ifm-pre-padding);
|
||||
}
|
||||
|
||||
.ch-scrollycoding-content {
|
||||
max-width: 55% !important;
|
||||
min-width: 40% !important;
|
||||
}
|
||||
|
||||
.ch-scrollycoding-sticker {
|
||||
max-width: 60% !important;
|
||||
min-width: 45% !important;
|
||||
}
|
||||
|
||||
.ch-scrollycoding-step-content {
|
||||
min-height: 70px;
|
||||
}
|
||||
|
||||
/* ========================================
|
||||
Code Blocks - Enhanced (Langfuse style)
|
||||
======================================== */
|
||||
@ -44,16 +101,14 @@ pre code {
|
||||
border-bottom-color: #303038;
|
||||
}
|
||||
|
||||
/* Code block container */
|
||||
.theme-code-block {
|
||||
border: 1px solid var(--ifm-color-emphasis-200);
|
||||
border-radius: var(--ifm-global-radius);
|
||||
overflow: hidden;
|
||||
margin-bottom: 1.5rem;
|
||||
|
||||
.theme-code-block pre,
|
||||
.theme-code-block code {
|
||||
line-height: 1.7;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .theme-code-block {
|
||||
border-color: #303038;
|
||||
border-color: #1e2128;
|
||||
}
|
||||
|
||||
/* Line highlighting in code blocks */
|
||||
@ -64,34 +119,3 @@ pre code {
|
||||
padding: 0 var(--ifm-pre-padding);
|
||||
border-left: 3px solid var(--ifm-color-primary);
|
||||
}
|
||||
|
||||
/* Code Hike + CodeSnippet: Code Hike uses height:100% on .ch-codeblock > * and omits overflow on the
|
||||
wrapper when measured; we shrink-wrap the block (fixes <details>/Collapsible height) and put
|
||||
overflow on <code> only so the copy button stays in the corner while scrolling long lines. */
|
||||
.markdown .ch-codeblock {
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
height: fit-content;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.markdown .ch-codeblock .ch-code-wrapper {
|
||||
min-width: 0;
|
||||
box-sizing: border-box;
|
||||
height: fit-content !important;
|
||||
max-height: none !important;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.markdown .ch-codeblock .ch-code-wrapper > .ch-code-scroll-parent {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.markdown .ch-codeblock .ch-code-button {
|
||||
right: calc(10px + 0.75rem);
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,400;0,500;1,400&display=swap");
|
||||
@import "./tokens.css";
|
||||
@import "./layout.css";
|
||||
@import "./navbar.css";
|
||||
|
||||
@ -1,55 +1,520 @@
|
||||
/* ========================================
|
||||
Redocusaurus / API Reference Pages
|
||||
|
||||
NOTE: This file uses `!important` throughout because Redoc injects styles
|
||||
via CSS-in-JS (Styled Components) with high specificity at runtime.
|
||||
Plain selectors cannot override them — `!important` is intentional here.
|
||||
|
||||
NOTE: Structural selectors (nth-child, first-child, etc.) target Redoc's
|
||||
internal DOM layout. Tested against redocusaurus@2.5.0 / Redoc v2.x.
|
||||
If Redoc is upgraded, verify these selectors still apply correctly.
|
||||
======================================== */
|
||||
|
||||
/* Remove Redoc's built-in left gutter so it aligns with the rest of the layout */
|
||||
.redocusaurus .menu-content {
|
||||
padding-left: 0 !important;
|
||||
/* ── Prevent horizontal scroll ───────────────────────────── */
|
||||
/* clip (not hidden) so position:sticky on sidebar/right panel still works */
|
||||
|
||||
html.plugin-redoc .main-wrapper {
|
||||
overflow-x: clip;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Match sidebar font to site font */
|
||||
.redocusaurus .menu-content,
|
||||
.redocusaurus [class*="SidebarDivider"],
|
||||
.redocusaurus [class*="ApiItemName"] {
|
||||
/* ── CSS custom properties ────────────────────────────────── */
|
||||
/* Centralizes all theme colors — change here, applies everywhere. */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus {
|
||||
--redoc-bg-primary: #111;
|
||||
--redoc-bg-secondary: #18181b;
|
||||
--redoc-bg-code: #161618;
|
||||
--redoc-border-color: #303038;
|
||||
--redoc-text-primary: #e3e3e3;
|
||||
--redoc-text-muted: #cdcdd4;
|
||||
--redoc-text-label: #ffffff;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus {
|
||||
--redoc-bg-primary: #f5f5f5;
|
||||
--redoc-bg-secondary: #ffffff;
|
||||
--redoc-bg-code: #f5f5f5;
|
||||
--redoc-border-color: #e4e4e7;
|
||||
--redoc-text-primary: #111827;
|
||||
--redoc-text-muted: hsl(240, 4%, 46%);
|
||||
--redoc-text-label: #111827;
|
||||
/* Darkened brand pink — #f471b5 fails WCAG AA on light surfaces;
|
||||
#cd1072 passes 4.5:1 on #fff, #f5f5f5, #ebebec and #f5f3f4 */
|
||||
--redoc-pink-a11y: #cd1072;
|
||||
}
|
||||
|
||||
/* ── Sidebar layout ───────────────────────────────────────── */
|
||||
|
||||
/* Redoc sets top:0 which overlaps the navbar */
|
||||
.redocusaurus .menu-content {
|
||||
top: 60px !important;
|
||||
padding-left: 0 !important;
|
||||
border-right: none !important;
|
||||
font-family: var(--ifm-font-family-base) !important;
|
||||
}
|
||||
|
||||
/* Light theme Redoc sidebar */
|
||||
[data-theme="light"] .redocusaurus .menu-content {
|
||||
/* ── Sidebar background ───────────────────────────────────── */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus .menu-content {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
border-right: 1px solid var(--redoc-border-color) !important;
|
||||
}
|
||||
|
||||
/* "API docs by Redocly" badge — position:fixed, background transparent from Redoc.
|
||||
Give it a solid background so it renders above the sidebar. */
|
||||
html[data-theme='dark'] .redocusaurus a[href*="redocly"] {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
display: block !important;
|
||||
padding: 8px !important;
|
||||
border-right: 1px solid var(--redoc-border-color) !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus a[href*="redocly"] {
|
||||
background: var(--ifm-background-color) !important;
|
||||
border-right: none !important;
|
||||
display: block !important;
|
||||
padding: 8px !important;
|
||||
border-right: 1px solid var(--redoc-border-color) !important;
|
||||
}
|
||||
|
||||
/* Dark theme Redoc sidebar */
|
||||
[data-theme="dark"] .redocusaurus .menu-content {
|
||||
background: #111 !important;
|
||||
border-right: none !important;
|
||||
|
||||
html[data-theme='light'] .redocusaurus .menu-content {
|
||||
background: var(--ifm-background-color) !important;
|
||||
border-right: 1px solid var(--redoc-border-color) !important;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .redocusaurus {
|
||||
background: #111 !important;
|
||||
/* ── Sidebar active item ──────────────────────────────────── */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus .menu-content label.active {
|
||||
background-color: var(--redoc-bg-primary) !important;
|
||||
}
|
||||
|
||||
/* Redoc operation panels */
|
||||
[data-theme="dark"] .redocusaurus [class*="OperationTitle"],
|
||||
[data-theme="dark"] .redocusaurus [class*="operation-type"] {
|
||||
color: #cdcdd4;
|
||||
html[data-theme='light'] .redocusaurus .menu-content label.active {
|
||||
background-color: var(--redoc-bg-primary) !important;
|
||||
}
|
||||
|
||||
/* Redoc search input */
|
||||
.redocusaurus input[type="search"] {
|
||||
border-radius: 8px;
|
||||
font-family: var(--ifm-font-family-base);
|
||||
/* ── Sidebar hover ────────────────────────────────────────── */
|
||||
|
||||
html[data-theme='light'] .redocusaurus .menu-content label:hover,
|
||||
html[data-theme='light'] .redocusaurus .menu-content label:hover span:not([class*="operation-type"]),
|
||||
html[data-theme='light'] .redocusaurus .menu-content li:hover > label {
|
||||
color: var(--redoc-text-primary) !important;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .redocusaurus input[type="search"] {
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border-color: #303038;
|
||||
color: #c6c6d1;
|
||||
/* ── Central content background ───────────────────────────── */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus {
|
||||
background: var(--redoc-bg-primary) !important;
|
||||
}
|
||||
|
||||
/* Redoc code samples */
|
||||
[data-theme="dark"] .redocusaurus [class*="CodeSample"] pre {
|
||||
background: #161618 !important;
|
||||
border: 1px solid #303038;
|
||||
html[data-theme='light'] .redocusaurus {
|
||||
background: var(--redoc-bg-primary) !important;
|
||||
}
|
||||
|
||||
/* ── Dark theme headings ──────────────────────────────────── */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus h1,
|
||||
html[data-theme='dark'] .redocusaurus h2,
|
||||
html[data-theme='dark'] .redocusaurus h3,
|
||||
html[data-theme='dark'] .redocusaurus h4,
|
||||
html[data-theme='dark'] .redocusaurus h5,
|
||||
html[data-theme='dark'] .redocusaurus h6 {
|
||||
color: var(--redoc-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ── Expanded response/schema content background ──────────── */
|
||||
/* redocusaurus@2.5.0: button+div is the expanded schema panel */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus div[id^='tag'] button + div,
|
||||
html[data-theme='dark'] .redocusaurus div[id^='operation'] button + div {
|
||||
background-color: var(--redoc-bg-secondary) !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus div[id^='tag'] button + div,
|
||||
html[data-theme='light'] .redocusaurus div[id^='operation'] button + div {
|
||||
background-color: var(--redoc-bg-secondary) !important;
|
||||
}
|
||||
|
||||
/* ── Right panel background ───────────────────────────────── */
|
||||
/* redocusaurus@2.5.0: nth-child(2) of tag/operation is the right panel */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus .api-content > div > div:nth-child(2),
|
||||
html[data-theme='dark'] .redocusaurus div[id^='operation'] > div:nth-child(2),
|
||||
html[data-theme='dark'] .redocusaurus div[id^='tag'] > div > div:nth-child(2) {
|
||||
background: var(--redoc-bg-primary) !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .api-content > div > div:nth-child(2),
|
||||
html[data-theme='light'] .redocusaurus div[id^='operation'] > div:nth-child(2),
|
||||
html[data-theme='light'] .redocusaurus div[id^='tag'] > div > div:nth-child(2),
|
||||
html[data-theme='light'] .redocusaurus [class*="RightPanel"] {
|
||||
background: var(--redoc-bg-primary) !important;
|
||||
}
|
||||
|
||||
/* ── HTTP method button wrapper ───────────────────────────── */
|
||||
/* redocusaurus@2.5.0: nth-child(1) of the right panel */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(1) {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
border: 1px solid var(--redoc-border-color) !important;
|
||||
border-radius: 8px !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(1) {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
border: 1px solid var(--redoc-border-color) !important;
|
||||
border-radius: 8px !important;
|
||||
}
|
||||
|
||||
/* ── HTTP method button ───────────────────────────────────── */
|
||||
/* redocusaurus@2.5.0: button inside div:first-child of the right panel */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:first-child > button {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
border: none !important;
|
||||
border-radius: 8px !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:first-child > button {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
border: none !important;
|
||||
border-radius: 8px !important;
|
||||
box-shadow: none !important;
|
||||
color: var(--redoc-text-muted) !important;
|
||||
}
|
||||
|
||||
/* ── HTTP method dropdown ──────────────────────────────────── */
|
||||
/* redocusaurus@2.5.0: div>div inside the button wrapper */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(1) > div > div {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
border: 1px solid var(--redoc-border-color) !important;
|
||||
border-bottom-left-radius: 8px !important;
|
||||
border-bottom-right-radius: 8px !important;
|
||||
box-shadow: none !important;
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(1) > div > div {
|
||||
border-bottom-left-radius: 8px !important;
|
||||
border-bottom-right-radius: 8px !important;
|
||||
box-shadow: none !important;
|
||||
border-top: none !important;
|
||||
}
|
||||
|
||||
/* ── Request + Response cards ─────────────────────────────── */
|
||||
/* redocusaurus@2.5.0: nth-child(2) and nth-child(3) of the right panel */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(2),
|
||||
html[data-theme='dark'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(3) {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
border: 1px solid var(--redoc-border-color) !important;
|
||||
border-radius: 12px !important;
|
||||
overflow: hidden !important;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
|
||||
margin-top: 12px !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(2),
|
||||
html[data-theme='light'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(3) {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
border: 1px solid var(--redoc-border-color) !important;
|
||||
border-radius: 12px !important;
|
||||
overflow: hidden !important;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
|
||||
margin-top: 12px !important;
|
||||
}
|
||||
|
||||
/* ── Status code tabs ─────────────────────────────────────── */
|
||||
|
||||
.redocusaurus .react-tabs__tab-list {
|
||||
padding: 0 20px !important;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
html[data-theme='dark'] .redocusaurus .tab-success,
|
||||
html[data-theme='dark'] .redocusaurus .tab-error,
|
||||
html[data-theme='dark'] .redocusaurus .react-tabs__tab--selected {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
border-color: var(--redoc-border-color) !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .tab-success,
|
||||
html[data-theme='light'] .redocusaurus .tab-error,
|
||||
html[data-theme='light'] .redocusaurus .react-tabs__tab--selected {
|
||||
background: var(--redoc-bg-secondary) !important;
|
||||
border-color: var(--redoc-border-color) !important;
|
||||
}
|
||||
|
||||
/* ── Card title (h3) ──────────────────────────────────────── */
|
||||
/* redocusaurus@2.5.0: h3 direct child of nth-child(2/3) of right panel */
|
||||
|
||||
.redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(2) > h3 ~ div,
|
||||
.redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(3) > h3 ~ div {
|
||||
padding-top: 8px !important;
|
||||
padding-bottom: 8px !important;
|
||||
}
|
||||
|
||||
.redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(2) > h3,
|
||||
.redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(3) > h3 {
|
||||
padding-top: 12px !important;
|
||||
padding-left: 16px !important;
|
||||
padding-bottom: 12px !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
html[data-theme='dark'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(2) > h3,
|
||||
html[data-theme='dark'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(3) > h3 {
|
||||
border-bottom: 1px solid var(--redoc-border-color) !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(2) > h3,
|
||||
html[data-theme='light'] .redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(3) > h3 {
|
||||
border-bottom: 1px solid var(--redoc-border-color) !important;
|
||||
color: var(--redoc-text-primary) !important;
|
||||
}
|
||||
|
||||
/* ── Tab panel content ────────────────────────────────────── */
|
||||
/* redocusaurus@2.5.0: structural selectors for content type / example area */
|
||||
|
||||
.redocusaurus .react-tabs__tab-panel--selected > div {
|
||||
padding-top: 8px !important;
|
||||
padding-bottom: 8px !important;
|
||||
}
|
||||
|
||||
.redocusaurus .react-tabs__tab-panel--selected > div > div,
|
||||
.redocusaurus .react-tabs__tab-panel--selected > div > div > div:not(:last-child) {
|
||||
display: flex !important;
|
||||
flex-direction: column !important;
|
||||
gap: 0.5rem !important;
|
||||
}
|
||||
|
||||
.redocusaurus .react-tabs__tab-panel--selected > div > div:nth-child(2) {
|
||||
margin-top: 8px !important;
|
||||
}
|
||||
|
||||
/* Content type / Example labels */
|
||||
html[data-theme='dark'] .redocusaurus .react-tabs__tab-panel--selected > div > div > span,
|
||||
html[data-theme='dark'] .redocusaurus .react-tabs__tab-panel--selected > div > div:nth-child(2) > div > span {
|
||||
position: static !important;
|
||||
font-size: 0.875rem !important;
|
||||
color: var(--redoc-text-label) !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .react-tabs__tab-panel--selected > div > div > span,
|
||||
html[data-theme='light'] .redocusaurus .react-tabs__tab-panel--selected > div > div:nth-child(2) > div > span {
|
||||
position: static !important;
|
||||
font-size: 0.875rem !important;
|
||||
color: var(--redoc-text-primary) !important;
|
||||
}
|
||||
|
||||
/* Content type / Example value borders + text color */
|
||||
html[data-theme='dark'] .redocusaurus .react-tabs__tab-panel--selected > div > div:first-of-type > div:first-of-type,
|
||||
html[data-theme='dark'] .redocusaurus .react-tabs__tab-panel--selected > div > div:nth-child(2) > div:last-child,
|
||||
html[data-theme='dark'] .redocusaurus .react-tabs__tab-panel--selected > div > div:nth-child(2) > div:not(:last-child) > div {
|
||||
border: 1px solid var(--redoc-border-color) !important;
|
||||
border-radius: 6px !important;
|
||||
background: transparent !important;
|
||||
min-height: 20px !important;
|
||||
padding: 8px !important;
|
||||
color: var(--redoc-text-muted) !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .react-tabs__tab-panel--selected > div > div:first-of-type > div:first-of-type,
|
||||
html[data-theme='light'] .redocusaurus .react-tabs__tab-panel--selected > div > div:nth-child(2) > div:last-child,
|
||||
html[data-theme='light'] .redocusaurus .react-tabs__tab-panel--selected > div > div:nth-child(2) > div:not(:last-child) > div {
|
||||
border: 1px solid var(--redoc-border-color) !important;
|
||||
border-radius: 6px !important;
|
||||
background: transparent !important;
|
||||
min-height: 20px !important;
|
||||
padding: 8px !important;
|
||||
color: var(--redoc-text-muted) !important;
|
||||
}
|
||||
|
||||
/* Tab panel transparent so card bg shows through */
|
||||
.redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(2) .react-tabs__tab-panel--selected,
|
||||
.redocusaurus div[id^='operation'] > div:nth-child(2) > div:nth-child(3) .react-tabs__tab-panel--selected {
|
||||
background: transparent !important;
|
||||
}
|
||||
|
||||
/* ── Light theme syntax highlighting ──────────────────────── */
|
||||
/* All colors pass WCAG AA (4.5:1) on white sample backgrounds */
|
||||
|
||||
html[data-theme='light'] .redocusaurus .token.keyword {
|
||||
color: #b75868 !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .token.punctuation {
|
||||
color: rgb(113, 113, 122) !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .token.boolean,
|
||||
html[data-theme='light'] .redocusaurus .token.null {
|
||||
color: #e32c29 !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .token.number,
|
||||
html[data-theme='light'] .redocusaurus .token.constant {
|
||||
color: #427ca0 !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .token.literal-property.property,
|
||||
html[data-theme='light'] .redocusaurus .token.string-property.property {
|
||||
color: #427ca0 !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .token.string {
|
||||
color: rgb(22, 130, 50) !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .token.operator {
|
||||
color: #9f6d08 !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus .token.property {
|
||||
color: var(--redoc-text-muted) !important;
|
||||
}
|
||||
|
||||
/* ── Operation divider ────────────────────────────────────── */
|
||||
|
||||
.redocusaurus .api-content > div:not(:last-of-type)::after {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* ── Light theme WCAG contrast overrides ──────────────────── */
|
||||
/* Redoc renders these with #f471b5 / #9c9ca2, which fail 4.5:1 on
|
||||
light surfaces. Dark theme is unaffected (colors pass there). */
|
||||
|
||||
/* Inline code in descriptions (typography.code.color from config) */
|
||||
html[data-theme='light'] .redocusaurus *:not(pre) > code {
|
||||
color: var(--redoc-pink-a11y) !important;
|
||||
}
|
||||
|
||||
/* "required" labels in schema tables (schema.requireLabelColor) */
|
||||
html[data-theme='light'] .redocusaurus td[kind='field'] > div {
|
||||
color: var(--redoc-pink-a11y) !important;
|
||||
}
|
||||
|
||||
/* Classless utility buttons (Expand all / Collapse all, etc.).
|
||||
Redoc dims their wrapper div to 0.7, lightening the effective color —
|
||||
restore full opacity on the wrapper, not the button */
|
||||
html[data-theme='light'] .redocusaurus button:not([class]) {
|
||||
color: #6c6c74 !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus div:has(> button:not([class])) {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
/* Links (Download button, server URLs) — primaryColor fails on light */
|
||||
html[data-theme='light'] .redocusaurus .api-content a {
|
||||
color: var(--redoc-pink-a11y) !important;
|
||||
}
|
||||
|
||||
/* Schema tree lines (schema.linesColor #F471B5) — align with the
|
||||
accessible pink on light so all pinks on the page match */
|
||||
html[data-theme='light'] .redocusaurus td[kind='field'] {
|
||||
border-left-color: var(--redoc-pink-a11y) !important;
|
||||
}
|
||||
|
||||
html[data-theme='light'] .redocusaurus td[kind='field'] > span:not(.property-name)::before,
|
||||
html[data-theme='light'] .redocusaurus td[kind='field'] > span:not(.property-name)::after {
|
||||
background-color: var(--redoc-pink-a11y) !important;
|
||||
}
|
||||
|
||||
/* Expandable property names render inside a classless <button> and pick up
|
||||
button colors (gray in light via our rule, Redoc's #333 in dark) — match
|
||||
the non-expandable property names in both themes */
|
||||
.redocusaurus td[kind='field'] button span.property-name {
|
||||
color: var(--ifm-font-color-base) !important;
|
||||
}
|
||||
|
||||
/* Field markers (required / recursive) in schema tables */
|
||||
html[data-theme='light'] .redocusaurus td[kind='field'] > span:not(.property-name),
|
||||
html[data-theme='light'] .redocusaurus td[kind='field'] > div > div > span {
|
||||
color: var(--redoc-pink-a11y) !important;
|
||||
}
|
||||
|
||||
/* "required" badge inside section headings (Request Body schema: ... required) */
|
||||
html[data-theme='light'] .redocusaurus .api-content h5 > div {
|
||||
color: var(--redoc-pink-a11y) !important;
|
||||
}
|
||||
|
||||
/* Field type labels (string, Array of strings) in description cells —
|
||||
they sit on #ebebeb chips, so the gray is darker than the button one */
|
||||
html[data-theme='light'] .redocusaurus td:not([kind]) > div > div > span {
|
||||
color: #696971 !important;
|
||||
}
|
||||
|
||||
/* Constraint chips (>= 1, [ 1 .. 200 ]) — rendered at 0.9 alpha by Redoc */
|
||||
html[data-theme='light'] .redocusaurus td span:not([class]) > span {
|
||||
color: var(--redoc-pink-a11y) !important;
|
||||
}
|
||||
|
||||
/* Active sidebar item — Redoc leaves it white on the light surface.
|
||||
Use the regular text color (no pink); keep HTTP method badges intact */
|
||||
html[data-theme='light'] .redocusaurus .menu-content label.active,
|
||||
html[data-theme='light'] .redocusaurus .menu-content label.active span:not([class*="operation-type"]) {
|
||||
color: var(--redoc-text-primary) !important;
|
||||
}
|
||||
|
||||
/* oneOf variant buttons (td div button — expandable property buttons are
|
||||
direct td children and keep their own colors/arrows). Their backgrounds
|
||||
are white (inactive) or primaryColor pink (active) in BOTH themes; dark
|
||||
text passes 4.5:1 on both, while Redoc's white/pink text fails */
|
||||
.redocusaurus td div button {
|
||||
color: #111827 !important;
|
||||
}
|
||||
|
||||
/* ── Inline code (dark) ───────────────────────────────────── */
|
||||
/* Redoc's default typography.code.backgroundColor is rgba(38, 50, 56, 0.05),
|
||||
nearly invisible over the dark background — lighten it for contrast.
|
||||
:not(pre) keeps code sample blocks (pre > code) unaffected. */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus *:not(pre) > code {
|
||||
background-color: rgba(255, 255, 255, 0.05) !important;
|
||||
}
|
||||
|
||||
/* ── Response button code alignment ───────────────────────── */
|
||||
/* Redoc sets vertical-align: top + line-height: 20px on the status code
|
||||
("200") while the description text is baseline-aligned with a taller
|
||||
line-height, leaving the code visually higher than the phrase */
|
||||
.redocusaurus button > strong {
|
||||
vertical-align: baseline !important;
|
||||
line-height: inherit !important;
|
||||
}
|
||||
|
||||
/* ── Dark theme WCAG contrast overrides ───────────────────── */
|
||||
|
||||
/* Code sample tokens — Redoc defaults fail on the dark panel (#242426) */
|
||||
html[data-theme='dark'] .redocusaurus .token.boolean,
|
||||
html[data-theme='dark'] .redocusaurus .token.null {
|
||||
color: #e95c59 !important;
|
||||
}
|
||||
|
||||
html[data-theme='dark'] .redocusaurus .token.number,
|
||||
html[data-theme='dark'] .redocusaurus .token.constant {
|
||||
color: #5392b8 !important;
|
||||
}
|
||||
|
||||
/* Status-code tabs — Redoc renders #303846 on the dark card.
|
||||
docusaurus-theme-redoc ships `.redocusaurus ul > li.react-tabs__tab--selected
|
||||
:not(.tab-error):not(.tab-success) { color: #303846 !important }` (0,4,2),
|
||||
so the selected-tab override must outrank it in specificity */
|
||||
html[data-theme='dark'] .redocusaurus .react-tabs__tab,
|
||||
html[data-theme='dark'] .redocusaurus ul > li.react-tabs__tab--selected:not(.tab-error):not(.tab-success) {
|
||||
color: var(--redoc-text-muted) !important;
|
||||
}
|
||||
|
||||
/* ── Dark theme misc ──────────────────────────────────────── */
|
||||
|
||||
html[data-theme='dark'] .redocusaurus [class*="OperationTitle"],
|
||||
html[data-theme='dark'] .redocusaurus [class*="operation-type"] {
|
||||
color: var(--redoc-text-muted);
|
||||
}
|
||||
|
||||
html[data-theme='dark'] .redocusaurus [class*="CodeSample"] pre {
|
||||
background: var(--redoc-bg-code) !important;
|
||||
border: 1px solid var(--redoc-border-color);
|
||||
}
|
||||
|
||||
@ -437,11 +437,6 @@ html[data-theme="light"] .sidebar-group-label {
|
||||
-webkit-text-fill-color: unset;
|
||||
}
|
||||
|
||||
[data-theme="dark"] .sidebar-ad-text-gradient {
|
||||
/* Brighter pink for WCAG contrast on dark background */
|
||||
color: #ff6ad0;
|
||||
}
|
||||
|
||||
/* Active item - subtle left border indicator */
|
||||
.menu__link--active:not(.menu__link--sublist) {
|
||||
border-left: 2px solid var(--ifm-color-primary);
|
||||
@ -503,11 +498,6 @@ html[data-theme="light"] .menu__link--active:not(.menu__link--sublist) {
|
||||
text-shadow: 0 0 0.4px var(--ifm-color-primary);
|
||||
}
|
||||
|
||||
[data-theme="dark"] .table-of-contents__link--active {
|
||||
color: hsla(329, 55%, 68%, 1) !important;
|
||||
text-shadow: 0 0 0.4px hsla(329, 55%, 68%, 1);
|
||||
}
|
||||
|
||||
[data-theme="dark"] .table-of-contents {
|
||||
border-left-color: #2c2c32;
|
||||
}
|
||||
|
||||
@ -4,34 +4,37 @@
|
||||
--ifm-navbar-padding-vertical: 0;
|
||||
--ifm-global-radius: 10px;
|
||||
--ifm-code-border-radius: 4px;
|
||||
--ifm-code-padding-horizontal: 0.4em;
|
||||
--ifm-navbar-item-padding-vertical: 0;
|
||||
--ifm-font-family-base: "Geist", Inter, -apple-system, BlinkMacSystemFont,
|
||||
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI emoji";
|
||||
--ifm-font-family-monospace: "Geist Mono", "SFMono-Regular", "Roboto Mono",
|
||||
Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
--ifm-font-family-monospace: "JetBrains Mono", "Geist Mono", "SFMono-Regular",
|
||||
Consolas, "Liberation Mono", Menlo, monospace;
|
||||
--ifm-heading-font-weight: 700;
|
||||
--ifm-line-height-base: 1.7;
|
||||
}
|
||||
|
||||
/* Light theme - Pure white background */
|
||||
html[data-theme="light"] {
|
||||
--ifm-color-primary: hsla(333, 71%, 51%, 1); /* Slightly darker pink for light theme */
|
||||
--ifm-color-primary: #d11074; /* Lightest brand-hue pink passing WCAG AA on white (5.2:1) and inline-code bg #eeeef5 (4.5:1) */
|
||||
--ifm-background-color: var(--ifm-color-white);
|
||||
--ifm-background-surface-color: var(--ifm-color-white);
|
||||
--ifm-code-background: #eeeef5;
|
||||
}
|
||||
|
||||
/* Dark theme - Slate dark background (Langfuse style) */
|
||||
html[data-theme="dark"] {
|
||||
--ifm-color-primary: hsla(329, 45%, 58%, 1); /* Muted, desaturated pink */
|
||||
--ifm-code-background: #1e1e24;
|
||||
--ifm-color-primary: #f471b5; /* Langflow pink — same as API spec */
|
||||
--ifm-background-color: #111; /* Warm slate, not pure black */
|
||||
--ifm-background-surface-color: #111;
|
||||
--ifm-card-background-color: #232328;
|
||||
--ifm-card-border-color: #303038;
|
||||
--ifm-font-color-base: #a8a8b0; /* Soft gray text */
|
||||
--ifm-heading-color: #cdcdd4; /* Headings: brighter but still muted */
|
||||
--ifm-font-color-base: #bcbcc4; /* Soft gray text */
|
||||
--ifm-heading-color: #dcdce2; /* Headings: brighter but still muted */
|
||||
--ifm-color-emphasis-600: #777;
|
||||
--ifm-color-emphasis-700: #8a8a90;
|
||||
--ifm-menu-color: #8a8a92; /* Sidebar text: muted slate */
|
||||
--ifm-menu-color: #9c9ca4; /* Sidebar text: muted slate */
|
||||
--ifm-toc-border-color: #2c2c32;
|
||||
--ifm-navbar-background-color: #111;
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Build endpoints
|
||||
slug: /api-build
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiBuildBuildFlowAndStreamEvents from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-build/build-flow-and-stream-events.sh';
|
||||
import resultApiBuildResultBuildFlowAndStreamEvents from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-build/result-build-flow-and-stream-events.json';
|
||||
import exampleApiBuildBuildFlowAndStreamEvents2 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-build/build-flow-and-stream-events-2.sh';
|
||||
@ -47,17 +47,17 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildBuildFlowAndStreamEvents} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildBuildFlowAndStreamEvents} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildBuildFlowAndStreamEvents} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -65,7 +65,7 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiBuildResultBuildFlowAndStreamEvents} language="json" />
|
||||
<CodeBlock language="json">{resultApiBuildResultBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -74,17 +74,17 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildBuildFlowAndStreamEvents2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildBuildFlowAndStreamEvents2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildBuildFlowAndStreamEvents2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -92,7 +92,7 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiBuildResultBuildFlowAndStreamEvents2} language="json" />
|
||||
<CodeBlock language="json">{resultApiBuildResultBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -102,17 +102,17 @@ To disable streaming and get all events at once, set `?stream=false`.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildBuildFlowAndStreamEvents3} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildBuildFlowAndStreamEvents3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildBuildFlowAndStreamEvents3} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildBuildFlowAndStreamEvents3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildBuildFlowAndStreamEvents3} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildBuildFlowAndStreamEvents3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -146,17 +146,17 @@ The following example stops flow execution at an **OpenAI** component:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildSetStartAndStopPoints} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildSetStartAndStopPoints}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildSetStartAndStopPoints} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildSetStartAndStopPoints}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildSetStartAndStopPoints} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildSetStartAndStopPoints}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -169,17 +169,17 @@ This is useful for running flows without having to pass custom values through th
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildOverrideFlowParameters} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildOverrideFlowParameters} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildOverrideFlowParameters} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -187,7 +187,7 @@ This is useful for running flows without having to pass custom values through th
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiBuildResultOverrideFlowParameters} language="json" />
|
||||
<CodeBlock language="json">{resultApiBuildResultOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Files endpoints
|
||||
slug: /api-files
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiFilesUploadFileV1 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-files/upload-file-v1.sh';
|
||||
import resultApiFilesResultUploadFileV1 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-files/result-upload-file-v1.json';
|
||||
import exampleApiFilesUploadImageFilesV1 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-files/upload-image-files-v1.sh';
|
||||
@ -96,17 +96,17 @@ Replace **FILE_NAME** with the uploaded file name.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadFileV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadFileV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadFileV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -117,7 +117,7 @@ Not all file types are supported.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultUploadFileV1} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultUploadFileV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -133,17 +133,17 @@ To change this limit, set the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment varia
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadImageFilesV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadImageFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadImageFilesV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadImageFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadImageFilesV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadImageFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -166,17 +166,17 @@ To change this limit, set the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment varia
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadImageFilesV12} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadImageFilesV12}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadImageFilesV12} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadImageFilesV12}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadImageFilesV12} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadImageFilesV12}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -193,17 +193,17 @@ List all files associated with a specific flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesListFilesV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesListFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesListFilesV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesListFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesListFilesV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesListFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -211,7 +211,7 @@ List all files associated with a specific flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultListFilesV1} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultListFilesV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -222,17 +222,17 @@ Download a specific file from a flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDownloadFileV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDownloadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDownloadFileV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDownloadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDownloadFileV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDownloadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -240,7 +240,7 @@ Download a specific file from a flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDownloadFileV1} language="text" />
|
||||
<CodeBlock language="text">{resultApiFilesResultDownloadFileV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -251,17 +251,17 @@ Delete a specific file from a flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDeleteFileV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDeleteFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDeleteFileV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDeleteFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDeleteFileV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDeleteFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -269,7 +269,7 @@ Delete a specific file from a flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDeleteFileV1} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultDeleteFileV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -291,17 +291,17 @@ The file is uploaded in the format `USER_ID/FILE_ID.FILE_EXTENSION`, such as `07
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadFileV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadFileV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadFileV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -309,7 +309,7 @@ The file is uploaded in the format `USER_ID/FILE_ID.FILE_EXTENSION`, such as `07
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultUploadFileV2} language="text" />
|
||||
<CodeBlock language="text">{resultApiFilesResultUploadFileV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -319,17 +319,17 @@ You must include the ampersand (`@`) in the request to instruct curl to upload t
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadFileV22} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadFileV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadFileV22} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadFileV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadFileV22} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadFileV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -366,17 +366,17 @@ The default file limit is 1024 MB. To configure this value, change the `LANGFLOW
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesSendFilesToYourFlowsV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesSendFilesToYourFlowsV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesSendFilesToYourFlowsV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesSendFilesToYourFlowsV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesSendFilesToYourFlowsV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesSendFilesToYourFlowsV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -401,17 +401,17 @@ This component loads files into flows from your local machine or Langflow file m
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesSendFilesToYourFlowsV22} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesSendFilesToYourFlowsV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesSendFilesToYourFlowsV22} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesSendFilesToYourFlowsV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesSendFilesToYourFlowsV22} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesSendFilesToYourFlowsV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -427,17 +427,17 @@ List all files associated with your user account.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesListFilesV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesListFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesListFilesV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesListFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesListFilesV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesListFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -445,7 +445,7 @@ List all files associated with your user account.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultListFilesV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultListFilesV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -458,17 +458,17 @@ You must specify the file type you expect in the `--output` value.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDownloadFileV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDownloadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDownloadFileV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDownloadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDownloadFileV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDownloadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -476,7 +476,7 @@ You must specify the file type you expect in the `--output` value.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDownloadFileV2} language="text" />
|
||||
<CodeBlock language="text">{resultApiFilesResultDownloadFileV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -487,17 +487,17 @@ Change a file name.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesEditFileNameV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesEditFileNameV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesEditFileNameV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesEditFileNameV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesEditFileNameV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesEditFileNameV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -505,7 +505,7 @@ Change a file name.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultEditFileNameV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultEditFileNameV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -516,17 +516,17 @@ Delete a specific file by its ID.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDeleteFileV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDeleteFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDeleteFileV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDeleteFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDeleteFileV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDeleteFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -534,7 +534,7 @@ Delete a specific file by its ID.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDeleteFileV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultDeleteFileV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -545,17 +545,17 @@ Delete all files associated with your user account.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDeleteAllFilesV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDeleteAllFilesV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDeleteAllFilesV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -563,7 +563,7 @@ Delete all files associated with your user account.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDeleteAllFilesV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Flow trigger endpoints
|
||||
slug: /api-flows-run
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiFlowsRunRunFlow from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows-run/run-flow.sh';
|
||||
import exampleApiFlowsRunStreamLlmTokenResponses from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows-run/stream-llm-token-responses.sh';
|
||||
import exampleApiFlowsRunRequestExampleWithAllHeadersAndParameters from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows-run/request-example-with-all-headers-and-parameters.sh';
|
||||
@ -46,17 +46,17 @@ This flow requires a chat input string (`input_value`), and uses default values
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunRunFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunRunFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunRunFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -113,17 +113,17 @@ To stream LLM token responses, append the `?stream=true` query parameter to the
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunStreamLlmTokenResponses} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunStreamLlmTokenResponses}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunStreamLlmTokenResponses} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunStreamLlmTokenResponses}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunStreamLlmTokenResponses} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunStreamLlmTokenResponses}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -186,17 +186,17 @@ The following example is truncated to illustrate a series of `token` events as w
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunRequestExampleWithAllHeadersAndParameters} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunRequestExampleWithAllHeadersAndParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunRequestExampleWithAllHeadersAndParameters} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunRequestExampleWithAllHeadersAndParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunRequestExampleWithAllHeadersAndParameters} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunRequestExampleWithAllHeadersAndParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -214,17 +214,17 @@ You don't need to create these variables in Langflow's Global Variables section
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunPassGlobalVariablesInRequestHeaders} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunPassGlobalVariablesInRequestHeaders}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunPassGlobalVariablesInRequestHeaders} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunPassGlobalVariablesInRequestHeaders}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunPassGlobalVariablesInRequestHeaders} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunPassGlobalVariablesInRequestHeaders}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -244,17 +244,17 @@ For more information, see [Trigger flows with webhooks](/webhook).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunWebhookRunFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunWebhookRunFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunWebhookRunFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -262,7 +262,7 @@ For more information, see [Trigger flows with webhooks](/webhook).
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsRunResultWebhookRunFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsRunResultWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Flow management endpoints
|
||||
slug: /api-flows
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiFlowsCreateFlow from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows/create-flow.sh';
|
||||
import resultApiFlowsResultCreateFlow from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows/result-create-flow.json';
|
||||
import exampleApiFlowsCreateFlows from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows/create-flows.sh';
|
||||
@ -54,17 +54,17 @@ Creates a new flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsCreateFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsCreateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsCreateFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsCreateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsCreateFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsCreateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -72,7 +72,7 @@ Creates a new flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultCreateFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultCreateFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -83,17 +83,17 @@ Creates multiple new flows, returning an array of flow objects.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsCreateFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsCreateFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsCreateFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsCreateFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsCreateFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsCreateFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -105,17 +105,17 @@ Retrieves a specific flow by its ID.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -123,7 +123,7 @@ Retrieves a specific flow by its ID.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultReadFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultReadFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -136,17 +136,17 @@ Retrieve all flows with pagination:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -156,17 +156,17 @@ To retrieve flows from a specific project, use the `project_id` query parameter:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadFlows2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadFlows2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadFlows2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadFlows2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadFlows2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadFlows2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -178,17 +178,17 @@ Retrieves a list of sample flows:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadSampleFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadSampleFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadSampleFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadSampleFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadSampleFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadSampleFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -202,17 +202,17 @@ This example changes the value for `endpoint_name` from a random UUID to `my_new
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsUpdateFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsUpdateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsUpdateFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsUpdateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsUpdateFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsUpdateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -220,7 +220,7 @@ This example changes the value for `endpoint_name` from a random UUID to `my_new
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultUpdateFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultUpdateFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -231,17 +231,17 @@ Deletes a specific flow by its ID.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsDeleteFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsDeleteFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsDeleteFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsDeleteFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsDeleteFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsDeleteFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -249,7 +249,7 @@ Deletes a specific flow by its ID.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultDeleteFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultDeleteFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -262,17 +262,17 @@ This endpoint downloads a ZIP file containing [Langflow JSON files](/concepts-fl
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsExportFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsExportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsExportFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsExportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsExportFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsExportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -280,7 +280,7 @@ This endpoint downloads a ZIP file containing [Langflow JSON files](/concepts-fl
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultExportFlows} language="text" />
|
||||
<CodeBlock language="text">{resultApiFlowsResultExportFlows}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -296,17 +296,17 @@ This example uploads a local file named `agent-with-astra-db-tool.json` to a fol
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsImportFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsImportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsImportFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsImportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsImportFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsImportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Logs endpoints
|
||||
slug: /api-logs
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiLogsStreamLogs from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-logs/stream-logs.sh';
|
||||
import resultApiLogsResultStreamLogs from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-logs/result-stream-logs.txt';
|
||||
import exampleApiLogsRetrieveLogsWithOptionalParameters from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-logs/retrieve-logs-with-optional-parameters.sh';
|
||||
@ -37,17 +37,17 @@ Stream logs in real-time using Server Sent Events (SSE):
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiLogsStreamLogs} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiLogsStreamLogs}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiLogsStreamLogs} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiLogsStreamLogs}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiLogsStreamLogs} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiLogsStreamLogs}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -55,7 +55,7 @@ Stream logs in real-time using Server Sent Events (SSE):
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiLogsResultStreamLogs} language="text" />
|
||||
<CodeBlock language="text">{resultApiLogsResultStreamLogs}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -73,17 +73,17 @@ With default values, the endpoint returns the last 10 lines of logs.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiLogsRetrieveLogsWithOptionalParameters} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiLogsRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiLogsRetrieveLogsWithOptionalParameters} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiLogsRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiLogsRetrieveLogsWithOptionalParameters} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiLogsRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -91,6 +91,6 @@ With default values, the endpoint returns the last 10 lines of logs.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiLogsResultRetrieveLogsWithOptionalParameters} language="text" />
|
||||
<CodeBlock language="text">{resultApiLogsResultRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Monitor endpoints
|
||||
slug: /api-monitor
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiMonitorGetVertexBuilds from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-monitor/get-vertex-builds.sh';
|
||||
import resultApiMonitorResultGetVertexBuilds from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-monitor/result-get-vertex-builds.json';
|
||||
import exampleApiMonitorDeleteVertexBuilds from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-monitor/delete-vertex-builds.sh';
|
||||
@ -73,17 +73,17 @@ Retrieve Vertex builds for a specific flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetVertexBuilds} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetVertexBuilds} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetVertexBuilds} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -91,7 +91,7 @@ Retrieve Vertex builds for a specific flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultGetVertexBuilds} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -102,17 +102,17 @@ Delete Vertex builds for a specific flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorDeleteVertexBuilds} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorDeleteVertexBuilds} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorDeleteVertexBuilds} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -120,7 +120,7 @@ Delete Vertex builds for a specific flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultDeleteVertexBuilds} language="text" />
|
||||
<CodeBlock language="text">{resultApiMonitorResultDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -136,17 +136,17 @@ Retrieve a list of all messages:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetMessages} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetMessages} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetMessages} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -160,17 +160,17 @@ This example retrieves messages sent by `Machine` and `AI` in a given chat sessi
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetMessages2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetMessages2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetMessages2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetMessages2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetMessages2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetMessages2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -178,7 +178,7 @@ This example retrieves messages sent by `Machine` and `AI` in a given chat sessi
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultGetMessages2} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultGetMessages2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -191,17 +191,17 @@ This example deletes the message retrieved in the previous `GET /messages` examp
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorDeleteMessages} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorDeleteMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorDeleteMessages} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorDeleteMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorDeleteMessages} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorDeleteMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -209,7 +209,7 @@ This example deletes the message retrieved in the previous `GET /messages` examp
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultDeleteMessages} language="text" />
|
||||
<CodeBlock language="text">{resultApiMonitorResultDeleteMessages}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -222,17 +222,17 @@ This example updates the `text` value of message `3ab66cc6-c048-48f8-ab07-570f5a
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorUpdateMessage} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorUpdateMessage}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorUpdateMessage} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorUpdateMessage}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorUpdateMessage} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorUpdateMessage}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -240,7 +240,7 @@ This example updates the `text` value of message `3ab66cc6-c048-48f8-ab07-570f5a
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultUpdateMessage} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultUpdateMessage}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -253,17 +253,17 @@ This example updates the `session_ID` value `01ce083d-748b-4b8d-97b6-33adbb6a528
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorUpdateSessionId} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorUpdateSessionId}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorUpdateSessionId} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorUpdateSessionId}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorUpdateSessionId} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorUpdateSessionId}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -271,7 +271,7 @@ This example updates the `session_ID` value `01ce083d-748b-4b8d-97b6-33adbb6a528
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultUpdateSessionId} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultUpdateSessionId}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -282,17 +282,17 @@ Delete all messages for a specific session.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorDeleteMessagesBySession} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorDeleteMessagesBySession} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorDeleteMessagesBySession} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -300,7 +300,7 @@ Delete all messages for a specific session.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultDeleteMessagesBySession} language="text" />
|
||||
<CodeBlock language="text">{resultApiMonitorResultDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -315,7 +315,7 @@ Use `GET /monitor/traces` and filter by `flow_id`:
|
||||
<Tabs>
|
||||
<TabItem value="python" label="Python">
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorExampleRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="typescript" label="TypeScript">
|
||||
@ -352,7 +352,7 @@ listTraces().catch(console.error);
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorExampleRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -401,17 +401,17 @@ This information is also available in [flow logs](/logging).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetTransactions} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetTransactions}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetTransactions} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetTransactions}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetTransactions} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetTransactions}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -419,7 +419,7 @@ This information is also available in [flow logs](/logging).
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultGetTransactions} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultGetTransactions}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: OpenAI Responses API
|
||||
slug: /api-openai-responses
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiOpenaiResponsesExampleRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-openai-responses/example-request.sh';
|
||||
import exampleApiOpenaiResponsesExampleStreamingRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-openai-responses/example-streaming-request.sh';
|
||||
import resultApiOpenaiResponsesResultExampleStreamingRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-openai-responses/result-example-streaming-request.json';
|
||||
@ -70,12 +70,12 @@ In the following examples, replace the values for `LANGFLOW_SERVER_URL`, `LANGFL
|
||||
<Tabs groupId="client">
|
||||
<TabItem value="Python" label="OpenAI Python Client" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="OpenAI TypeScript Client">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -105,17 +105,17 @@ If you need these in a different format or want a downloadable calendar, let me
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesExampleRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesExampleRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesExampleRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -234,17 +234,17 @@ When you set `"stream": true` with your request, the API returns a stream where
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesExampleStreamingRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesExampleStreamingRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesExampleStreamingRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -252,7 +252,7 @@ When you set `"stream": true` with your request, the API returns a stream where
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultExampleStreamingRequest} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -295,17 +295,17 @@ First Message:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -313,7 +313,7 @@ First Message:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -322,17 +322,17 @@ Follow-up message:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -340,7 +340,7 @@ Follow-up message:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds2} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -349,17 +349,17 @@ Optionally, you can use your own session ID values for the `previous_response_id
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -419,17 +419,17 @@ To get the raw `results` of each tool execution, add `include: ["tool_call.resu
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesRetrieveToolCallResults} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesRetrieveToolCallResults} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesRetrieveToolCallResults} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -450,7 +450,7 @@ For example:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultRetrieveToolCallResults} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -477,17 +477,17 @@ The `usage` field is always present in the response, either with token counts or
|
||||
<Tabs groupId="token-usage">
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesTokenUsageTracking} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesTokenUsageTracking}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesTokenUsageTracking} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesTokenUsageTracking}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesTokenUsageTracking} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesTokenUsageTracking}</CodeBlock>
|
||||
|
||||
<details>
|
||||
<summary>Response with token usage</summary>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Projects endpoints
|
||||
slug: /api-projects
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiProjectsReadProjects from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-projects/read-projects.sh';
|
||||
import resultApiProjectsResultReadProjects from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-projects/result-read-projects.json';
|
||||
import exampleApiProjectsCreateProject from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-projects/create-project.sh';
|
||||
@ -46,17 +46,17 @@ Get a list of Langflow projects, including project IDs, names, and descriptions.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsReadProjects} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsReadProjects}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsReadProjects} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsReadProjects}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsReadProjects} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsReadProjects}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -64,7 +64,7 @@ Get a list of Langflow projects, including project IDs, names, and descriptions.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultReadProjects} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultReadProjects}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -75,17 +75,17 @@ Create a new project.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsCreateProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsCreateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsCreateProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsCreateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsCreateProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsCreateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -93,7 +93,7 @@ Create a new project.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultCreateProject} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultCreateProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -104,17 +104,17 @@ Adding a flow to a project moves the flow from its previous location. The flow i
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsCreateProject2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsCreateProject2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsCreateProject2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsCreateProject2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsCreateProject2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsCreateProject2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -128,17 +128,17 @@ To find the UUID of your project, call the [read projects](#read-projects) endpo
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsReadProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsReadProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsReadProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsReadProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsReadProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsReadProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -146,7 +146,7 @@ To find the UUID of your project, call the [read projects](#read-projects) endpo
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultReadProject} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultReadProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -161,17 +161,17 @@ If you send the same values multiple times, the update is still processed, even
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsUpdateProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsUpdateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsUpdateProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsUpdateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsUpdateProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsUpdateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -179,7 +179,7 @@ If you send the same values multiple times, the update is still processed, even
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultUpdateProject} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultUpdateProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -190,17 +190,17 @@ Delete a specific project.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsDeleteProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsDeleteProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsDeleteProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsDeleteProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsDeleteProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsDeleteProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -208,7 +208,7 @@ Delete a specific project.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultDeleteProject} language="text" />
|
||||
<CodeBlock language="text">{resultApiProjectsResultDeleteProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -221,17 +221,17 @@ The `--output` flag is optional.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsExportAProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsExportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsExportAProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsExportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsExportAProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsExportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -243,17 +243,17 @@ Import a project and its flows by uploading a Langflow project zip file:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsImportAProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsImportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsImportAProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsImportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsImportAProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsImportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Get started with the Langflow API
|
||||
slug: /api-reference-api-examples
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiReferenceApiExamplesFormLangflowApiRequests from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-reference-api-examples/form-langflow-api-requests.sh';
|
||||
import exampleApiReferenceApiExamplesSetEnvironmentVariables from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-reference-api-examples/set-environment-variables.sh';
|
||||
import exampleApiReferenceApiExamplesHealthCheck from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-reference-api-examples/health-check.sh';
|
||||
@ -53,17 +53,17 @@ As an example of a Langflow API request, the following curl command calls the `/
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesFormLangflowApiRequests} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesFormLangflowApiRequests}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesFormLangflowApiRequests} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesFormLangflowApiRequests}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesFormLangflowApiRequests} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesFormLangflowApiRequests}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -112,7 +112,7 @@ You can use any method you prefer to set environment variables, such as `export`
|
||||
Then, reference those environment variables in your API requests.
|
||||
For example:
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesSetEnvironmentVariables} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesSetEnvironmentVariables}</CodeBlock>
|
||||
|
||||
Commonly used values in Langflow API requests include your [Langflow server URL](#base-url), [Langflow API keys](#authentication), flow IDs, and [project IDs](/api-projects#read-projects).
|
||||
|
||||
@ -129,17 +129,17 @@ Returns the health status of the Langflow database and chat services:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesHealthCheck} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesHealthCheck}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesHealthCheck} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesHealthCheck}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesHealthCheck} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesHealthCheck}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -147,7 +147,7 @@ Returns the health status of the Langflow database and chat services:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiReferenceApiExamplesResultHealthCheck} language="json" />
|
||||
<CodeBlock language="json">{resultApiReferenceApiExamplesResultHealthCheck}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -161,17 +161,17 @@ Returns the current Langflow API version:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesGetVersion} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesGetVersion}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesGetVersion} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesGetVersion}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesGetVersion} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesGetVersion}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -179,7 +179,7 @@ Returns the current Langflow API version:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiReferenceApiExamplesResultGetVersion} language="text" />
|
||||
<CodeBlock language="text">{resultApiReferenceApiExamplesResultGetVersion}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -191,17 +191,17 @@ Requires a [Langflow API key](/api-keys-and-authentication).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesGetConfiguration} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesGetConfiguration}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesGetConfiguration} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesGetConfiguration}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesGetConfiguration} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesGetConfiguration}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -209,7 +209,7 @@ Requires a [Langflow API key](/api-keys-and-authentication).
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiReferenceApiExamplesResultGetConfiguration} language="json" />
|
||||
<CodeBlock language="json">{resultApiReferenceApiExamplesResultGetConfiguration}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -221,17 +221,17 @@ Requires a [Langflow API key](/api-keys-and-authentication).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesGetAllComponents} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesGetAllComponents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesGetAllComponents} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesGetAllComponents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesGetAllComponents} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesGetAllComponents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Users endpoints
|
||||
slug: /api-users
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiUsersAddUser from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-users/add-user.sh';
|
||||
import resultApiUsersResultAddUser from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-users/result-add-user.json';
|
||||
import exampleApiUsersGetCurrentUser from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-users/get-current-user.sh';
|
||||
@ -43,17 +43,17 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersAddUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersAddUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersAddUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersAddUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersAddUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersAddUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -65,7 +65,7 @@ This `user_id` key is specifically for Langflow user management.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultAddUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultAddUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -76,17 +76,17 @@ Retrieve information about the authenticated user.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersGetCurrentUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersGetCurrentUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersGetCurrentUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersGetCurrentUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersGetCurrentUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersGetCurrentUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -94,7 +94,7 @@ Retrieve information about the authenticated user.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultGetCurrentUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultGetCurrentUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -107,17 +107,17 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersListAllUsers} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersListAllUsers}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersListAllUsers} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersListAllUsers}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersListAllUsers} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersListAllUsers}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -125,7 +125,7 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultListAllUsers} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultListAllUsers}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -140,17 +140,17 @@ This example activates the specified user's account and makes them a superuser:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersUpdateUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersUpdateUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersUpdateUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersUpdateUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersUpdateUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersUpdateUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -158,7 +158,7 @@ This example activates the specified user's account and makes them a superuser:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultUpdateUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultUpdateUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -171,17 +171,17 @@ Requires authentication as the target user.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersResetPassword} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersResetPassword}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersResetPassword} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersResetPassword}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersResetPassword} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersResetPassword}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -189,7 +189,7 @@ Requires authentication as the target user.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultResetPassword} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultResetPassword}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -202,17 +202,17 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersDeleteUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersDeleteUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersDeleteUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersDeleteUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersDeleteUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersDeleteUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -220,6 +220,6 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultDeleteUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultDeleteUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Workflow API (Beta)
|
||||
slug: /workflow-api
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleWorkflowsApiExampleSynchronousRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/workflows-api/example-synchronous-request.sh';
|
||||
import exampleWorkflowsApiExampleAsynchronousRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/workflows-api/example-asynchronous-request.sh';
|
||||
import exampleWorkflowsApiExampleRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/workflows-api/example-request.sh';
|
||||
@ -54,17 +54,17 @@ Execute a workflow synchronously and receive complete results immediately:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleSynchronousRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleSynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleSynchronousRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleSynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleSynchronousRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleSynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -84,17 +84,17 @@ The asynchronous request contains `stream` parameter, but streaming is not yet s
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleAsynchronousRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleAsynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleAsynchronousRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleAsynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleAsynchronousRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleAsynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -174,17 +174,17 @@ The response includes an `outputs` field containing component-level results. Eac
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -249,17 +249,17 @@ The response includes a `status` field that indicates the current state of the w
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleRequest2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleRequest2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleRequest2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleRequest2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleRequest2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleRequest2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -60,18 +60,17 @@ It outputs the API response as [`Data`](/data-types#data).
|
||||
| Sitemap Only (`sitemap_only`) | Boolean | Input parameter. When true, only links found in the sitemap are returned. |
|
||||
| Include Subdomains (`include_subdomains`) | Boolean | Input parameter. When true, subdomains of the provided URL are also scanned. |
|
||||
|
||||
## Firecrawl Extract API
|
||||
## Firecrawl Search API
|
||||
|
||||
This component extracts structured data from one or more URLs using a prompt or schema.
|
||||
This component searches the web and returns the results.
|
||||
|
||||
It outputs the API response as [`Data`](/data-types#data).
|
||||
|
||||
### Firecrawl Extract API parameters
|
||||
### Firecrawl Search API parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| Firecrawl API Key (`api_key`) | SecretString | Input parameter. The API key to use Firecrawl API. |
|
||||
| URLs (`urls`) | String | Input parameter. List of URLs to extract data from (separated by commas or new lines). |
|
||||
| Prompt (`prompt`) | String | Input parameter. Prompt to guide the extraction process. |
|
||||
| Schema (`schema`) | Data | Input parameter. Schema to define the structure of the extracted data. |
|
||||
| Enable Web Search (`enable_web_search`) | Boolean | Input parameter. When true, the extraction uses web search to find additional data. |
|
||||
| Query (`query`) | String | Input parameter. The search query to run. |
|
||||
| Limit (`limit`) | Integer | Input parameter. The maximum number of results to return. |
|
||||
| Location (`location`) | String | Input parameter. Location to bias the search results (for example, a country or region). |
|
||||
|
||||
121
docs/docs/Components/bundles-nextplaid.mdx
Normal file
121
docs/docs/Components/bundles-nextplaid.mdx
Normal file
@ -0,0 +1,121 @@
|
||||
---
|
||||
title: NextPlaid
|
||||
slug: /bundles-nextplaid
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
The **NextPlaid** bundle provides multi-vector ColBERT-style retrieval for Langflow through a running [NextPlaid](https://github.com/meetdoshi90/next-plaid) server.
|
||||
NextPlaid stores each document as a matrix of token embeddings, which enables higher retrieval quality on semantic search tasks through ColBERT-style late interaction with MaxSim scoring.
|
||||
For more information on multi-vector embeddings, see the [langchain-plaid](https://github.com/meetdoshi90/langchain-plaid) package that this bundle is built on.
|
||||
|
||||
## Install the NextPlaid bundle
|
||||
|
||||
The bundle includes two components:
|
||||
|
||||
* **NextPlaid**: vector store component backed by a running NextPlaid server.
|
||||
* **vLLM Multivector Embeddings**: generates the multi-vector token embeddings required by NextPlaid.
|
||||
|
||||
The **NextPlaid** bundle is included in the `lfx-nextplaid` Extension bundle, which is installed automatically as part of `uv pip install langflow`.
|
||||
|
||||
If you need to install it separately, run:
|
||||
|
||||
```bash
|
||||
uv pip install lfx-nextplaid
|
||||
uv run langflow run
|
||||
```
|
||||
|
||||
To verify the bundle is loaded in your environment:
|
||||
|
||||
```bash
|
||||
lfx extension list
|
||||
```
|
||||
|
||||
## NextPlaid
|
||||
|
||||
The **NextPlaid** component reads from and writes to a [NextPlaid](https://github.com/meetdoshi90/next-plaid) multi-vector search server.
|
||||
|
||||
NextPlaid is a Rust-based server that implements ColBERT-style late interaction retrieval with MaxSim scoring.
|
||||
Each document is stored as a matrix of token embeddings rather than a single dense vector, giving better retrieval quality on semantic search tasks.
|
||||
The component supports both text retrieval with ColBERT models and image retrieval with ColPali models.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
### Use the NextPlaid component in a flow
|
||||
|
||||
Connect a **vLLM Multivector Embeddings** component to the **Embedding (Multivector)** input. Standard single-vector embedding components are not compatible with NextPlaid.
|
||||
|
||||
The **NextPlaid** component can be used for both writes and reads:
|
||||
|
||||
* When writing, it ingests documents from an attached data source, computes multi-vector embeddings with the connected **vLLM Multivector Embeddings** component, and then loads them into the NextPlaid index.
|
||||
To trigger writes, click <Icon name="Play" aria-hidden="true"/> **Run component** on the **NextPlaid** component.
|
||||
|
||||
* When reading, the **NextPlaid** component uses chat input to perform a MaxSim similarity search against the index and returns the top results.
|
||||
|
||||
### NextPlaid parameters
|
||||
|
||||
<PartialParams />
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Server URL** (`url`) | String | Input parameter. Base URL of the running NextPlaid server. Default: `http://localhost:8080`. |
|
||||
| **Index Name** (`index_name`) | String | Input parameter. Name of the index to create or connect to. Default: `langflow`. |
|
||||
| **Ingest Data** (`ingest_data`) | Data | Input parameter. Documents or images to write to the vector store. Only relevant for writes. |
|
||||
| **Search Query** (`search_query`) | String | Input parameter. The query string to use for similarity search. Only relevant for reads. |
|
||||
| **Embedding (Multivector)** (`embedding`) | Embeddings | Input parameter. Connect a **vLLM Multivector Embeddings** component to generate token-level embeddings. Required for both reads and writes. |
|
||||
| **Index Batch Size** (`index_batch_size`) | Integer | Input parameter. Number of documents per indexing request. PLAID builds its initial cluster centroids from the first batch — larger batches produce better retrieval quality. Default: `500`. |
|
||||
| **Number of Results** (`number_of_results`) | Integer | Input parameter. Number of results to return from similarity search. Default: `4`. |
|
||||
| **Quantization Bits** (`nbits`) | Dropdown | Input parameter. Bit-width for PLAID quantization. `4` gives better quality; `2` uses less memory. Options: `2`, `4`. Default: `4`. |
|
||||
| **Create Index If Not Exists** (`create_index_if_not_exists`) | Boolean | Input parameter. If `true`, creates the index on the NextPlaid server if it does not already exist. Default: `true`. |
|
||||
| **Write Timeout** (`write_timeout`) | Float | Input parameter. Seconds to wait for each indexing batch to finish. Set to `0` for async indexing (search may return empty results on the first run). Recommended: `30` or higher when ingesting and searching in the same flow run. Default: `30.0`. |
|
||||
|
||||
## vLLM Multivector Embeddings
|
||||
|
||||
The **vLLM Multivector Embeddings** component generates multi-vector token embeddings by calling vLLM's `/pooling` endpoint with `task: token_embed`.
|
||||
|
||||
The output is a multi-vector `Embeddings` object that returns a matrix of token embeddings per document, which is required by the **NextPlaid** vector store. It is not compatible with standard single-vector stores.
|
||||
|
||||
For more information about using embedding model components in flows, see [Embedding model components](/components-embedding-models).
|
||||
|
||||
Your vLLM server must be started with a ColBERT- or ColPali-compatible model and the pooling runner enabled:
|
||||
|
||||
```bash
|
||||
vllm serve <model> --runner pooling --pooler-config '{"task": "token_embed"}'
|
||||
```
|
||||
|
||||
Compatible models include:
|
||||
* **Text (ColBERT):** `answerdotai/answerai-colbert-small-v1`
|
||||
* **Text + Images (ColPali):** `ModernVBERT/colmodernvbert`
|
||||
|
||||
For more information on the vLLM server, see the [vLLM documentation](https://docs.vllm.ai/).
|
||||
|
||||
### vLLM Multivector Embeddings parameters
|
||||
|
||||
<PartialParams />
|
||||
|
||||
| Name | Type | Description |
|
||||
|------|------|-------------|
|
||||
| **Model Name** (`model_name`) | String | Input parameter. The multi-vector model name served by vLLM. Default: `answerdotai/answerai-colbert-small-v1`. |
|
||||
| **vLLM API Base** (`api_base`) | String | Input parameter. Base URL of the vLLM server (without the `/v1` suffix). Default: `http://localhost:8000`. |
|
||||
| **API Key** (`api_key`) | SecretString | Input parameter. API key for the vLLM server. Leave empty for local servers. Optional. |
|
||||
| **Request Timeout** (`request_timeout`) | Float | Input parameter. Timeout in seconds for each request to the vLLM API. Default: `60.0`. Advanced. |
|
||||
| **Max Retries** (`max_retries`) | Integer | Input parameter. Number of times to retry a failed request before raising an error. Default: `3`. Advanced. |
|
||||
|
||||
## See also
|
||||
|
||||
* [**Embedding model** components](/components-embedding-models)
|
||||
* [NextPlaid server](https://github.com/meetdoshi90/next-plaid)
|
||||
* [langchain-plaid](https://github.com/meetdoshi90/langchain-plaid)
|
||||
* [vLLM documentation](https://docs.vllm.ai/)
|
||||
126
docs/docs/Components/bundles-oracle.mdx
Normal file
126
docs/docs/Components/bundles-oracle.mdx
Normal file
@ -0,0 +1,126 @@
|
||||
---
|
||||
title: Oracle
|
||||
slug: /bundles-oracle
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import PartialParams from '@site/docs/_partial-hidden-params.mdx';
|
||||
import PartialConditionalParams from '@site/docs/_partial-conditional-params.mdx';
|
||||
import PartialVectorSearchResults from '@site/docs/_partial-vector-search-results.mdx';
|
||||
import PartialVectorStoreInstance from '@site/docs/_partial-vector-store-instance.mdx';
|
||||
|
||||
<Icon name="Blocks" aria-hidden="true" /> [**Bundles**](/components-bundle-components) contain custom components that support specific third-party integrations with Langflow.
|
||||
|
||||
This page describes the components that are available in the **Oracle** bundle.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- An Oracle Database reachable from the Langflow server/runtime.
|
||||
- The python-oracledb connection values, such as user, password, DSN, and optional wallet settings. See the official guide:
|
||||
https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html
|
||||
|
||||
---
|
||||
|
||||
## Oracle Vector Store (OracleVectorStoreComponent)
|
||||
|
||||
The `OracleVectorStoreComponent` reads and writes to Oracle vector stores using an instance of [`OracleVS`](https://docs.langchain.com/oss/python/integrations/vectorstores/oracle) from `langchain_oracledb`. Use it to ingest documents and perform similarity/MMR searches.
|
||||
|
||||
<details>
|
||||
<summary>About vector store instances</summary>
|
||||
|
||||
<PartialVectorStoreInstance />
|
||||
|
||||
</details>
|
||||
|
||||
<PartialVectorSearchResults />
|
||||
|
||||
:::tip
|
||||
For a tutorial using a vector database in a flow, see [Create a vector RAG chatbot](/chat-with-rag).
|
||||
:::
|
||||
|
||||
### Parameters
|
||||
|
||||
You can inspect a vector store component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it.
|
||||
|
||||
<PartialParams />
|
||||
|
||||
<PartialConditionalParams />
|
||||
|
||||
| Name | Type | Description |
|
||||
| -------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `user` | Secret | Optional. Oracle database user. |
|
||||
| `password` | Secret | Optional. Oracle database password. |
|
||||
| `dsn` | Secret | Required. Oracle DSN or connect string. |
|
||||
| `wallet_password` | Secret | Optional. Wallet password for wallet-based connections (advanced). |
|
||||
| `connection_params` | Dict | Optional non-secret python-oracledb connection options, such as `config_dir` and `wallet_location`. |
|
||||
| `table_name` | String | Required. Table name used by the vector store. |
|
||||
| `ingest_data` | Data | Optional. Data to ingest (converted to `Document`). |
|
||||
| `embedding` | Embeddings| Required. Embedding function/provider to use. |
|
||||
| `search_query` | String | Optional. Query text for search. |
|
||||
| `number_of_results` | Integer | Optional. Number of results to return (default: 4). |
|
||||
| `search_type` | Dropdown | Optional. Search mode to use. Supported values are `Similarity` and `MMR (Max Marginal Relevance)` (default: `Similarity`). |
|
||||
| `distance_strategy` | Dropdown | Optional. One of `EUCLIDEAN`, `DOT`, `COSINE` (default: `COSINE`). |
|
||||
| `create_index` | Boolean | Optional. If true, will create a vector index after setup (default: true). |
|
||||
| `index_params` | Dict | Optional. Parameters for index creation (e.g., `idx_name`, `idx_type`, etc.). |
|
||||
| `mutate_on_duplicate`| Boolean | Optional. When supported by your `langchain_oracledb` version, control mutation behavior on duplicate inserts. |
|
||||
|
||||
---
|
||||
|
||||
## Oracle Doc Loader (OracleDocLoaderComponent)
|
||||
|
||||
The `OracleDocLoaderComponent` reads documents from Oracle Database using `OracleDocLoader` from `langchain_oracledb.document_loaders`. It returns a list of `Data` objects converted from `Document`.
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `user` | Secret | Optional. Oracle database user. |
|
||||
| `password` | Secret | Optional. Oracle database password. |
|
||||
| `dsn` | Secret | Required. Oracle DSN or connect string. |
|
||||
| `wallet_password` | Secret | Optional. Wallet password for wallet-based connections (advanced). |
|
||||
| `connection_params` | Dict | Optional non-secret python-oracledb connection options, such as `config_dir` and `wallet_location`. |
|
||||
| `params` | Dict | Required. Loader-specific options passed to `OracleDocLoader` (for example, `owner`, `tablename`, `colname`, etc.). See Oracle AI docs. |
|
||||
|
||||
Check [`Oracle AI Vector Search Document Processing`](https://docs.langchain.com/oss/python/integrations/document_loaders/oracleai) for more information.
|
||||
---
|
||||
|
||||
## Oracle Autonomous Database Loader (OracleAutonomousDatabaseLoaderComponent)
|
||||
|
||||
`OracleAutonomousDatabaseLoaderComponent` loads data from Oracle Autonomous Database (ADB) by running a SQL query and converting each row into a `Document`, then into `Data`.
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------------- | ------ | ----------------------------------------------------------------------------------------------------------- |
|
||||
| `query` | String | Required. SQL query to execute. Each row in the result becomes a document. |
|
||||
| `user` | Secret | Optional. Oracle database user. |
|
||||
| `password` | Secret | Optional. Oracle database password. |
|
||||
| `dsn` | Secret | Required. Oracle DSN or connect string. |
|
||||
| `wallet_password` | Secret | Optional. Wallet password for wallet-based connections (advanced). |
|
||||
| `connection_params` | Dict | Optional non-secret Oracle options such as `schema`, `config_dir`, and `wallet_location`. |
|
||||
| `metadata` | String | Optional. Comma-separated list of result columns to copy into document metadata. |
|
||||
| `parameter` | Dict | Optional. Bind parameters for the SQL query. |
|
||||
|
||||
:::note
|
||||
This component is designed for Oracle ADB environments. Ensure your wallet and TLS configuration are set up if required by your environment, for example with `config_dir` and `wallet_location` in `connection_params`, and `wallet_password` in the dedicated secret field.
|
||||
:::
|
||||
|
||||
Check [`Oracle Autonomous Database`](https://docs.langchain.com/oss/python/integrations/document_loaders/oracleadb_loader) for more information.
|
||||
|
||||
---
|
||||
|
||||
## Oracle Embeddings (OracleEmbeddingsComponent)
|
||||
|
||||
The `OracleEmbeddingsComponent` builds embeddings using Oracle AI Vector Search via `langchain_oracledb.OracleEmbeddings`. Use this component to create an embeddings function for the vector store or other downstream components.
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description |
|
||||
| -------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `user` | Secret | Optional. Oracle database user. |
|
||||
| `password` | Secret | Optional. Oracle database password. |
|
||||
| `dsn` | Secret | Required. Oracle DSN or connect string. |
|
||||
| `wallet_password` | Secret | Optional. Wallet password for wallet-based connections (advanced). |
|
||||
| `connection_params` | Dict | Optional non-secret python-oracledb connection options, such as `config_dir` and `wallet_location`. |
|
||||
| `embedding_params` | Dict | Optional. Embedding parameters passed to `OracleEmbeddings` (for example, `provider`, `model`, etc.). See the Oracle embedding docs for accepted values. |
|
||||
| `proxy` | Secret | Optional. HTTP proxy to reach the embedding provider (advanced). |
|
||||
@ -56,8 +56,19 @@ To use the vLLM component, you need to have a vLLM server running. Here are the
|
||||
|
||||
For more detailed setup instructions, see the [vLLM documentation](https://docs.vllm.ai/en/latest/getting_started/quickstart.html).
|
||||
|
||||
## vLLM multi-vector embeddings
|
||||
|
||||
For multi-vector ColBERT or ColPali-style retrieval with vLLM, use the **vLLM Multivector Embeddings** component.
|
||||
|
||||
The **vLLM Multivector Embeddings** component ships with the **NextPlaid** bundle (`lfx-nextplaid`), since it is purpose-built to feed that vector store.
|
||||
|
||||
For more information on using the component in a flow, see [vLLM Multi-vector Embeddings](./bundles-nextplaid#vllm-multivector-embeddings).
|
||||
|
||||
For more information on multi-vector embeddings, see the [langchain-plaid repository](https://github.com/meetdoshi90/langchain-plaid).
|
||||
|
||||
## See also
|
||||
|
||||
* [**Agent** component](/components-agents)
|
||||
* [**Language Model** component](/components-models)
|
||||
* [**NextPlaid** bundle](./bundles-nextplaid)
|
||||
* [vLLM GitHub repository](https://github.com/vllm-project/vllm)
|
||||
|
||||
@ -4,8 +4,6 @@ slug: /concepts-components
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import CodeSnippet from "@site/src/components/CodeSnippet";
|
||||
import RecursiveCharacterSource from "!!raw-loader!@langflow/src/lfx/src/lfx/components/langchain_utilities/recursive_character.py";
|
||||
|
||||
Components are the building blocks of your flows.
|
||||
Like classes in an application, each component is designed for a specific use case or integration.
|
||||
@ -168,26 +166,59 @@ Each component's code includes definitions for inputs and outputs, which are rep
|
||||
For example, the `RecursiveCharacterTextSplitter` has four inputs. Each input definition specifies the input type, such as `IntInput`, as well as the encoded name, display name, description, and other parameters for that specific input.
|
||||
These values determine the component settings, such as display names and tooltips in the visual editor.
|
||||
|
||||
<CodeSnippet
|
||||
source={RecursiveCharacterSource}
|
||||
startLine={17}
|
||||
endLine={41}
|
||||
language="python"
|
||||
title="RecursiveCharacterTextSplitter inputs (from recursive_character.py)"
|
||||
showLineNumbers
|
||||
/>
|
||||
{/* Snippet copied from src/lfx/src/lfx/components/langchain_utilities/recursive_character.py — keep in sync if the component changes. */}
|
||||
```python title="RecursiveCharacterTextSplitter inputs (from recursive_character.py)" showLineNumbers
|
||||
inputs = [
|
||||
IntInput(
|
||||
name="chunk_size",
|
||||
display_name="Chunk Size",
|
||||
info="The maximum length of each chunk.",
|
||||
value=1000,
|
||||
),
|
||||
IntInput(
|
||||
name="chunk_overlap",
|
||||
display_name="Chunk Overlap",
|
||||
info="The amount of overlap between chunks.",
|
||||
value=200,
|
||||
),
|
||||
DataInput(
|
||||
name="data_input",
|
||||
display_name="Input",
|
||||
info="The texts to split.",
|
||||
input_types=["Document", "Data", "JSON"],
|
||||
required=True,
|
||||
),
|
||||
MessageTextInput(
|
||||
name="separators",
|
||||
display_name="Separators",
|
||||
info='The characters to split on.\nIf left empty defaults to ["\\n\\n", "\\n", " ", ""].',
|
||||
is_list=True,
|
||||
),
|
||||
]
|
||||
```
|
||||
|
||||
Additionally, components have methods or functions that handle their functionality.
|
||||
For example, the `RecursiveCharacterTextSplitter` has two methods:
|
||||
|
||||
<CodeSnippet
|
||||
source={RecursiveCharacterSource}
|
||||
startLine={45}
|
||||
endLine={60}
|
||||
language="python"
|
||||
title="RecursiveCharacterTextSplitter methods (from recursive_character.py)"
|
||||
showLineNumbers
|
||||
/>
|
||||
{/* Snippet copied from src/lfx/src/lfx/components/langchain_utilities/recursive_character.py — keep in sync if the component changes. */}
|
||||
```python title="RecursiveCharacterTextSplitter methods (from recursive_character.py)" showLineNumbers
|
||||
def get_data_input(self) -> Any:
|
||||
return self.data_input
|
||||
|
||||
def build_text_splitter(self) -> TextSplitter:
|
||||
if not self.separators:
|
||||
separators: list[str] | None = None
|
||||
else:
|
||||
# check if the separators list has escaped characters
|
||||
# if there are escaped characters, unescape them
|
||||
separators = [unescape_string(x) for x in self.separators]
|
||||
|
||||
return RecursiveCharacterTextSplitter(
|
||||
separators=separators,
|
||||
chunk_size=self.chunk_size,
|
||||
chunk_overlap=self.chunk_overlap,
|
||||
)
|
||||
```
|
||||
|
||||
The `get_data_input` method retrieves the text to be split from the component's input, which makes the data available to the class.
|
||||
The `build_text_splitter` method creates a `RecursiveCharacterTextSplitter` object by calling its parent class's `build` method. Then, the text is split with the created splitter and passed to the next component.
|
||||
|
||||
@ -9,18 +9,15 @@ import PartialPodmanAlt from '@site/docs/_partial-podman-alt.mdx';
|
||||
|
||||
Running applications in Docker containers ensures consistent behavior across different systems and eliminates dependency conflicts.
|
||||
|
||||
You can use the Langflow Docker image to start a Langflow container.
|
||||
|
||||
This guide demonstrates several ways to deploy Langflow with [Docker](https://docs.docker.com/) and [Docker Compose](https://docs.docker.com/compose/):
|
||||
This guide demonstrates several ways to run Langflow with [Docker](https://docs.docker.com/) and [Docker Compose](https://docs.docker.com/compose/):
|
||||
|
||||
* [Quickstart](#quickstart): Start a Langflow container with default values.
|
||||
* [Use Docker Compose](#clone): Clone the Langflow repo, and then use Docker Compose to build the Langflow Docker container.
|
||||
This option provides more control over the configuration, including a persistent PostgreSQL database service, while still using the base Langflow Docker image.
|
||||
* [Create a custom flow image](#package-your-flow-as-a-docker-image): Use a Dockerfile to package a flow as a Docker image.
|
||||
* [Create a custom Langflow image](#customize-the-langflow-docker-image): Use a Dockerfile to package a custom Langflow Docker image that includes your own code, custom dependencies, or other modifications.
|
||||
* [Upgrade the Langflow Docker image](#upgrade-the-langflow-docker-image): Upgrade to a newer image without losing your database or flows by using persistent volumes and replacing only the container.
|
||||
* [Use Docker Compose](#docker-compose): Run Langflow with a persistent PostgreSQL database and configurable environment variables.
|
||||
* [Customize the Docker image](#customize): Package a flow or add your own code into a custom image built on top of the official Langflow image.
|
||||
* [Build and run the Docker image from source](#build-from-source): Build a Docker image from a local clone of the repo, or start a full development environment with hot reload on both frontend and backend.
|
||||
* [Upgrade the Langflow Docker image](#upgrade-the-langflow-docker-image): Upgrade to a newer image without losing your database or flows.
|
||||
|
||||
## Quickstart: Start a Langflow container with default values {#quickstart}
|
||||
## Quickstart {#quickstart}
|
||||
|
||||
With Docker installed and running on your system, run the following command:
|
||||
|
||||
@ -31,19 +28,13 @@ docker run -p 7860:7860 langflowai/langflow:latest
|
||||
Then, access Langflow at `http://localhost:7860/`.
|
||||
|
||||
This container runs a pre-built Docker image with default settings.
|
||||
For more control over the configuration, see [Clone the repo and run the Langflow Docker container](#clone).
|
||||
For more control over the configuration, see [Use Docker Compose](#docker-compose).
|
||||
|
||||
## Clone the repo and run the Langflow Docker container {#clone}
|
||||
## Use Docker Compose {#docker-compose}
|
||||
|
||||
Cloning the Langflow repository and using Docker Compose gives you more control over your configuration, allowing you to customize environment variables, use a persistent PostgreSQL database service (instead of the default SQLite database), and include custom dependencies.
|
||||
Docker Compose gives you more control over your configuration, such as setting environment variables, using a persistent PostgreSQL database instead of the default SQLite database, and including custom dependencies.
|
||||
|
||||
The default deployment with Docker Compose includes the following:
|
||||
|
||||
- **Langflow service**: Runs the latest Langflow image with PostgreSQL as the database.
|
||||
- **PostgreSQL service**: Provides persistent data storage for flows, users, and settings.
|
||||
- **Persistent volumes**: Ensures your data survives container restarts.
|
||||
|
||||
The complete Docker Compose configuration is available in `docker_example/docker-compose.yml`.
|
||||
The Langflow repo includes a ready-to-use Compose file at `docker_example/docker-compose.yml` that pulls the latest Langflow image from Docker Hub and includes persistent volume storage with PostgreSQL.
|
||||
|
||||
1. Clone the Langflow repository:
|
||||
|
||||
@ -65,11 +56,13 @@ The complete Docker Compose configuration is available in `docker_example/docker
|
||||
|
||||
4. Access Langflow at `http://localhost:7860/`.
|
||||
|
||||
### Customize your deployment
|
||||
## Customize the Docker Compose file {#customize}
|
||||
|
||||
You can customize the Docker Compose configuration to fit your specific deployment.
|
||||
Customize the Docker Compose file to fit your deployment's requirements.
|
||||
|
||||
For example, to configure the container's database credentials using a `.env` file, do the following:
|
||||
### Include environment variables
|
||||
|
||||
Configure a container's database credentials using a `.env` file.
|
||||
|
||||
1. Create a `.env` file with your database credentials in the same directory as `docker-compose.yml`:
|
||||
|
||||
@ -84,7 +77,7 @@ For example, to configure the container's database credentials using a `.env` fi
|
||||
LANGFLOW_CONFIG_DIR=/app/langflow
|
||||
```
|
||||
|
||||
2. Modify the `docker-compose.yml` file to reference the `.env` file for both the `langflow` and `postgres` services:
|
||||
2. Edit `docker-compose.yml` to replace the hardcoded values with variable references for both the `langflow` and `postgres` services:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
@ -99,17 +92,16 @@ For example, to configure the container's database credentials using a `.env` fi
|
||||
- POSTGRES_DB=${POSTGRES_DB}
|
||||
```
|
||||
|
||||
With variable references in place, Docker Compose reads the values from your `.env` file at startup.
|
||||
|
||||
For a complete list of available environment variables, see [Langflow environment variables](/environment-variables).
|
||||
|
||||
For more customization options, see [Customize the Langflow Docker image with your own code](#customize-the-langflow-docker-image).
|
||||
### Package a flow into the image
|
||||
|
||||
## Package your flow as a Docker image {#package-your-flow-as-a-docker-image}
|
||||
Embed a flow JSON directly into a Docker image.
|
||||
This is useful for distributing a specific flow as a standalone container or deploying it to environments like Kubernetes.
|
||||
|
||||
This section shows you how to create a Dockerfile that builds a Docker image containing your Langflow flow. This approach is useful when you want to distribute a specific flow as a standalone container or deploy it to environments like Kubernetes.
|
||||
|
||||
Unlike the previous sections that use pre-built images, this method builds a custom image with your flow embedded inside it.
|
||||
|
||||
1. Create a project directory, and change directory into it.
|
||||
1. Create a project directory and change into it:
|
||||
|
||||
```bash
|
||||
mkdir langflow-custom && cd langflow-custom
|
||||
@ -125,7 +117,7 @@ Unlike the previous sections that use pre-built images, this method builds a cus
|
||||
cp /path/to/your/flow.json .
|
||||
```
|
||||
|
||||
3. Create a Dockerfile to build your custom image:
|
||||
3. Create a `Dockerfile`:
|
||||
|
||||
```dockerfile
|
||||
FROM langflowai/langflow:latest
|
||||
@ -134,60 +126,22 @@ Unlike the previous sections that use pre-built images, this method builds a cus
|
||||
ENV LANGFLOW_LOAD_FLOWS_PATH=/app/flows
|
||||
```
|
||||
|
||||
This Dockerfile uses the official Langflow image as the base, creates a directory for your flows, copies your JSON flow files into the directory, and sets the environment variable to tell Langflow where to find the flows.
|
||||
|
||||
4. Build and test your custom image:
|
||||
4. Build, test, and optionally push your image:
|
||||
|
||||
```bash
|
||||
docker build -t myuser/langflow-custom:1.0.0 .
|
||||
docker run -p 7860:7860 myuser/langflow-custom:1.0.0
|
||||
docker push myuser/langflow-custom:1.0.0 # optional
|
||||
```
|
||||
|
||||
5. Push your image to Docker Hub (optional):
|
||||
For Kubernetes deployment, see [Deploy the Langflow production environment on Kubernetes](/deployment-kubernetes-prod).
|
||||
|
||||
```bash
|
||||
docker push myuser/langflow-custom:1.0.0
|
||||
```
|
||||
### Add custom code or dependencies
|
||||
|
||||
Your custom image now contains your flow and can be deployed anywhere Docker runs. For Kubernetes deployment, see [Deploy the Langflow production environment on Kubernetes](/deployment-kubernetes-prod).
|
||||
Patch custom code into the pre-built image's installation.
|
||||
This is useful when you need to add custom Python packages, replace a built-in component, or make targeted changes without a [full source build](#build-from-source).
|
||||
|
||||
## Customize the Langflow Docker image with your own code {#customize-the-langflow-docker-image}
|
||||
|
||||
While the previous section showed how to package a flow with a Docker image, this section shows how to customize the Langflow application itself. This is useful when you need to add custom Python packages or dependencies, modify Langflow's configuration or settings, include custom components or tools, or add your own code to extend Langflow's functionality.
|
||||
|
||||
This example demonstrates how to customize the **Message History** component, but the same approach can be used for any code modifications.
|
||||
|
||||
```dockerfile
|
||||
FROM langflowai/langflow:latest
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy your modified memory component
|
||||
COPY src/lfx/src/lfx/components/helpers/memory.py /tmp/memory.py
|
||||
|
||||
# Find the site-packages directory where langflow is installed
|
||||
RUN python -c "import site; print(site.getsitepackages()[0])" > /tmp/site_packages.txt
|
||||
|
||||
# Replace the file in the site-packages location
|
||||
RUN SITE_PACKAGES=$(cat /tmp/site_packages.txt) && \
|
||||
echo "Site packages at: $SITE_PACKAGES" && \
|
||||
mkdir -p "$SITE_PACKAGES/langflow/components/helpers" && \
|
||||
cp /tmp/memory.py "$SITE_PACKAGES/langflow/components/helpers/"
|
||||
|
||||
# Clear Python cache in the site-packages directory only
|
||||
RUN SITE_PACKAGES=$(cat /tmp/site_packages.txt) && \
|
||||
find "$SITE_PACKAGES" -name "*.pyc" -delete && \
|
||||
find "$SITE_PACKAGES" -name "__pycache__" -type d -exec rm -rf {} +
|
||||
|
||||
# Expose the default Langflow port
|
||||
EXPOSE 7860
|
||||
|
||||
# Command to run Langflow
|
||||
CMD ["python", "-m", "langflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
```
|
||||
|
||||
To use this custom Dockerfile, do the following:
|
||||
This example replaces the built-in **Message History** component, but the same pattern applies to any component or file.
|
||||
|
||||
1. Create a directory for your custom Langflow setup:
|
||||
|
||||
@ -195,16 +149,36 @@ To use this custom Dockerfile, do the following:
|
||||
mkdir langflow-custom && cd langflow-custom
|
||||
```
|
||||
|
||||
2. Create the necessary directory structure for your custom code.
|
||||
In this example, Langflow expects `memory.py` to exist in the `/helpers` directory, so you create a directory in that location.
|
||||
2. Create the directory structure that mirrors the component path:
|
||||
|
||||
```bash
|
||||
mkdir -p src/lfx/src/lfx/components/helpers
|
||||
mkdir -p src/lfx/src/lfx/components/models_and_agents
|
||||
```
|
||||
|
||||
3. Place your modified `memory.py` file in the `/helpers` directory.
|
||||
3. Place your modified `memory.py` file in that directory.
|
||||
|
||||
4. Create a new file named `Dockerfile` in your `langflow-custom` directory, and then copy the Dockerfile contents shown above into it.
|
||||
4. Create a `Dockerfile`:
|
||||
|
||||
```dockerfile
|
||||
FROM langflowai/langflow:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY src/lfx/src/lfx/components/models_and_agents/memory.py /tmp/memory.py
|
||||
|
||||
RUN python -c "import site; print(site.getsitepackages()[0])" > /tmp/site_packages.txt
|
||||
|
||||
RUN SITE_PACKAGES=$(cat /tmp/site_packages.txt) && \
|
||||
mkdir -p "$SITE_PACKAGES/lfx/components/models_and_agents" && \
|
||||
cp /tmp/memory.py "$SITE_PACKAGES/lfx/components/models_and_agents/"
|
||||
|
||||
RUN SITE_PACKAGES=$(cat /tmp/site_packages.txt) && \
|
||||
find "$SITE_PACKAGES" -name "*.pyc" -delete && \
|
||||
find "$SITE_PACKAGES" -name "__pycache__" -type d -exec rm -rf {} +
|
||||
|
||||
EXPOSE 7860
|
||||
CMD ["python", "-m", "langflow", "run", "--host", "0.0.0.0", "--port", "7860"]
|
||||
```
|
||||
|
||||
5. Build and run the image:
|
||||
|
||||
@ -213,7 +187,109 @@ In this example, Langflow expects `memory.py` to exist in the `/helpers` directo
|
||||
docker run -p 7860:7860 myuser/langflow-custom:1.0.0
|
||||
```
|
||||
|
||||
This approach can be adapted for any other components or custom code you want to add to Langflow by modifying the file paths and component names.
|
||||
|
||||
## Build and run the Docker image from source {#build-from-source}
|
||||
|
||||
:::tip
|
||||
Both `make docker_build` and `make lfx_docker_build` use Podman by default. If you have Docker installed instead, pass the alias `DOCKER=docker` on the command line:
|
||||
|
||||
```shell
|
||||
make docker_build DOCKER=docker
|
||||
```
|
||||
:::
|
||||
|
||||
|
||||
If you've cloned the Langflow repository and want to build and run your local changes inside a Docker container, run:
|
||||
|
||||
```shell
|
||||
make docker_build
|
||||
```
|
||||
|
||||
This builds `docker/build_and_push.Dockerfile` and tags the result `langflow:<version>`.
|
||||
|
||||
To run the image after building, run:
|
||||
|
||||
```shell
|
||||
docker run -p 7860:7860 langflow:<version>
|
||||
```
|
||||
|
||||
Replace `<version>` with the version in `pyproject.toml` at the repo root.
|
||||
|
||||
To build only the LFX executor CLI image instead of the full Langflow application, run:
|
||||
|
||||
```shell
|
||||
make lfx_docker_build
|
||||
```
|
||||
|
||||
This builds `src/lfx/docker/Dockerfile` and tags the result `lfx:latest`.
|
||||
It produces a lightweight Alpine-based image that contains only the `lfx` CLI tool, with no frontend or Langflow UI.
|
||||
|
||||
The build context is the repo root, not `src/lfx/`. The Dockerfile copies from `pyproject.toml`, `uv.lock`, `src/lfx/`, and `src/sdk/`, so the full workspace is sent to the daemon. A root `.dockerignore` file partially mitigates this, but the first build will be slower than you might expect for a small CLI image.
|
||||
|
||||
### Write a custom source-based Dockerfile
|
||||
|
||||
When writing a source-based Dockerfile, you must copy the manifest files (`pyproject.toml`, `README.md`, and `uv.lock` where present) for the workspace members that `uv sync` needs to resolve dependencies before source is available.
|
||||
The workspace members are defined in `[tool.uv.workspace]` in the root `pyproject.toml`.
|
||||
You do not need to copy manifests for members like `src/langflow-stepflow` that are not required for the initial dependency-only sync.
|
||||
The full source is copied later with `COPY ./src`, which brings those omitted members into the image before the second `uv sync`.
|
||||
|
||||
1. To copy all manifest files to your Dockerfile, include the following:
|
||||
|
||||
```dockerfile
|
||||
COPY ./uv.lock /app/uv.lock
|
||||
COPY ./README.md /app/README.md
|
||||
COPY ./pyproject.toml /app/pyproject.toml
|
||||
COPY ./src/backend/base/README.md /app/src/backend/base/README.md
|
||||
COPY ./src/backend/base/pyproject.toml /app/src/backend/base/pyproject.toml
|
||||
COPY ./src/lfx/README.md /app/src/lfx/README.md
|
||||
COPY ./src/lfx/pyproject.toml /app/src/lfx/pyproject.toml
|
||||
COPY ./src/sdk/README.md /app/src/sdk/README.md
|
||||
COPY ./src/sdk/pyproject.toml /app/src/sdk/pyproject.toml
|
||||
COPY ./src/bundles /app/src/bundles
|
||||
```
|
||||
|
||||
2. To install dependencies and copy the source, include the following:
|
||||
|
||||
```dockerfile
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --frozen --no-install-project --no-editable --extra postgresql --no-group dev
|
||||
|
||||
COPY ./src /app/src
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --frozen --no-editable --extra postgresql --no-group dev
|
||||
```
|
||||
|
||||
The first `uv sync` installs only dependencies before the source is copied, so that Docker can cache that layer. The second `uv sync` installs the project packages (`langflow`, `lfx`) from the copied source. Both calls are required. Omitting the second will produce a container with all dependencies present but the project packages missing, which fails at runtime.
|
||||
|
||||
For an example, see [`docker/build_and_push_with_extras.Dockerfile`](https://github.com/langflow-ai/langflow/blob/main/docker/build_and_push_with_extras.Dockerfile).
|
||||
|
||||
### Start a development environment with `make dcdev_up`
|
||||
|
||||
`make dcdev_up` starts a full development environment from source using [`docker/dev.docker-compose.yml`](https://github.com/langflow-ai/langflow/blob/main/docker/dev.docker-compose.yml).
|
||||
This is useful if you want to work on the Langflow codebase within a container.
|
||||
|
||||
To build the Langflow dcdev image, run:
|
||||
|
||||
```shell
|
||||
make dcdev_up
|
||||
```
|
||||
|
||||
Access the backend and Langflow UI at `http://localhost:7860/`.
|
||||
Access the frontend dev server at `http://localhost:3000/`.
|
||||
|
||||
The following environment variables are set by default:
|
||||
|
||||
| Variable | Default value | Description |
|
||||
|---|---|---|
|
||||
| `LANGFLOW_DATABASE_URL` | `postgresql://langflow:langflow@postgres:5432/langflow` | PostgreSQL connection string |
|
||||
| `LANGFLOW_SUPERUSER` | `langflow` | Initial admin username |
|
||||
| `LANGFLOW_SUPERUSER_PASSWORD` | `langflow` | Initial admin password |
|
||||
| `LANGFLOW_CONFIG_DIR` | `/var/lib/langflow` | Directory for Langflow config and data |
|
||||
|
||||
To override these values, edit `docker/dev.docker-compose.yml` directly.
|
||||
|
||||
`docker/dev.docker-compose.yml` uses literal values in its `environment:` block, such as `- LANGFLOW_SUPERUSER=langflow`. Docker Compose v2 gives `environment:` block literal values higher precedence than shell-exported variables and `env_file:`, so neither `export LANGFLOW_SUPERUSER=myadmin` or a `.env` file will override them. Edit the file directly instead.
|
||||
|
||||
## Upgrade the Langflow Docker image {#upgrade-the-langflow-docker-image}
|
||||
|
||||
@ -226,7 +302,7 @@ For example, this Docker Compose file uses a bind mount for Langflow data (`./la
|
||||
```yaml
|
||||
services:
|
||||
langflow:
|
||||
image: langflowai/langflow:1.8.0
|
||||
image: langflowai/langflow:1.11.0
|
||||
environment:
|
||||
- LANGFLOW_CONFIG_DIR=/app/langflow
|
||||
volumes:
|
||||
@ -243,11 +319,11 @@ For example, this Docker Compose file uses a bind mount for Langflow data (`./la
|
||||
langflow-postgres:
|
||||
```
|
||||
|
||||
For additional examples, see the [Docker Compose configuration](#clone) and the [docker_example compose file](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml).
|
||||
For additional examples, see the [Docker Compose configuration](#docker-compose) and the [docker_example compose file](https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml).
|
||||
|
||||
2. Pull the new image and update the image tag in your `docker-compose.yml` or `docker run` command.
|
||||
|
||||
With Docker Compose, set the image in your compose file, such as `image: langflowai/langflow:1.8.0`, and then pull:
|
||||
With Docker Compose, set the image in your compose file, such as `image: langflowai/langflow:1.11.0`, and then pull:
|
||||
|
||||
```bash
|
||||
docker compose pull
|
||||
@ -256,7 +332,7 @@ For example, this Docker Compose file uses a bind mount for Langflow data (`./la
|
||||
With `docker run`, pull the image:
|
||||
|
||||
```bash
|
||||
docker pull langflowai/langflow:1.8.0
|
||||
docker pull langflowai/langflow:1.11.0
|
||||
```
|
||||
|
||||
3. Restart the container. The same volumes will be reattached, so your database and flows are preserved.
|
||||
@ -270,7 +346,7 @@ For example, this Docker Compose file uses a bind mount for Langflow data (`./la
|
||||
With `docker run`, use the same volume mount and the new image tag:
|
||||
|
||||
```bash
|
||||
docker run -p 7860:7860 -v langflow-data:/app/langflow langflowai/langflow:1.8.0
|
||||
docker run -p 7860:7860 -v langflow-data:/app/langflow langflowai/langflow:1.11.0
|
||||
```
|
||||
|
||||
This approach keeps the persistent volumes separate from the Langflow container, so you can upgrade the Langflow application without losing data.
|
||||
@ -278,4 +354,4 @@ This approach keeps the persistent volumes separate from the Langflow container,
|
||||
If you need to upgrade to a custom image based on a Langflow release, such as to add `uv` in `1.8.0`, first build a derived image from the official image, and then follow the same steps above.
|
||||
Set the custom image in your compose file or `docker run`, and then pull and restart.
|
||||
|
||||
For a minimal Dockerfile that adds `uv` to the 1.8.0 image, see the [release notes](/release-notes) (“Docker image no longer includes uv or uvx”).
|
||||
For a minimal Dockerfile that adds `uv` to the 1.8.0 image, see the [release notes](/release-notes) ("Docker image no longer includes uv or uvx").
|
||||
@ -103,3 +103,16 @@ This jump can affect existing dependency pins in unexpected ways:
|
||||
| `lfx>=0.5` (no upper bound) | Upgrades automatically to 1.10.0 on the next install. |
|
||||
|
||||
Going forward, pin with `lfx~=1.10.0` so you receive compatible patches without silently crossing minor lines.
|
||||
|
||||
## Engine-only LFX and `lfx[bundles]`
|
||||
|
||||
`pip install lfx` installs the engine only — no component bundles.
|
||||
For headless or serverless deployments that execute flows using provider components without the full Langflow server, install the long-tail bundle package alongside the engine:
|
||||
|
||||
```bash
|
||||
uv pip install "lfx[bundles]"
|
||||
```
|
||||
|
||||
This is equivalent to installing `lfx` plus `lfx-bundles[all]`.
|
||||
For a slimmer image, install only the provider packages a deployment actually executes, for example `uv pip install lfx lfx-openai "lfx-bundles[qdrant]"`.
|
||||
There is intentionally no `lfx[all]` extra; `pip install langflow` remains the everything-included install.
|
||||
|
||||
@ -7,6 +7,12 @@ Langflow's default database is [SQLite](https://www.sqlite.org/docs.html), but y
|
||||
|
||||
This guide walks you through setting up an external database for Langflow by replacing the default SQLite connection string `sqlite:///./langflow.db` with PostgreSQL, both in local and containerized environments.
|
||||
|
||||
:::note SQLite paths should be absolute
|
||||
If you set `LANGFLOW_DATABASE_URL` to a SQLite connection string, use an **absolute** path, such as `sqlite:////absolute/path/to/langflow.db` (note the four leading slashes) or, on Windows, `sqlite:///C:/path/to/langflow.db`.
|
||||
|
||||
A relative path such as `sqlite:///./langflow.db` is resolved against the directory you start Langflow from, so launching from different directories points at different database files (your flows can appear to "disappear"), and a relative path that includes a subdirectory which doesn't yet exist fails at startup because SQLite does not create intermediate directories.
|
||||
:::
|
||||
|
||||
In this configuration, all structured application data from Langflow, including flows, message history, and logs, is instead managed by PostgreSQL.
|
||||
PostgreSQL is better suited for production environments due to its robust support for concurrent users, advanced data integrity features, and scalability.
|
||||
Langflow can more efficiently handle multiple users and larger workloads by using PostgreSQL as the database.
|
||||
|
||||
@ -129,3 +129,6 @@ The loader and validator both emit typed errors keyed by the manifest field that
|
||||
Run `lfx extension validate <path>` to see every error as a structured object with `code`, `message`, `location`, `hint`, and `ref_url`.
|
||||
|
||||
## See also
|
||||
|
||||
- [Bundle extensions overview](./extensions-overview)
|
||||
- [Build your first extension](./extensions-quickstart)
|
||||
|
||||
@ -6,26 +6,28 @@ slug: /extensions-overview
|
||||
import Icon from "@site/src/components/icon";
|
||||
|
||||
Langflow ships component bundles that are maintained and released separately from the core Langflow server as Extensions.
|
||||
Instead of every integration being built into `langflow`, each bundle is its own pip-installable package, such as `lfx-duckduckgo` or `lfx-arxiv`.
|
||||
Instead of every integration being built into `langflow`, bundles ship as pip-installable packages.
|
||||
|
||||
When you run `uv pip install langflow`, you install:
|
||||
There are two install stories:
|
||||
|
||||
* All Langflow core components
|
||||
* All bundles that ship as dependencies of the `langflow` metapackage
|
||||
* **`uv pip install langflow`** — everything, same as today. The `langflow` metapackage pins the component packages below as regular pip dependencies, so a flat install is functionally identical to earlier releases.
|
||||
* **`uv pip install lfx`** — the engine only, with no component bundles. Bring your own bundles: install `lfx-bundles`, individual `lfx-<provider>` packages, or your own extensions alongside it.
|
||||
|
||||
Some bundles that were previously included in `langflow` are moved into standalone packages.
|
||||
The `langflow` metapackage adds them as regular pip dependencies, so `pip install langflow` continues to include them.
|
||||
A component's identity is its **bundle name**, never the package it ships in.
|
||||
The canonical ID `ext:<bundle>:<Class>@official`, the palette grouping, and saved flows are identical whether a provider ships in the `lfx-bundles` metapackage or in its own standalone package, so providers can move between packages without affecting your flows.
|
||||
|
||||
## Current Extension bundles
|
||||
|
||||
The following Extension bundles are included with `uv pip install langflow`:
|
||||
The following component packages are included with `uv pip install langflow`:
|
||||
|
||||
| Package | Bundle | Components |
|
||||
|---------|--------|------------|
|
||||
| `lfx-arxiv` | [arXiv](/bundles-arxiv) | arXiv search |
|
||||
| `lfx-docling` | [Docling](/bundles-docling) | Document parsing and chunking |
|
||||
| `lfx-duckduckgo` | [DuckDuckGo](/bundles-duckduckgo) | Web search |
|
||||
| `lfx-ibm` | [IBM](/bundles-ibm) | IBM watsonx.ai LLM and embeddings, IBM Db2 Vector Store |
|
||||
| Package | Contents |
|
||||
|---------|----------|
|
||||
| `lfx-bundles` | The long tail of provider bundles (vector stores, model providers, search and tool integrations) as a single package. Each provider is one bundle, for example `tavily`, `qdrant`, or `ollama`. Per-provider pip extras carry the third-party SDKs, and the generated `lfx-bundles[all]` extra pulls all of them. |
|
||||
| `lfx-openai`, `lfx-anthropic`, `lfx-amazon`, `lfx-datastax`, `lfx-cohere` | Partner providers as standalone packages, each on its own release cadence. |
|
||||
| `lfx-arxiv` | [arXiv](/bundles-arxiv) search |
|
||||
| `lfx-docling` | [Docling](/bundles-docling) document parsing and chunking |
|
||||
| `lfx-duckduckgo` | [DuckDuckGo](/bundles-duckduckgo) web search |
|
||||
| `lfx-ibm` | [IBM](/bundles-ibm) watsonx.ai LLM and embeddings, IBM Db2 Vector Store |
|
||||
|
||||
The internal identifier for each component changes.
|
||||
For example, a DuckDuckGo component previously referenced as a `DuckDuckGoSearchComponent` class is now `ext:duckduckgo:DuckDuckGoSearchComponent@official`.
|
||||
@ -66,8 +68,49 @@ To see what extensions are currently loaded, run:
|
||||
lfx extension list
|
||||
```
|
||||
|
||||
:::note
|
||||
`lfx extension list` shows manifest-shipping extensions only.
|
||||
Manifest-less packages such as `lfx-bundles` are discovered and loaded at server startup but are not listed by this command.
|
||||
:::
|
||||
|
||||
## Legacy import paths and the shim error
|
||||
|
||||
Code that imports components by their old in-tree path, such as `from lfx.components.qdrant import QdrantVectorStoreComponent`, keeps working as long as the bundle that now ships the provider is installed — which `pip install langflow` always guarantees.
|
||||
A small import shim at the old location forwards to the bundle package.
|
||||
|
||||
On an engine-only install with no bundles, the same import raises an actionable error that names exactly what to install:
|
||||
|
||||
```text
|
||||
ModuleNotFoundError: The 'qdrant' components moved to the 'lfx-bundles' distribution.
|
||||
Install it with: pip install lfx-bundles (or 'pip install langflow', which bundles it).
|
||||
```
|
||||
|
||||
If you `pip install lfx` directly and your code depends on components, either switch to `lfx[bundles]` (see [LFX and Langflow version compatibility](/lfx-compatibility)) or pin the specific `lfx-<provider>` packages you use.
|
||||
The shims are a compatibility bridge and will be removed in a future major milestone; prefer the bundle packages' own import paths for new code.
|
||||
|
||||
## Override a bundled component
|
||||
|
||||
Want to replace a provider that ships in `lfx-bundles` with your own implementation? **Ship a manifest. A manifest always wins.**
|
||||
|
||||
Discovery resolves bundle-name collisions by source precedence: installed manifest-shipping extensions beat seed-directory extensions, which beat manifest-less bundle packages, which beat local development paths.
|
||||
Package your override as an extension with an `extension.json` that declares the same bundle name, and your copy shadows the bundled one — the server logs a typed `bundle-shadowed` warning naming both sources so the shadowing is visible.
|
||||
This works the same for first-party and third-party packages, and it is also why a provider can graduate from `lfx-bundles` to its own standalone package with no coordinated release.
|
||||
|
||||
## Version compatibility
|
||||
|
||||
`bundle_api_version` is the single compatibility number between bundles and the engine.
|
||||
Manifest-shipping extensions declare the contract versions they support with `lfx.compat: ["1"]`; the engine refuses to load an extension that does not list its current version.
|
||||
Manifest-less packages such as `lfx-bundles` carry no manifest, so their compatibility is enforced at install time by their `lfx>=X,<Y` dependency pin instead.
|
||||
|
||||
There is no version arithmetic across the `lfx`, `lfx-bundles`, and `lfx-<provider>` lines: each package releases on its own cadence, and the pip dependency ranges plus `lfx.compat` do the coordination.
|
||||
|
||||
## Build your own extension
|
||||
|
||||
If you have custom components that you want to distribute and version independently of your Langflow install, you can package them as an extension.
|
||||
|
||||
For more information, see [Build your first Langflow Extension](./extensions-quickstart.mdx).
|
||||
For more information, see [Build your first Langflow Extension](./extensions-quickstart.mdx).
|
||||
|
||||
## See also
|
||||
|
||||
- [Build your first extension](./extensions-quickstart)
|
||||
- [Manifest reference](./extensions-manifest)
|
||||
@ -107,3 +107,6 @@ The scaffold ships a working `Component` subclass that prints `"Hello, {name}!"`
|
||||
The bundle appears in the palette without further configuration.
|
||||
|
||||
## See also
|
||||
|
||||
- [Bundle extensions overview](./extensions-overview)
|
||||
- [Manifest reference](./extensions-manifest)
|
||||
|
||||
@ -46,211 +46,24 @@ To avoid the impact of potential breaking changes and test new versions, the Lan
|
||||
|
||||
If you made changes to your flows in the isolated installation, you might want to export and import those flows back to your upgraded primary installation so you don't have to repeat the component upgrade process.
|
||||
|
||||
## 1.10.x
|
||||
## 1.11.x
|
||||
|
||||
Highlights of this release include the following changes.
|
||||
For all changes, see the [Changelog](https://github.com/langflow-ai/langflow/releases).
|
||||
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- Upcoming breaking change: bundle separation
|
||||
|
||||
Langflow 1.10.x introduces the Extension bundles model.
|
||||
In future releases, bundle separation will extend to more component providers.
|
||||
|
||||
Saved flows will continue to open normally, but the following may require manual updates before upgrading:
|
||||
|
||||
- Code or scripts that reference component class names or `lfx.components.<provider>` import paths.
|
||||
- External tooling that reads component type identifiers from raw flow JSON.
|
||||
- Custom deployment scripts that install or pin individual component packages.
|
||||
|
||||
For more information, see [Langflow Extensions overview](../Develop/extensions-overview.mdx).
|
||||
|
||||
### New features and enhancements
|
||||
|
||||
- **Langflow Assistant**: build complete flows
|
||||
- NextPlaid multi-vector bundle
|
||||
|
||||
**Langflow Assistant** can now build entire flows, and not only individual components.
|
||||
The **NextPlaid** bundle adds two new components for ColBERT-style multi-vector retrieval.
|
||||
|
||||
For more information, see [Build flows and components with Langflow Assistant](/langflow-assistant).
|
||||
The **NextPlaid** vector store, backed by a running [NextPlaid](https://github.com/meetdoshi90/next-plaid) server, stores each document as a matrix of token embeddings, and the **vLLM Multivector Embeddings** component generates the token-level multi-vector embeddings required by NextPlaid.
|
||||
|
||||
- Redis-backed job queue for multi-worker deployments
|
||||
For more information, see [NextPlaid bundle](./bundles-nextplaid).
|
||||
|
||||
Langflow now supports a Redis-backed job queue that allows flow build events to be shared across multiple Gunicorn/Uvicorn workers and across multiple replicas behind a load balancer.
|
||||
## 1.10.x
|
||||
|
||||
Single-process deployments are unaffected. The default `asyncio` in-memory queue is unchanged.
|
||||
|
||||
For setup instructions and configuration details, see [Deploy Langflow with multiple workers](./deployment-multi-worker).
|
||||
|
||||
- Memory bases
|
||||
|
||||
Memory bases are per-flow vector stores that automatically ingest conversation messages.
|
||||
The **Memory Base** component retrieves context from the vector store, offering long-term semantic memory for flows.
|
||||
For more information, see [Manage memory bases](../Develop/memory-bases.mdx).
|
||||
|
||||
- Python 3.14 support
|
||||
|
||||
Langflow now supports Python 3.10 through 3.14 on macOS, Linux, and Windows.
|
||||
The Langflow Docker images now use Python 3.14.
|
||||
|
||||
<details>
|
||||
<summary>Optional integrations not yet available on Python 3.14</summary>
|
||||
|
||||
The following optional integrations are excluded from installs on Python 3.14:
|
||||
|
||||
- [IBM watsonx](/bundles-ibm)
|
||||
- [IBM watsonx Orchestrate](/deployment-wxo)
|
||||
- [ALTK](/bundles-altk)
|
||||
- [CUGA](/bundles-cuga)
|
||||
- [LangWatch](/integrations-langwatch)
|
||||
- [Pinecone](/bundles-pinecone)
|
||||
- OpenDsStar
|
||||
|
||||
</details>
|
||||
|
||||
- **Agent** component: structured response output
|
||||
|
||||
The **Agent** component now includes a **Structured Response** (`structured_response`) output that returns the agent's reply as structured data according to an **Output Schema** you define.
|
||||
|
||||
For more information, see [Agent component output](/agents#agent-component-output).
|
||||
|
||||
- **Agent** component: default system prompt
|
||||
|
||||
The **Agent** component now uses a structured default system prompt that includes the current date and the active model name.
|
||||
Existing flows are not affected.
|
||||
|
||||
For more information, see [Agent instructions and input](/agents#agent-instructions-and-input).
|
||||
|
||||
- Extension bundles
|
||||
|
||||
Langflow 1.10 introduces Extension bundles: component providers that are packaged and versioned as standalone pip packages, independent of the core Langflow server.
|
||||
All bundles are still included in `uv pip install langflow`, so nothing changes for existing users.
|
||||
|
||||
The following Extension bundles ship with Langflow 1.10:
|
||||
|
||||
| Package | Bundle | Components |
|
||||
|---------|--------|------------|
|
||||
| `lfx-arxiv` | [arXiv](/bundles-arxiv) | arXiv search |
|
||||
| `lfx-docling` | [Docling](/bundles-docling) | Document parsing and chunking |
|
||||
| `lfx-duckduckgo` | [DuckDuckGo](/bundles-duckduckgo) | Web search |
|
||||
| `lfx-ibm` | [IBM](/bundles-ibm) | IBM watsonx.ai LLM and embeddings, IBM Db2 Vector Store |
|
||||
|
||||
To view all Extension bundles currently loaded in your environment:
|
||||
|
||||
```bash
|
||||
lfx extension list
|
||||
```
|
||||
|
||||
If a bundle is not installed, its components are absent from the canvas.
|
||||
To install a missing bundle, install its standalone package and restart Langflow:
|
||||
|
||||
```bash
|
||||
uv pip install lfx-duckduckgo
|
||||
uv run langflow run
|
||||
```
|
||||
|
||||
Components in Extension bundles use a namespaced identifier instead of a bare class name.
|
||||
For example, `DuckDuckGoSearchComponent` is now identified as:
|
||||
|
||||
```text
|
||||
ext:duckduckgo:DuckDuckGoSearchComponent@official
|
||||
```
|
||||
|
||||
You can see this identifier in the raw JSON of any saved flow that uses the component.
|
||||
Langflow migrates saved flow references to the new format automatically when you open a flow.
|
||||
|
||||
For more information, see [Langflow Extensions overview](../Develop/extensions-overview.mdx).
|
||||
|
||||
- File System component
|
||||
|
||||
The **File System** component gives agents sandboxed read/write access to files on disk.
|
||||
An optional **Read Only** mode restricts the agent to read and search operations only.
|
||||
|
||||
For more information, see [File System](../Components/file-system.mdx).
|
||||
|
||||
- Unified **Knowledge Base** component
|
||||
|
||||
The **Knowledge Ingestion** and **Knowledge Base** (legacy) components are merged into a single **Knowledge Base** component with a **Mode** selector.
|
||||
|
||||
Existing flows that use the legacy components continue to work.
|
||||
|
||||
For more information, see the [**Knowledge Base** component](/knowledge-base) and [Manage vector data](/knowledge).
|
||||
|
||||
- Database connectors for knowledge bases
|
||||
|
||||
Knowledge bases now support configurable vector database backends through **DB Providers** configured in **Settings → DB Providers**.
|
||||
Available providers include [Chroma (default)](https://docs.trychroma.com/), [Chroma Cloud](https://docs.trychroma.com/cloud/getting-started), and [OpenSearch](https://docs.opensearch.org/latest/about/).
|
||||
|
||||
For more information, see [Manage vector data](/knowledge).
|
||||
|
||||
- MCP server management lock
|
||||
|
||||
Set `LANGFLOW_MCP_SERVERS_LOCKED=true` to prevent non-superusers from adding, editing, or removing MCP server connections.
|
||||
|
||||
For more information, see [Restrict MCP server management to superusers](/mcp-server#restrict-mcp-server-management).
|
||||
|
||||
- Embedded mode UI flags
|
||||
|
||||
Set `LANGFLOW_EMBEDDED_MODE=true` to hide standalone UI elements when embedding the Langflow visual editor in another application.
|
||||
|
||||
These flags control UI visibility only. They do not block the underlying API endpoints.
|
||||
|
||||
For more information, see [Embedded mode](/environment-variables#embedded-mode).
|
||||
|
||||
- Custom component admin-only restriction
|
||||
|
||||
Set `LANGFLOW_CUSTOM_COMPONENT_ADMIN_ONLY=true` to restrict custom component creation and code editing to superusers.
|
||||
|
||||
For more information, see [Restrict custom component creation to superusers](/deployment-block-custom-components#restrict-custom-components-to-superusers).
|
||||
|
||||
- macOS support matrix
|
||||
|
||||
A new [macOS support](./macos-support-matrix.mdx) page documents feature availability across Apple Silicon and Intel Macs.
|
||||
|
||||
- IBM Db2 Vector Store component
|
||||
|
||||
The **IBM Db2 Vector Store** component is now available in the [IBM bundle](/bundles-ibm).
|
||||
|
||||
For more information, see [IBM Db2 Vector Store](/bundles-ibm#ibm-db2-vector-store).
|
||||
|
||||
- Internationalization
|
||||
|
||||
The Langflow interface is now available in multiple languages.
|
||||
To change the display language, click your **Profile Picture**, select **Settings**, and then select a language from the **Language** dropdown.
|
||||
|
||||
Available languages include English, French (Français), Spanish (Español), German (Deutsch), Portuguese (Português), Japanese (日本語), and Chinese (中文).
|
||||
|
||||
- Login endpoint rate limiting
|
||||
|
||||
Langflow now applies IP-based rate limiting to the `/login` endpoint to protect against brute-force attacks.
|
||||
|
||||
For more information, see [Login rate limiting](/api-keys-and-authentication#login-rate-limiting).
|
||||
|
||||
- Code Agents bundle (beta)
|
||||
|
||||
The **Code Agents** bundle adds new beta agent components for code generation with the `smolagents` and `OpenDsStar` libraries.
|
||||
|
||||
For more information, see [Code Agents bundle](./bundles-codeagents).
|
||||
|
||||
- File Processing bundle (beta)
|
||||
|
||||
The **File Processing** bundle adds components for ingesting and retrieving file content in agent workflows.
|
||||
|
||||
For more information, see [File Processing bundle](./bundles-files-ingestion).
|
||||
|
||||
### Deprecations
|
||||
|
||||
- **Text Input** and **Text Output** components are legacy
|
||||
|
||||
The **Text Input** and **Text Output** components are now legacy and may be removed in a future release.
|
||||
Replace them with the [**Chat Input** and **Chat Output** components](/chat-input-and-output).
|
||||
|
||||
- Voice mode is removed
|
||||
|
||||
The <Icon name="Mic" aria-hidden="true"/> **Microphone** button in the **Playground** now only enables speech-to-text, with no additional voice mode functionality.
|
||||
The bi-directional `/v1/voice/ws/flow_as_tool/{flow_id}` voice-to-voice endpoints are deprecated.
|
||||
For more information, see [Use voice mode](/concepts-voice-mode).
|
||||
For 1.10.x release notes, see the [1.10.x documentation](https://docs.langflow.org/1.10.0/release-notes).
|
||||
|
||||
## 1.9.x
|
||||
|
||||
|
||||
@ -2,9 +2,10 @@
|
||||
// Note: type annotations allow type checking and IDEs autocompletion
|
||||
|
||||
const path = require("path");
|
||||
const lightCodeTheme = require("prism-react-renderer/themes/github");
|
||||
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
|
||||
const { remarkCodeHike } = require("@code-hike/mdx");
|
||||
|
||||
|
||||
const { lightNeonPrismTheme, grafiteNeonTheme } = require("./src/prismThemes");
|
||||
|
||||
const rehypeWbrUnderscore = require("./src/plugins/rehypeWbrUnderscore");
|
||||
|
||||
const isProduction = process.env.NODE_ENV === "production";
|
||||
@ -131,16 +132,6 @@ const config = {
|
||||
path: "1.8.0",
|
||||
},
|
||||
},
|
||||
beforeDefaultRemarkPlugins: [
|
||||
[
|
||||
remarkCodeHike,
|
||||
{
|
||||
theme: "github-dark",
|
||||
showCopyButton: true,
|
||||
lineNumbers: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
rehypePlugins: [rehypeWbrUnderscore],
|
||||
},
|
||||
sitemap: {
|
||||
@ -156,10 +147,7 @@ const config = {
|
||||
},
|
||||
blog: false,
|
||||
theme: {
|
||||
customCss: [
|
||||
require.resolve("@code-hike/mdx/styles.css"),
|
||||
require.resolve("./css/custom.css"),
|
||||
],
|
||||
customCss: [require.resolve("./css/custom.css")],
|
||||
},
|
||||
}),
|
||||
],
|
||||
@ -183,7 +171,51 @@ const config = {
|
||||
},
|
||||
],
|
||||
theme: {
|
||||
primaryColor: "#7528FC",
|
||||
primaryColor: "#F471B5",
|
||||
options: {
|
||||
disableSearch: true,
|
||||
},
|
||||
theme: {
|
||||
sidebar: {
|
||||
backgroundColor: "transparent",
|
||||
},
|
||||
colors: {
|
||||
// Badge backgrounds carry white text — all pass WCAG AA (4.5:1)
|
||||
http: {
|
||||
get: "#1e6ff5",
|
||||
post: "#0c875e",
|
||||
put: "#a56a07",
|
||||
delete: "#eb1616",
|
||||
patch: "#8655f6",
|
||||
head: "#6265f1",
|
||||
options: "#6b7280",
|
||||
},
|
||||
// Response chips (2xx green / 4xx-5xx red) — darkened from Redoc
|
||||
// defaults (#1d8127 / #d41f1c) to pass 4.5:1 on their tinted bg
|
||||
success: {
|
||||
main: "#186a20",
|
||||
},
|
||||
error: {
|
||||
main: "#ce1e1b",
|
||||
},
|
||||
},
|
||||
schema: {
|
||||
linesColor: "#F471B5",
|
||||
requireLabelColor: "#F471B5",
|
||||
},
|
||||
rightPanel: {
|
||||
backgroundColor: "#00000000", // transparent — "transparent" not accepted by Redoc theme parser
|
||||
textColor: "#c6c6d1",
|
||||
},
|
||||
typography: {
|
||||
code: {
|
||||
color: "#F471B5",
|
||||
},
|
||||
},
|
||||
codeBlock: {
|
||||
backgroundColor: "#161618",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
@ -445,7 +477,11 @@ const config = {
|
||||
};
|
||||
},
|
||||
],
|
||||
clientModules: [require.resolve("./src/clientModules/tocProgress.js")],
|
||||
clientModules: [
|
||||
require.resolve("./src/clientModules/tocProgress.js"),
|
||||
require.resolve("./src/clientModules/redocA11y.js"),
|
||||
require.resolve("./src/clientModules/codeBlockA11y.js"),
|
||||
],
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
@ -514,8 +550,9 @@ const config = {
|
||||
respectPrefersColorScheme: true,
|
||||
},
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
theme: lightNeonPrismTheme,
|
||||
darkTheme: grafiteNeonTheme,
|
||||
additionalLanguages: ["bash", "docker", "nginx", "powershell", "batch"],
|
||||
},
|
||||
zoom: {
|
||||
selector: ".markdown :not(a) > img:not(.no-zoom)",
|
||||
|
||||
@ -1523,6 +1523,27 @@ The agent resolves these tokens with the **existing** MCP tools `get_flow_compon
|
||||
|
||||
---
|
||||
|
||||
### ADR-032: Live-Only Providers (IBM WatsonX) Usable in the Assistant
|
||||
|
||||
**Status**: Accepted
|
||||
|
||||
#### Context
|
||||
With WatsonX configured (9 live models visible in the model-providers modal), the assistant still showed "No Model Provider Configured", and after that was fixed, selecting any WatsonX model failed with `400 "model <id> not found"`. Two distinct defects compounded, both specific to a *live-only* provider whose entire static catalog is deprecated (only WatsonX today):
|
||||
|
||||
1. **Listing**: `list_models` computed each provider's `is_enabled`/`is_configured` *before* `replace_with_live_models`. WatsonX is absent from the non-deprecated static catalog, so it is only **appended** by the live replacement — after the status loop had already run. The appended entry carried no `is_enabled`, and the assistant panel (`useEnabledModels` → `.filter(p => p.is_enabled)`) dropped it.
|
||||
2. **Routing**: `build_model_config` (and `TranslationFlow._build_model_config`) read the non-existent metadata key `model_name_param` from `get_provider_param_mapping`, which only emits `model_param`. It silently defaulted to `"model"`. For WatsonX this set `ChatWatsonx.model` instead of `.model_id`, which routes through the OpenAI-compatible **AI Gateway** (foundation-model ids not provisioned → `400 "model not found"`) instead of the native `ModelInference` foundation-models API. OpenAI/Anthropic were unaffected because their `model_param` is already `"model"`.
|
||||
|
||||
#### Decision
|
||||
1. Run `replace_with_live_models` **before** computing `is_configured`/`is_enabled` so live-appended providers receive status like any other.
|
||||
2. Read `model_param` (not `model_name_param`) when building the assistant/translation model config, matching the canonical `unified_models/model_catalog.py` path, so WatsonX is instantiated with `model_id` and routes through `ModelInference`.
|
||||
|
||||
#### Key Files
|
||||
- `src/backend/.../api/v1/models.py` — `list_models` ordering (status after live replacement)
|
||||
- `src/backend/.../agentic/flows/model_config.py` — `build_model_config` reads `model_param`
|
||||
- `src/backend/.../agentic/flows/translation_flow.py` — `_build_model_config` reads `model_param`
|
||||
|
||||
---
|
||||
|
||||
## 6. Technical Specification
|
||||
|
||||
### 6.1 Dependencies
|
||||
|
||||
@ -21,7 +21,12 @@ from langflow.main import create_app
|
||||
|
||||
|
||||
def _clean_descriptions(spec: dict[str, Any]) -> None:
|
||||
"""Convert newlines in operation descriptions to <br> for better ReDoc rendering."""
|
||||
"""Strip trailing whitespace from operation descriptions.
|
||||
|
||||
Previously this converted newlines to <br>, but that broke Markdown rendering
|
||||
in Redoc because mixing HTML tags with Markdown headings (### ...) prevents
|
||||
CommonMark from parsing the headings. Descriptions are left as plain Markdown.
|
||||
"""
|
||||
paths = spec.get("paths") or {}
|
||||
for path_item in paths.values():
|
||||
if not isinstance(path_item, dict):
|
||||
@ -31,7 +36,7 @@ def _clean_descriptions(spec: dict[str, Any]) -> None:
|
||||
continue
|
||||
description = operation.get("description")
|
||||
if isinstance(description, str) and description:
|
||||
operation["description"] = description.replace("\n", "<br>")
|
||||
operation["description"] = description.strip()
|
||||
|
||||
|
||||
def _collect_and_rewrite_defs(node: Any, collected: dict[str, Any]) -> None:
|
||||
|
||||
857
docs/package-lock.json
generated
857
docs/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,6 @@
|
||||
"docs:version": "docusaurus docs:version"
|
||||
},
|
||||
"dependencies": {
|
||||
"@code-hike/mdx": "^0.9.0",
|
||||
"@docusaurus/core": "3.9.2",
|
||||
"@docusaurus/plugin-client-redirects": "^3.9.2",
|
||||
"@docusaurus/plugin-google-tag-manager": "^3.9.2",
|
||||
@ -25,17 +24,18 @@
|
||||
"docusaurus-plugin-image-zoom": "^2.0.0",
|
||||
"lucide-react": "^0.460.0",
|
||||
"prism-react-renderer": "^1.3.5",
|
||||
"raw-loader": "^4.0.2",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-player": "^2.10.1",
|
||||
"raw-loader": "^4.0.2",
|
||||
"redocusaurus": "^2.5.0",
|
||||
"redocusaurus": "2.5.0",
|
||||
"rimraf": "^4.1.2",
|
||||
"tailwindcss": "^3.4.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@docusaurus/module-type-aliases": "^3.9.2",
|
||||
"@tsconfig/docusaurus": "^2.0.3",
|
||||
"accessibility-checker": "^4.0.26",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"browserslist": {
|
||||
|
||||
39
docs/scripts/a11y-ci.sh
Executable file
39
docs/scripts/a11y-ci.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/usr/bin/env bash
|
||||
# Serve the built docs and run the IBM Equal Access checker (npx achecker)
|
||||
# over representative pages. Fails on any "violation" (see aceconfig.js).
|
||||
# Used by CI for the light and dark theme scans; run it locally with:
|
||||
# npm run build && ./scripts/a11y-ci.sh
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
PORT="${A11Y_PORT:-3400}"
|
||||
PAGES=("/" "/get-started-quickstart" "/api-request" "/api")
|
||||
|
||||
npm run serve -- --port "$PORT" --no-open >/dev/null 2>&1 &
|
||||
SERVE_PID=$!
|
||||
trap 'kill "$SERVE_PID" 2>/dev/null || true' EXIT
|
||||
|
||||
for _ in $(seq 1 60); do
|
||||
curl -fs "http://localhost:$PORT/" >/dev/null 2>&1 && break
|
||||
sleep 1
|
||||
done
|
||||
|
||||
status=0
|
||||
for page in "${PAGES[@]}"; do
|
||||
url="http://localhost:$PORT$page"
|
||||
echo "::group::achecker $url"
|
||||
if ! npx achecker "$url"; then
|
||||
# One retry absorbs rare timing flakes from Redoc's lazy rendering;
|
||||
# a real violation fails both attempts.
|
||||
echo "Scan failed for $url — retrying once"
|
||||
if ! npx achecker "$url"; then
|
||||
status=1
|
||||
fi
|
||||
fi
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
if [ $status -ne 0 ]; then
|
||||
echo "::warning::Accessibility violations found — see scan output above."
|
||||
fi
|
||||
exit 0
|
||||
@ -470,12 +470,14 @@ module.exports = {
|
||||
"Components/bundles-milvus",
|
||||
"Components/bundles-mistralai",
|
||||
"Components/bundles-mongodb",
|
||||
"Components/bundles-nextplaid",
|
||||
"Components/bundles-notion",
|
||||
"Components/bundles-novita",
|
||||
"Components/bundles-nvidia",
|
||||
"Components/bundles-ollama",
|
||||
"Components/bundles-openai",
|
||||
"Components/bundles-openrouter",
|
||||
"Components/bundles-oracle",
|
||||
"Components/bundles-perplexity",
|
||||
"Components/bundles-pgvector",
|
||||
"Components/bundles-pinecone",
|
||||
|
||||
54
docs/src/clientModules/codeBlockA11y.js
Normal file
54
docs/src/clientModules/codeBlockA11y.js
Normal file
@ -0,0 +1,54 @@
|
||||
// Docusaurus renders code blocks as <pre tabindex="0"> unconditionally.
|
||||
// IBM Equal Access (element_tabbable_role_valid) exempts tabbable elements
|
||||
// only when they actually scroll — a non-scrollable <pre> with tabindex fails.
|
||||
// Scrollable blocks get the scrollable-region pattern (role + unique name);
|
||||
// non-scrollable blocks lose the needless tabindex.
|
||||
|
||||
function updateCodeBlocks() {
|
||||
const pres = document.querySelectorAll("pre.prism-code");
|
||||
let index = 0;
|
||||
for (const pre of pres) {
|
||||
index += 1;
|
||||
const scrollable =
|
||||
pre.scrollWidth > pre.clientWidth || pre.scrollHeight > pre.clientHeight;
|
||||
if (scrollable) {
|
||||
pre.setAttribute("tabindex", "0");
|
||||
pre.setAttribute("role", "region");
|
||||
pre.setAttribute("aria-label", `Code sample ${index}`);
|
||||
} else {
|
||||
pre.removeAttribute("tabindex");
|
||||
pre.removeAttribute("role");
|
||||
pre.removeAttribute("aria-label");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let observer;
|
||||
let resizeTimer;
|
||||
|
||||
export function onRouteDidUpdate() {
|
||||
if (typeof document === "undefined") {
|
||||
return;
|
||||
}
|
||||
updateCodeBlocks();
|
||||
if (!observer) {
|
||||
observer = new MutationObserver(updateCodeBlocks);
|
||||
// childList: re-rendered code blocks arrive without the attributes.
|
||||
// attributeFilter "hidden": Docusaurus tabs toggle panels via the hidden
|
||||
// attribute (no childList mutation) — a scrollable block inside an
|
||||
// initially hidden tab measures scrollWidth 0 and loses its tabindex, so
|
||||
// it must be re-evaluated when its tab becomes visible. The patched
|
||||
// attributes (tabindex/role/aria-label) are not observed — no feedback loop.
|
||||
observer.observe(document.body, {
|
||||
childList: true,
|
||||
subtree: true,
|
||||
attributes: true,
|
||||
attributeFilter: ["hidden"],
|
||||
});
|
||||
// Scrollability is viewport-dependent — re-evaluate on resize.
|
||||
window.addEventListener("resize", () => {
|
||||
clearTimeout(resizeTimer);
|
||||
resizeTimer = setTimeout(updateCodeBlocks, 250);
|
||||
});
|
||||
}
|
||||
}
|
||||
142
docs/src/clientModules/redocA11y.js
Normal file
142
docs/src/clientModules/redocA11y.js
Normal file
@ -0,0 +1,142 @@
|
||||
// Accessibility patches for Redocusaurus pages.
|
||||
//
|
||||
// 1. Landmarks: Redoc renders its layout without <main>/<nav>, failing IBM
|
||||
// Equal Access "aria_content_in_landmark" for every element on the page.
|
||||
// 2. Dark-theme response chip colors: success/error colors come from a single
|
||||
// Redoc theme (no per-color-mode option), so values tuned to pass WCAG AA
|
||||
// on light backgrounds fail on dark. Status is only distinguishable by
|
||||
// computed color (styled-components class hashes are unstable), so we
|
||||
// patch inline colors when the dark theme is active and undo on light.
|
||||
//
|
||||
// Tested against redocusaurus@2.5.0 / Redoc v2.x DOM.
|
||||
|
||||
// config colors.success.main / colors.error.main → dark-accessible variants
|
||||
const DARK_COLOR_PATCHES = new Map([
|
||||
["rgb(24, 106, 32)", "#22952d"], // success green #186a20
|
||||
["rgb(206, 30, 27)", "#e74745"], // error red #ce1e1b
|
||||
]);
|
||||
|
||||
const patched = [];
|
||||
let observersStarted = false;
|
||||
|
||||
function applyLandmarks() {
|
||||
const redoc = document.querySelector(".redocusaurus");
|
||||
if (!redoc) {
|
||||
return false;
|
||||
}
|
||||
const api = redoc.querySelector(".api-content");
|
||||
const menu = redoc.querySelector(".menu-content");
|
||||
if (!api && !menu) {
|
||||
return false;
|
||||
}
|
||||
if (api && !api.getAttribute("role")) {
|
||||
api.setAttribute("role", "main");
|
||||
}
|
||||
if (menu && !menu.getAttribute("role")) {
|
||||
menu.setAttribute("role", "navigation");
|
||||
menu.setAttribute("aria-label", "API endpoints");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function patchDarkChipColors() {
|
||||
while (patched.length) {
|
||||
patched.pop().style.removeProperty("color");
|
||||
}
|
||||
if (document.documentElement.getAttribute("data-theme") !== "dark") {
|
||||
return;
|
||||
}
|
||||
const root = document.querySelector(".redocusaurus .api-content");
|
||||
if (!root) {
|
||||
return;
|
||||
}
|
||||
// Response chips render the status color on <strong> (code) and <p> (text);
|
||||
// selected status tabs use the same colors on <li>.
|
||||
for (const el of root.querySelectorAll("strong, p, li[data-rttab]")) {
|
||||
const fix = DARK_COLOR_PATCHES.get(getComputedStyle(el).color);
|
||||
if (fix) {
|
||||
el.style.setProperty("color", fix, "important");
|
||||
patched.push(el);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function patchRedocSemantics() {
|
||||
const redoc = document.querySelector(".redocusaurus");
|
||||
if (!redoc) {
|
||||
return;
|
||||
}
|
||||
// Decorative chevrons/arrows — Redoc ships them with no accessible name.
|
||||
for (const svg of redoc.querySelectorAll(
|
||||
"svg:not([aria-hidden]):not([aria-label]):not([role])"
|
||||
)) {
|
||||
svg.setAttribute("aria-hidden", "true");
|
||||
}
|
||||
// Content-type dropdowns render as bare <select> elements.
|
||||
for (const select of redoc.querySelectorAll(
|
||||
"select.dropdown-select:not([aria-label])"
|
||||
)) {
|
||||
select.setAttribute("aria-label", "Content type");
|
||||
}
|
||||
// Redoc lays out schema fields as 2-column <table>s (name | description)
|
||||
// with no <th> anywhere — they are layout tables, so take them out of
|
||||
// table semantics; content still reads in DOM order (name, description).
|
||||
// role="rowheader" on the name <td> is NOT valid ARIA inside a native table.
|
||||
for (const table of redoc.querySelectorAll("table:not([role])")) {
|
||||
if (!table.querySelector("th")) {
|
||||
table.setAttribute("role", "presentation");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function runPatches() {
|
||||
patchDarkChipColors();
|
||||
patchRedocSemantics();
|
||||
}
|
||||
|
||||
export function onRouteDidUpdate({ location }) {
|
||||
// Only Redoc routes (/api, /api/workflow) — a bare startsWith("/api")
|
||||
// would also match regular docs pages like /api-request or /api-keys
|
||||
// and leak a body observer per navigation (Redoc never renders there).
|
||||
const isRedocPage =
|
||||
location.pathname === "/api" || location.pathname.startsWith("/api/");
|
||||
if (typeof document === "undefined" || !isRedocPage) {
|
||||
return;
|
||||
}
|
||||
// Redoc is server-side rendered, so this usually succeeds immediately;
|
||||
// fall back to observing until hydration creates the containers.
|
||||
if (!applyLandmarks()) {
|
||||
const observer = new MutationObserver(() => {
|
||||
if (applyLandmarks()) {
|
||||
observer.disconnect();
|
||||
}
|
||||
});
|
||||
observer.observe(document.body, { childList: true, subtree: true });
|
||||
}
|
||||
|
||||
runPatches();
|
||||
if (!observersStarted) {
|
||||
observersStarted = true;
|
||||
// Re-patch when the user toggles the color mode.
|
||||
new MutationObserver(patchDarkChipColors).observe(document.documentElement, {
|
||||
attributes: true,
|
||||
attributeFilter: ["data-theme"],
|
||||
});
|
||||
// Redoc lazy-renders operations on scroll/expand — re-patch on changes.
|
||||
// Semantics patches are cheap/idempotent: run on the next frame so late
|
||||
// renders are covered immediately; the (heavier) color patch is debounced.
|
||||
let timer;
|
||||
let frameQueued = false;
|
||||
new MutationObserver(() => {
|
||||
if (!frameQueued) {
|
||||
frameQueued = true;
|
||||
window.requestAnimationFrame(() => {
|
||||
frameQueued = false;
|
||||
patchRedocSemantics();
|
||||
});
|
||||
}
|
||||
clearTimeout(timer);
|
||||
timer = setTimeout(runPatches, 300);
|
||||
}).observe(document.body, { childList: true, subtree: true });
|
||||
}
|
||||
}
|
||||
@ -1,168 +0,0 @@
|
||||
import React, { useMemo, useState, useEffect } from "react";
|
||||
import { highlight, preload, type LighterResult, type Token } from "@code-hike/lighter";
|
||||
|
||||
const CODE_HIKE_THEME = "github-dark";
|
||||
|
||||
/** Same theme vars Code Hike uses for github-dark so existing CH CSS applies */
|
||||
const CH_THEME_VARS: React.CSSProperties = {
|
||||
["--ch-t-background" as string]: "#0d1117",
|
||||
["--ch-t-foreground" as string]: "#c9d1d9",
|
||||
["--ch-t-colorScheme" as string]: "dark",
|
||||
["--ch-t-editorLineNumber-foreground" as string]: "#8b949e",
|
||||
["--ch-t-editor-selectionBackground" as string]: "#264f78",
|
||||
};
|
||||
|
||||
type CodeSnippetProps = {
|
||||
/** Raw file content (e.g. from !!raw-loader!...) */
|
||||
source: string;
|
||||
/** Start line (1-based, inclusive). Defaults to full file. */
|
||||
startLine?: number;
|
||||
/** End line (1-based, inclusive). Defaults to full file. */
|
||||
endLine?: number;
|
||||
language: string;
|
||||
title?: string;
|
||||
showLineNumbers?: boolean;
|
||||
};
|
||||
|
||||
function copyToClipboard(text: string): void {
|
||||
if (typeof navigator !== "undefined" && navigator.clipboard?.writeText) {
|
||||
navigator.clipboard.writeText(text);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders a slice of a file as a code block using the same highlighter and
|
||||
* styling as Code Hike (Markdown ``` blocks), so line-range pulls match the
|
||||
* rest of the docs.
|
||||
*/
|
||||
export default function CodeSnippet({
|
||||
source,
|
||||
startLine: requestedStartLine,
|
||||
endLine: requestedEndLine,
|
||||
language,
|
||||
title,
|
||||
showLineNumbers = true,
|
||||
}: CodeSnippetProps): React.ReactElement {
|
||||
const { slice, startLine, endLine } = useMemo(() => {
|
||||
const lines = source.split("\n");
|
||||
const startLine = Math.max(1, requestedStartLine ?? 1);
|
||||
const endLine = Math.max(startLine, requestedEndLine ?? lines.length);
|
||||
const slice = lines.slice(startLine - 1, endLine).join("\n");
|
||||
return { slice, startLine, endLine };
|
||||
}, [source, requestedStartLine, requestedEndLine]);
|
||||
|
||||
const [highlighted, setHighlighted] = useState<LighterResult | null>(null);
|
||||
useEffect(() => {
|
||||
let cancelled = false;
|
||||
preload([language as Parameters<typeof preload>[0][number]], CODE_HIKE_THEME)
|
||||
.then(() => highlight(slice, language as Parameters<typeof highlight>[1], CODE_HIKE_THEME))
|
||||
.then((result) => {
|
||||
if (!cancelled) setHighlighted(result);
|
||||
})
|
||||
.catch(() => {
|
||||
if (!cancelled) setHighlighted(null);
|
||||
});
|
||||
return () => {
|
||||
cancelled = true;
|
||||
};
|
||||
}, [slice, language]);
|
||||
|
||||
const [copied, setCopied] = React.useState(false);
|
||||
const onCopy = (): void => {
|
||||
copyToClipboard(slice);
|
||||
setCopied(true);
|
||||
setTimeout(() => setCopied(false), 1200);
|
||||
};
|
||||
|
||||
const lineNumberWidth = showLineNumbers ? String(endLine).length : 0;
|
||||
|
||||
return (
|
||||
<div
|
||||
className="ch-codeblock"
|
||||
style={{
|
||||
marginTop: "1.25em",
|
||||
marginBottom: "1.25em",
|
||||
borderRadius: 6,
|
||||
overflow: "hidden",
|
||||
boxShadow: "0 13px 27px -5px rgba(50,50,93,0.25), 0 8px 16px -8px rgba(0,0,0,0.3)",
|
||||
...CH_THEME_VARS,
|
||||
}}
|
||||
>
|
||||
{title && (
|
||||
<div
|
||||
className="ch-frame-title-bar"
|
||||
style={{
|
||||
padding: "0.75rem 1rem",
|
||||
borderBottom: "1px solid #30363d",
|
||||
background: "#161b22",
|
||||
color: "#c9d1d9",
|
||||
}}
|
||||
>
|
||||
<div className="ch-frame-middle-bar">{title}</div>
|
||||
</div>
|
||||
)}
|
||||
<div className="ch-code-wrapper" data-ch-measured="true" style={CH_THEME_VARS}>
|
||||
<code className="ch-code-scroll-parent" data-ch-lang={language} style={{ display: "block", padding: "1rem" }}>
|
||||
{highlighted ? (
|
||||
(highlighted.lines as Token[][]).map((lineTokens, i) => (
|
||||
<React.Fragment key={i}>
|
||||
{showLineNumbers && (
|
||||
<span
|
||||
className="ch-code-line-number"
|
||||
style={{ width: `${lineNumberWidth}ch`, marginRight: "1.5ch", display: "inline-block", textAlign: "right" }}
|
||||
>
|
||||
{startLine + i}
|
||||
</span>
|
||||
)}
|
||||
{lineTokens.map((token, j) => (
|
||||
<span
|
||||
key={j}
|
||||
style={{
|
||||
color: token.style?.color ?? undefined,
|
||||
fontStyle: token.style?.fontStyle ?? undefined,
|
||||
fontWeight: token.style?.fontWeight ?? undefined,
|
||||
}}
|
||||
>
|
||||
{token.content}
|
||||
</span>
|
||||
))}
|
||||
{"\n"}
|
||||
</React.Fragment>
|
||||
))
|
||||
) : (
|
||||
slice.split("\n").map((line, i) => (
|
||||
<React.Fragment key={i}>
|
||||
{showLineNumbers && (
|
||||
<span
|
||||
className="ch-code-line-number"
|
||||
style={{ width: `${lineNumberWidth}ch`, marginRight: "1.5ch", display: "inline-block", textAlign: "right" }}
|
||||
>
|
||||
{startLine + i}
|
||||
</span>
|
||||
)}
|
||||
{line}
|
||||
{"\n"}
|
||||
</React.Fragment>
|
||||
))
|
||||
)}
|
||||
</code>
|
||||
<button
|
||||
type="button"
|
||||
title="Copy code"
|
||||
className="ch-code-button"
|
||||
onClick={onCopy}
|
||||
>
|
||||
{copied ? (
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" width="1.1em" height="1.1em">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
|
||||
</svg>
|
||||
) : (
|
||||
<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" width="1.1em" height="1.1em">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth="1.6" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />
|
||||
</svg>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@ -32,3 +32,15 @@
|
||||
.label {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
.kbd {
|
||||
font-family: inherit;
|
||||
font-size: 90%;
|
||||
font-weight: var(--ifm-font-weight-normal);
|
||||
line-height: 1;
|
||||
padding: 0.1rem 0.3rem;
|
||||
border-radius: 3px;
|
||||
border: 1px solid var(--ifm-color-secondary-dark);
|
||||
background-color: var(--ifm-color-emphasis-100);
|
||||
color: var(--ifm-color-emphasis-700);
|
||||
}
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useCallback, useState } from "react";
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
import { Copy as CopyIcon, Check as CheckIcon } from "lucide-react";
|
||||
import styles from "./CopyPageButton.module.css";
|
||||
|
||||
@ -136,10 +136,18 @@ async function copyCurrentPageAsMarkdown(): Promise<boolean> {
|
||||
return true;
|
||||
}
|
||||
|
||||
function isEditableElement(el: Element | null): boolean {
|
||||
if (!el) return false;
|
||||
const tag = el.tagName.toLowerCase();
|
||||
if (tag === "input" || tag === "textarea" || tag === "select") return true;
|
||||
return (el as HTMLElement).isContentEditable;
|
||||
}
|
||||
|
||||
export function CopyPageButton(): JSX.Element | null {
|
||||
const [copied, setCopied] = useState(false);
|
||||
const [isMac, setIsMac] = useState(true);
|
||||
|
||||
const handleClick = useCallback(async () => {
|
||||
const handleCopy = useCallback(async () => {
|
||||
const ok = await copyCurrentPageAsMarkdown();
|
||||
if (ok) {
|
||||
setCopied(true);
|
||||
@ -147,9 +155,51 @@ export function CopyPageButton(): JSX.Element | null {
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const platform =
|
||||
(navigator as { userAgentData?: { platform?: string } }).userAgentData
|
||||
?.platform ?? navigator.platform;
|
||||
setIsMac(/Mac|iPhone|iPad|iPod/i.test(platform));
|
||||
|
||||
const onKeyDown = (event: KeyboardEvent) => {
|
||||
// Option/Alt+C copies the whole page as Markdown. Unlike Cmd/Ctrl+C,
|
||||
// this never shadows the native copy gesture or clobbers the clipboard
|
||||
// on a reflexive copy with a collapsed selection.
|
||||
// event.code is required here: on macOS, Option+C produces
|
||||
// event.key === "ç", and key-based checks also break on non-Latin
|
||||
// layouts.
|
||||
const isCopyShortcut =
|
||||
event.altKey &&
|
||||
!event.metaKey &&
|
||||
!event.ctrlKey &&
|
||||
!event.shiftKey &&
|
||||
event.code === "KeyC";
|
||||
if (!isCopyShortcut) return;
|
||||
if (event.repeat) return;
|
||||
|
||||
// Don't fire while typing in a form field, where Option+C may insert a
|
||||
// character (e.g. "ç" on macOS).
|
||||
if (isEditableElement(document.activeElement)) return;
|
||||
|
||||
event.preventDefault();
|
||||
void handleCopy();
|
||||
};
|
||||
|
||||
window.addEventListener("keydown", onKeyDown);
|
||||
return () => window.removeEventListener("keydown", onKeyDown);
|
||||
}, [handleCopy]);
|
||||
|
||||
const shortcutLabel = isMac ? "⌥C" : "Alt+C";
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<button type="button" onClick={handleClick} className={styles.button}>
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleCopy}
|
||||
className={styles.button}
|
||||
title={`Copy page as Markdown (${shortcutLabel})`}
|
||||
aria-keyshortcuts="Alt+C"
|
||||
>
|
||||
<span aria-hidden="true" className={styles.icon}>
|
||||
{copied ? (
|
||||
<CheckIcon size={12} strokeWidth={2} />
|
||||
@ -158,6 +208,9 @@ export function CopyPageButton(): JSX.Element | null {
|
||||
)}
|
||||
</span>
|
||||
<span className={styles.label}>{copied ? "Copied!" : "Copy page"}</span>
|
||||
<kbd aria-hidden="true" className={styles.kbd}>
|
||||
{shortcutLabel}
|
||||
</kbd>
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
|
||||
65
docs/src/components/PageFeedback.module.css
Normal file
65
docs/src/components/PageFeedback.module.css
Normal file
@ -0,0 +1,65 @@
|
||||
.root {
|
||||
margin-top: 2.5rem;
|
||||
padding-top: 1.5rem;
|
||||
border-top: 1px solid var(--ifm-color-emphasis-200);
|
||||
}
|
||||
|
||||
.title {
|
||||
margin: 0 0 0.75rem 0;
|
||||
font-size: 0.9375rem;
|
||||
font-weight: var(--ifm-font-weight-semibold);
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.button {
|
||||
min-width: 5.25rem;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.button,
|
||||
.supportLink {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 0.4rem;
|
||||
padding: 0.375rem 0.75rem;
|
||||
border: 1px solid var(--ifm-color-emphasis-300);
|
||||
border-radius: var(--ifm-button-border-radius, 0.375rem);
|
||||
background-color: var(--ifm-background-surface-color);
|
||||
color: var(--ifm-font-color-base);
|
||||
font-family: inherit;
|
||||
font-size: 0.8125rem;
|
||||
font-weight: var(--ifm-font-weight-semibold);
|
||||
line-height: 1;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
transition:
|
||||
background-color 0.15s ease,
|
||||
border-color 0.15s ease;
|
||||
}
|
||||
|
||||
.button:hover,
|
||||
.supportLink:hover {
|
||||
background-color: var(--ifm-color-emphasis-100);
|
||||
border-color: var(--ifm-color-emphasis-400);
|
||||
color: var(--ifm-font-color-base);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.thanks {
|
||||
margin: 0;
|
||||
font-size: 0.875rem;
|
||||
color: var(--ifm-color-emphasis-700);
|
||||
}
|
||||
131
docs/src/components/PageFeedback.tsx
Normal file
131
docs/src/components/PageFeedback.tsx
Normal file
@ -0,0 +1,131 @@
|
||||
import React, { useEffect, useState } from "react";
|
||||
import Link from "@docusaurus/Link";
|
||||
import { useLocation } from "@docusaurus/router";
|
||||
import useBaseUrl from "@docusaurus/useBaseUrl";
|
||||
import {
|
||||
ThumbsUp as ThumbsUpIcon,
|
||||
ThumbsDown as ThumbsDownIcon,
|
||||
LifeBuoy as LifeBuoyIcon,
|
||||
} from "lucide-react";
|
||||
import {
|
||||
identifyUser,
|
||||
trackEvent,
|
||||
} from "@site/src/plugins/segment/analytics-helpers";
|
||||
import styles from "./PageFeedback.module.css";
|
||||
|
||||
type Feedback = "good" | "bad";
|
||||
|
||||
const GITHUB_REPO = "https://github.com/langflow-ai/langflow";
|
||||
|
||||
function buildIssueUrl(pageUrl: string): string {
|
||||
const title = `[DOCS] Feedback on ${pageUrl}`;
|
||||
const body = [
|
||||
`**Page:** ${pageUrl}`,
|
||||
"",
|
||||
"**What can we improve on this page?**",
|
||||
"",
|
||||
].join("\n");
|
||||
const params = new URLSearchParams({
|
||||
title,
|
||||
body,
|
||||
labels: "documentation",
|
||||
});
|
||||
return `${GITHUB_REPO}/issues/new?${params.toString()}`;
|
||||
}
|
||||
|
||||
export function PageFeedback(): JSX.Element {
|
||||
const { pathname } = useLocation();
|
||||
const supportUrl = useBaseUrl("/contributing-github-issues");
|
||||
const [feedback, setFeedback] = useState<Feedback | null>(null);
|
||||
|
||||
// Reset when navigating to another doc page.
|
||||
useEffect(() => {
|
||||
setFeedback(null);
|
||||
}, [pathname]);
|
||||
|
||||
const submitFeedback = (value: Feedback) => {
|
||||
setFeedback(value);
|
||||
// Dedicated event (instead of the generic data-attribute "UI Interaction")
|
||||
// so feedback can be queried directly by the `helpful` boolean.
|
||||
identifyUser();
|
||||
trackEvent("Docs Feedback", {
|
||||
helpful: value === "good",
|
||||
action: "clicked",
|
||||
channel: "docs",
|
||||
elementId: `page-feedback-${value}`,
|
||||
namespace: "doc-footer",
|
||||
platformTitle: "Langflow",
|
||||
});
|
||||
};
|
||||
|
||||
const pageUrl =
|
||||
typeof window !== "undefined"
|
||||
? window.location.href
|
||||
: `https://docs.langflow.org${pathname}`;
|
||||
|
||||
return (
|
||||
<div className={styles.root}>
|
||||
<p className={styles.title}>Was this page helpful?</p>
|
||||
<div className={styles.row}>
|
||||
<div className={styles.buttons}>
|
||||
{feedback === null ? (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.button}
|
||||
onClick={() => submitFeedback("good")}
|
||||
>
|
||||
<ThumbsUpIcon size={14} strokeWidth={2} aria-hidden="true" />
|
||||
<span>Good</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.button}
|
||||
onClick={() => submitFeedback("bad")}
|
||||
>
|
||||
<ThumbsDownIcon size={14} strokeWidth={2} aria-hidden="true" />
|
||||
<span>Bad</span>
|
||||
</button>
|
||||
</>
|
||||
) : (
|
||||
<p className={styles.thanks} role="status">
|
||||
Thanks for your feedback!{" "}
|
||||
{feedback === "bad" && (
|
||||
<>
|
||||
Help us improve this page by{" "}
|
||||
<a
|
||||
href={buildIssueUrl(pageUrl)}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
data-event="UI Interaction"
|
||||
data-action="clicked"
|
||||
data-channel="docs"
|
||||
data-element-id="page-feedback-github-issue"
|
||||
data-namespace="doc-footer"
|
||||
data-platform-title="Langflow"
|
||||
>
|
||||
opening a GitHub issue
|
||||
</a>
|
||||
.
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<Link
|
||||
to={supportUrl}
|
||||
className={styles.supportLink}
|
||||
data-event="UI Interaction"
|
||||
data-action="clicked"
|
||||
data-channel="docs"
|
||||
data-element-id="page-feedback-support"
|
||||
data-namespace="doc-footer"
|
||||
data-platform-title="Langflow"
|
||||
>
|
||||
<LifeBuoyIcon size={14} strokeWidth={2} aria-hidden="true" />
|
||||
<span>Support</span>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
45
docs/src/prismThemes.js
Normal file
45
docs/src/prismThemes.js
Normal file
@ -0,0 +1,45 @@
|
||||
// Prism syntax highlighting themes for code blocks (see docusaurus.config.js).
|
||||
// All colors pass WCAG AA (4.5:1) against their backgrounds — validated with
|
||||
// the IBM Equal Access checker (see scripts/a11y-ci.sh).
|
||||
|
||||
// Light theme ("light neon")
|
||||
const lightNeonPrismTheme = {
|
||||
plain: {
|
||||
color: "#64748b",
|
||||
backgroundColor: "#f9f9fd",
|
||||
},
|
||||
styles: [
|
||||
{ types: ["comment"], style: { color: "#607491", fontStyle: "italic" } },
|
||||
{ types: ["string", "attr-value"], style: { color: "#04835c" } },
|
||||
{ types: ["number"], style: { color: "#c74b0a" } },
|
||||
{ types: ["boolean", "constant"], style: { color: "#ae5f05" } },
|
||||
{ types: ["keyword-import", "imports", "module"], style: { color: "#7c3aed" } },
|
||||
{ types: ["keyword", "tag"], style: { color: "#077d9a" } },
|
||||
{ types: ["builtin", "class-name", "function", "attr-name", "property"], style: { color: "#d82474" } },
|
||||
{ types: ["decorator"], style: { color: "#be185d" } },
|
||||
{ types: ["operator", "punctuation"], style: { color: "#64748b" } },
|
||||
{ types: ["variable"], style: { color: "#64748b" } },
|
||||
],
|
||||
};
|
||||
|
||||
// Dark theme ("Grafite Neon")
|
||||
const grafiteNeonTheme = {
|
||||
plain: {
|
||||
color: "#c8ccd4",
|
||||
backgroundColor: "#18181a",
|
||||
},
|
||||
styles: [
|
||||
{ types: ["comment"], style: { color: "#798197", fontStyle: "italic" } },
|
||||
{ types: ["string", "attr-value", "template-string"], style: { color: "#51d0a5" } },
|
||||
{ types: ["number"], style: { color: "#ff9b7d" } },
|
||||
{ types: ["boolean", "constant"], style: { color: "#f7c93e" } },
|
||||
{ types: ["keyword-import", "imports", "module"], style: { color: "#c792ea" } },
|
||||
{ types: ["keyword", "tag"], style: { color: "#31d1e9" } },
|
||||
{ types: ["builtin", "class-name", "function", "attr-name", "property"], style: { color: "#ed86bf" } },
|
||||
{ types: ["decorator"], style: { color: "#e45287" } },
|
||||
{ types: ["operator", "punctuation"], style: { color: "#c8ccd4" } },
|
||||
{ types: ["variable"], style: { color: "#c8ccd4" } },
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = { lightNeonPrismTheme, grafiteNeonTheme };
|
||||
@ -12,6 +12,7 @@ import DocItemContent from "@theme/DocItem/Content";
|
||||
import DocBreadcrumbs from "@theme/DocBreadcrumbs";
|
||||
import ContentVisibility from "@theme/ContentVisibility";
|
||||
import { CopyPageButton } from "@site/src/components/CopyPageButton";
|
||||
import { PageFeedback } from "@site/src/components/PageFeedback";
|
||||
import styles from "./styles.module.css";
|
||||
|
||||
// Copied from default theme and extended to insert a "Copy page" button
|
||||
@ -50,6 +51,7 @@ export default function DocItemLayout({ children }) {
|
||||
</div>
|
||||
{docTOC.mobile}
|
||||
<DocItemContent>{children}</DocItemContent>
|
||||
<PageFeedback />
|
||||
<DocItemFooter />
|
||||
</article>
|
||||
<DocItemPaginator />
|
||||
|
||||
30
docs/src/theme/TabItem/index.tsx
Normal file
30
docs/src/theme/TabItem/index.tsx
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Swizzled (ejected) from @docusaurus/theme-classic 3.9.2.
|
||||
* Change: add aria-label from the tab's label/value so the tabpanel has a
|
||||
* programmatically associated name (IBM Equal Access "aria_widget_labelled").
|
||||
*/
|
||||
|
||||
import React, { type ReactNode } from "react";
|
||||
import clsx from "clsx";
|
||||
import type { Props } from "@theme/TabItem";
|
||||
|
||||
import styles from "./styles.module.css";
|
||||
|
||||
export default function TabItem({
|
||||
children,
|
||||
hidden,
|
||||
className,
|
||||
label,
|
||||
value,
|
||||
}: Props): ReactNode {
|
||||
return (
|
||||
<div
|
||||
role="tabpanel"
|
||||
aria-label={label ?? value}
|
||||
className={clsx(styles.tabItem, className)}
|
||||
{...{ hidden }}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
7
docs/src/theme/TabItem/styles.module.css
Normal file
7
docs/src/theme/TabItem/styles.module.css
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Swizzled (ejected) from @docusaurus/theme-classic 3.9.2 — unchanged.
|
||||
*/
|
||||
|
||||
.tabItem > *:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
52
docs/src/theme/prism-include-languages.js
Normal file
52
docs/src/theme/prism-include-languages.js
Normal file
@ -0,0 +1,52 @@
|
||||
import siteConfig from "@generated/docusaurus.config";
|
||||
|
||||
export default function prismIncludeLanguages(Prism) {
|
||||
const { additionalLanguages } = siteConfig.themeConfig.prism;
|
||||
|
||||
const PrismBefore = globalThis.Prism;
|
||||
globalThis.Prism = Prism;
|
||||
|
||||
additionalLanguages.forEach((lang) => {
|
||||
if (lang === "php") {
|
||||
require("prismjs/components/prism-markup-templating.js");
|
||||
}
|
||||
require(`prismjs/components/prism-${lang}`);
|
||||
});
|
||||
|
||||
delete globalThis.Prism;
|
||||
if (typeof PrismBefore !== "undefined") {
|
||||
globalThis.Prism = PrismBefore;
|
||||
}
|
||||
|
||||
// Give Python `import` and `from` their own token type so they can be
|
||||
// styled separately from other keywords (def, class, if, etc.).
|
||||
if (Prism.languages.python) {
|
||||
Prism.languages.insertBefore("python", "keyword", {
|
||||
"keyword-import": { pattern: /\b(?:import|from)\b/ },
|
||||
});
|
||||
}
|
||||
|
||||
if (Prism.languages.batch) {
|
||||
Prism.languages.cmd = Prism.languages.batch;
|
||||
}
|
||||
|
||||
// Add modern package managers, runtimes, and common CLI tools to bash/shell highlighting.
|
||||
if (Prism.languages.bash) {
|
||||
Prism.languages.insertBefore("bash", "function", {
|
||||
"bash-plain": {
|
||||
pattern: /(^|[\s;|&])(?:install|remove|update|build|init|exec|push|pull|clone|apply|deploy)(?=$|[\s;|&])/,
|
||||
lookbehind: true,
|
||||
},
|
||||
"function-modern": {
|
||||
pattern: /(^|[\s;|&]|[<>]\()(?:uv|uvx|pip|pip3|python|python3|node|npm|npx|pnpm|bun|bunx|deno|cargo|go|rustup|brew|docker|kubectl|helm|terraform|poetry|pdm|rye|make|curl|wget|git|cp|mv|rm|mkdir|touch|cat|grep|sed|awk|jq|xargs)(?=$|[)\s;|&])/,
|
||||
lookbehind: true,
|
||||
alias: "keyword",
|
||||
},
|
||||
"flag": {
|
||||
pattern: /(^|\s)--?[a-zA-Z][\w-]*/,
|
||||
lookbehind: true,
|
||||
alias: "keyword",
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
title: Build endpoints
|
||||
slug: /api-build
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiBuildBuildFlowAndStreamEvents from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-build/build-flow-and-stream-events.sh';
|
||||
import resultApiBuildResultBuildFlowAndStreamEvents from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-build/result-build-flow-and-stream-events.json';
|
||||
import exampleApiBuildBuildFlowAndStreamEvents2 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-build/build-flow-and-stream-events-2.sh';
|
||||
@ -47,17 +47,17 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildBuildFlowAndStreamEvents} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildBuildFlowAndStreamEvents} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildBuildFlowAndStreamEvents} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -65,7 +65,7 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiBuildResultBuildFlowAndStreamEvents} language="json" />
|
||||
<CodeBlock language="json">{resultApiBuildResultBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -74,17 +74,17 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildBuildFlowAndStreamEvents2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildBuildFlowAndStreamEvents2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildBuildFlowAndStreamEvents2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -92,7 +92,7 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiBuildResultBuildFlowAndStreamEvents2} language="json" />
|
||||
<CodeBlock language="json">{resultApiBuildResultBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -102,17 +102,17 @@ To disable streaming and get all events at once, set `?stream=false`.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildBuildFlowAndStreamEvents3} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildBuildFlowAndStreamEvents3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildBuildFlowAndStreamEvents3} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildBuildFlowAndStreamEvents3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildBuildFlowAndStreamEvents3} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildBuildFlowAndStreamEvents3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -146,17 +146,17 @@ The following example stops flow execution at an **OpenAI** component:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildSetStartAndStopPoints} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildSetStartAndStopPoints}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildSetStartAndStopPoints} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildSetStartAndStopPoints}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildSetStartAndStopPoints} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildSetStartAndStopPoints}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -169,17 +169,17 @@ This is useful for running flows without having to pass custom values through th
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildOverrideFlowParameters} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildOverrideFlowParameters} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildOverrideFlowParameters} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -187,7 +187,7 @@ This is useful for running flows without having to pass custom values through th
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiBuildResultOverrideFlowParameters} language="json" />
|
||||
<CodeBlock language="json">{resultApiBuildResultOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Files endpoints
|
||||
slug: /api-files
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiFilesUploadFileV1 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-files/upload-file-v1.sh';
|
||||
import resultApiFilesResultUploadFileV1 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-files/result-upload-file-v1.json';
|
||||
import exampleApiFilesUploadImageFilesV1 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-files/upload-image-files-v1.sh';
|
||||
@ -96,17 +96,17 @@ Replace **FILE_NAME** with the uploaded file name.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadFileV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadFileV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadFileV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -117,7 +117,7 @@ Not all file types are supported.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultUploadFileV1} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultUploadFileV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -133,17 +133,17 @@ To change this limit, set the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment varia
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadImageFilesV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadImageFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadImageFilesV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadImageFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadImageFilesV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadImageFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -166,17 +166,17 @@ To change this limit, set the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment varia
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadImageFilesV12} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadImageFilesV12}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadImageFilesV12} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadImageFilesV12}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadImageFilesV12} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadImageFilesV12}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -193,17 +193,17 @@ List all files associated with a specific flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesListFilesV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesListFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesListFilesV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesListFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesListFilesV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesListFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -211,7 +211,7 @@ List all files associated with a specific flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultListFilesV1} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultListFilesV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -222,17 +222,17 @@ Download a specific file from a flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDownloadFileV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDownloadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDownloadFileV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDownloadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDownloadFileV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDownloadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -240,7 +240,7 @@ Download a specific file from a flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDownloadFileV1} language="text" />
|
||||
<CodeBlock language="text">{resultApiFilesResultDownloadFileV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -251,17 +251,17 @@ Delete a specific file from a flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDeleteFileV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDeleteFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDeleteFileV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDeleteFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDeleteFileV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDeleteFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -269,7 +269,7 @@ Delete a specific file from a flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDeleteFileV1} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultDeleteFileV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -291,17 +291,17 @@ The file is uploaded in the format `USER_ID/FILE_ID.FILE_EXTENSION`, such as `07
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadFileV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadFileV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadFileV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -309,7 +309,7 @@ The file is uploaded in the format `USER_ID/FILE_ID.FILE_EXTENSION`, such as `07
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultUploadFileV2} language="text" />
|
||||
<CodeBlock language="text">{resultApiFilesResultUploadFileV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -319,17 +319,17 @@ You must include the ampersand (`@`) in the request to instruct curl to upload t
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadFileV22} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadFileV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadFileV22} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadFileV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadFileV22} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadFileV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -366,17 +366,17 @@ The default file limit is 1024 MB. To configure this value, change the `LANGFLOW
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesSendFilesToYourFlowsV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesSendFilesToYourFlowsV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesSendFilesToYourFlowsV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesSendFilesToYourFlowsV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesSendFilesToYourFlowsV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesSendFilesToYourFlowsV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -401,17 +401,17 @@ This component loads files into flows from your local machine or Langflow file m
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesSendFilesToYourFlowsV22} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesSendFilesToYourFlowsV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesSendFilesToYourFlowsV22} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesSendFilesToYourFlowsV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesSendFilesToYourFlowsV22} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesSendFilesToYourFlowsV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -427,17 +427,17 @@ List all files associated with your user account.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesListFilesV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesListFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesListFilesV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesListFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesListFilesV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesListFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -445,7 +445,7 @@ List all files associated with your user account.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultListFilesV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultListFilesV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -458,17 +458,17 @@ You must specify the file type you expect in the `--output` value.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDownloadFileV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDownloadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDownloadFileV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDownloadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDownloadFileV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDownloadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -476,7 +476,7 @@ You must specify the file type you expect in the `--output` value.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDownloadFileV2} language="text" />
|
||||
<CodeBlock language="text">{resultApiFilesResultDownloadFileV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -487,17 +487,17 @@ Change a file name.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesEditFileNameV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesEditFileNameV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesEditFileNameV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesEditFileNameV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesEditFileNameV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesEditFileNameV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -505,7 +505,7 @@ Change a file name.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultEditFileNameV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultEditFileNameV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -516,17 +516,17 @@ Delete a specific file by its ID.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDeleteFileV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDeleteFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDeleteFileV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDeleteFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDeleteFileV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDeleteFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -534,7 +534,7 @@ Delete a specific file by its ID.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDeleteFileV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultDeleteFileV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -545,17 +545,17 @@ Delete all files associated with your user account.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDeleteAllFilesV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDeleteAllFilesV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDeleteAllFilesV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -563,7 +563,7 @@ Delete all files associated with your user account.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDeleteAllFilesV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Flow trigger endpoints
|
||||
slug: /api-flows-run
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiFlowsRunRunFlow from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows-run/run-flow.sh';
|
||||
import exampleApiFlowsRunStreamLlmTokenResponses from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows-run/stream-llm-token-responses.sh';
|
||||
import exampleApiFlowsRunRequestExampleWithAllHeadersAndParameters from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows-run/request-example-with-all-headers-and-parameters.sh';
|
||||
@ -46,17 +46,17 @@ This flow requires a chat input string (`input_value`), and uses default values
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunRunFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunRunFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunRunFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -113,17 +113,17 @@ To stream LLM token responses, append the `?stream=true` query parameter to the
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunStreamLlmTokenResponses} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunStreamLlmTokenResponses}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunStreamLlmTokenResponses} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunStreamLlmTokenResponses}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunStreamLlmTokenResponses} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunStreamLlmTokenResponses}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -186,17 +186,17 @@ The following example is truncated to illustrate a series of `token` events as w
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunRequestExampleWithAllHeadersAndParameters} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunRequestExampleWithAllHeadersAndParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunRequestExampleWithAllHeadersAndParameters} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunRequestExampleWithAllHeadersAndParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunRequestExampleWithAllHeadersAndParameters} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunRequestExampleWithAllHeadersAndParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -214,17 +214,17 @@ You don't need to create these variables in Langflow's Global Variables section
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunPassGlobalVariablesInRequestHeaders} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunPassGlobalVariablesInRequestHeaders}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunPassGlobalVariablesInRequestHeaders} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunPassGlobalVariablesInRequestHeaders}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunPassGlobalVariablesInRequestHeaders} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunPassGlobalVariablesInRequestHeaders}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -244,17 +244,17 @@ For more information, see [Trigger flows with webhooks](/webhook).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunWebhookRunFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunWebhookRunFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunWebhookRunFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -262,7 +262,7 @@ For more information, see [Trigger flows with webhooks](/webhook).
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsRunResultWebhookRunFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsRunResultWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Flow management endpoints
|
||||
slug: /api-flows
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiFlowsCreateFlow from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows/create-flow.sh';
|
||||
import resultApiFlowsResultCreateFlow from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows/result-create-flow.json';
|
||||
import exampleApiFlowsCreateFlows from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows/create-flows.sh';
|
||||
@ -54,17 +54,17 @@ Creates a new flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsCreateFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsCreateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsCreateFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsCreateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsCreateFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsCreateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -72,7 +72,7 @@ Creates a new flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultCreateFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultCreateFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -83,17 +83,17 @@ Creates multiple new flows, returning an array of flow objects.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsCreateFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsCreateFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsCreateFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsCreateFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsCreateFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsCreateFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -105,17 +105,17 @@ Retrieves a specific flow by its ID.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -123,7 +123,7 @@ Retrieves a specific flow by its ID.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultReadFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultReadFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -136,17 +136,17 @@ Retrieve all flows with pagination:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -156,17 +156,17 @@ To retrieve flows from a specific project, use the `project_id` query parameter:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadFlows2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadFlows2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadFlows2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadFlows2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadFlows2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadFlows2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -178,17 +178,17 @@ Retrieves a list of sample flows:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadSampleFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadSampleFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadSampleFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadSampleFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadSampleFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadSampleFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -202,17 +202,17 @@ This example changes the value for `endpoint_name` from a random UUID to `my_new
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsUpdateFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsUpdateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsUpdateFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsUpdateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsUpdateFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsUpdateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -220,7 +220,7 @@ This example changes the value for `endpoint_name` from a random UUID to `my_new
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultUpdateFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultUpdateFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -231,17 +231,17 @@ Deletes a specific flow by its ID.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsDeleteFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsDeleteFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsDeleteFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsDeleteFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsDeleteFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsDeleteFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -249,7 +249,7 @@ Deletes a specific flow by its ID.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultDeleteFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultDeleteFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -262,17 +262,17 @@ This endpoint downloads a ZIP file containing [Langflow JSON files](/concepts-fl
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsExportFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsExportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsExportFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsExportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsExportFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsExportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -280,7 +280,7 @@ This endpoint downloads a ZIP file containing [Langflow JSON files](/concepts-fl
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultExportFlows} language="text" />
|
||||
<CodeBlock language="text">{resultApiFlowsResultExportFlows}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -296,17 +296,17 @@ This example uploads a local file named `agent-with-astra-db-tool.json` to a fol
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsImportFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsImportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsImportFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsImportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsImportFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsImportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Logs endpoints
|
||||
slug: /api-logs
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiLogsStreamLogs from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-logs/stream-logs.sh';
|
||||
import resultApiLogsResultStreamLogs from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-logs/result-stream-logs.txt';
|
||||
import exampleApiLogsRetrieveLogsWithOptionalParameters from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-logs/retrieve-logs-with-optional-parameters.sh';
|
||||
@ -37,17 +37,17 @@ Stream logs in real-time using Server Sent Events (SSE):
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiLogsStreamLogs} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiLogsStreamLogs}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiLogsStreamLogs} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiLogsStreamLogs}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiLogsStreamLogs} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiLogsStreamLogs}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -55,7 +55,7 @@ Stream logs in real-time using Server Sent Events (SSE):
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiLogsResultStreamLogs} language="text" />
|
||||
<CodeBlock language="text">{resultApiLogsResultStreamLogs}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -73,17 +73,17 @@ With default values, the endpoint returns the last 10 lines of logs.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiLogsRetrieveLogsWithOptionalParameters} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiLogsRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiLogsRetrieveLogsWithOptionalParameters} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiLogsRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiLogsRetrieveLogsWithOptionalParameters} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiLogsRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -91,6 +91,6 @@ With default values, the endpoint returns the last 10 lines of logs.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiLogsResultRetrieveLogsWithOptionalParameters} language="text" />
|
||||
<CodeBlock language="text">{resultApiLogsResultRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Monitor endpoints
|
||||
slug: /api-monitor
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiMonitorGetVertexBuilds from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-monitor/get-vertex-builds.sh';
|
||||
import resultApiMonitorResultGetVertexBuilds from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-monitor/result-get-vertex-builds.json';
|
||||
import exampleApiMonitorDeleteVertexBuilds from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-monitor/delete-vertex-builds.sh';
|
||||
@ -73,17 +73,17 @@ Retrieve Vertex builds for a specific flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetVertexBuilds} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetVertexBuilds} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetVertexBuilds} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -91,7 +91,7 @@ Retrieve Vertex builds for a specific flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultGetVertexBuilds} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -102,17 +102,17 @@ Delete Vertex builds for a specific flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorDeleteVertexBuilds} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorDeleteVertexBuilds} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorDeleteVertexBuilds} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -120,7 +120,7 @@ Delete Vertex builds for a specific flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultDeleteVertexBuilds} language="text" />
|
||||
<CodeBlock language="text">{resultApiMonitorResultDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -136,17 +136,17 @@ Retrieve a list of all messages:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetMessages} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetMessages} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetMessages} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -160,17 +160,17 @@ This example retrieves messages sent by `Machine` and `AI` in a given chat sessi
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetMessages2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetMessages2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetMessages2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetMessages2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetMessages2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetMessages2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -178,7 +178,7 @@ This example retrieves messages sent by `Machine` and `AI` in a given chat sessi
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultGetMessages2} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultGetMessages2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -191,17 +191,17 @@ This example deletes the message retrieved in the previous `GET /messages` examp
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorDeleteMessages} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorDeleteMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorDeleteMessages} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorDeleteMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorDeleteMessages} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorDeleteMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -209,7 +209,7 @@ This example deletes the message retrieved in the previous `GET /messages` examp
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultDeleteMessages} language="text" />
|
||||
<CodeBlock language="text">{resultApiMonitorResultDeleteMessages}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -222,17 +222,17 @@ This example updates the `text` value of message `3ab66cc6-c048-48f8-ab07-570f5a
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorUpdateMessage} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorUpdateMessage}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorUpdateMessage} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorUpdateMessage}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorUpdateMessage} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorUpdateMessage}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -240,7 +240,7 @@ This example updates the `text` value of message `3ab66cc6-c048-48f8-ab07-570f5a
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultUpdateMessage} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultUpdateMessage}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -253,17 +253,17 @@ This example updates the `session_ID` value `01ce083d-748b-4b8d-97b6-33adbb6a528
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorUpdateSessionId} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorUpdateSessionId}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorUpdateSessionId} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorUpdateSessionId}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorUpdateSessionId} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorUpdateSessionId}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -271,7 +271,7 @@ This example updates the `session_ID` value `01ce083d-748b-4b8d-97b6-33adbb6a528
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultUpdateSessionId} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultUpdateSessionId}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -282,17 +282,17 @@ Delete all messages for a specific session.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorDeleteMessagesBySession} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorDeleteMessagesBySession} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorDeleteMessagesBySession} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -300,7 +300,7 @@ Delete all messages for a specific session.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultDeleteMessagesBySession} language="text" />
|
||||
<CodeBlock language="text">{resultApiMonitorResultDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -315,7 +315,7 @@ Use `GET /monitor/traces` and filter by `flow_id`:
|
||||
<Tabs>
|
||||
<TabItem value="python" label="Python">
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorExampleRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="typescript" label="TypeScript">
|
||||
@ -352,7 +352,7 @@ listTraces().catch(console.error);
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorExampleRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -401,17 +401,17 @@ This information is also available in [flow logs](/logging).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetTransactions} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetTransactions}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetTransactions} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetTransactions}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetTransactions} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetTransactions}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -419,7 +419,7 @@ This information is also available in [flow logs](/logging).
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultGetTransactions} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultGetTransactions}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: OpenAI Responses API
|
||||
slug: /api-openai-responses
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiOpenaiResponsesExampleRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-openai-responses/example-request.sh';
|
||||
import exampleApiOpenaiResponsesExampleStreamingRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-openai-responses/example-streaming-request.sh';
|
||||
import resultApiOpenaiResponsesResultExampleStreamingRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-openai-responses/result-example-streaming-request.json';
|
||||
@ -70,12 +70,12 @@ In the following examples, replace the values for `LANGFLOW_SERVER_URL`, `LANGFL
|
||||
<Tabs groupId="client">
|
||||
<TabItem value="Python" label="OpenAI Python Client" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="OpenAI TypeScript Client">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -105,17 +105,17 @@ If you need these in a different format or want a downloadable calendar, let me
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesExampleRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesExampleRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesExampleRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -234,17 +234,17 @@ When you set `"stream": true` with your request, the API returns a stream where
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesExampleStreamingRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesExampleStreamingRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesExampleStreamingRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -252,7 +252,7 @@ When you set `"stream": true` with your request, the API returns a stream where
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultExampleStreamingRequest} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -295,17 +295,17 @@ First Message:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -313,7 +313,7 @@ First Message:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -322,17 +322,17 @@ Follow-up message:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -340,7 +340,7 @@ Follow-up message:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds2} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -349,17 +349,17 @@ Optionally, you can use your own session ID values for the `previous_response_id
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -419,17 +419,17 @@ To get the raw `results` of each tool execution, add `include: ["tool_call.resu
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesRetrieveToolCallResults} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesRetrieveToolCallResults} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesRetrieveToolCallResults} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -450,7 +450,7 @@ For example:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultRetrieveToolCallResults} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -477,17 +477,17 @@ The `usage` field is always present in the response, either with token counts or
|
||||
<Tabs groupId="token-usage">
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesTokenUsageTracking} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesTokenUsageTracking}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesTokenUsageTracking} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesTokenUsageTracking}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesTokenUsageTracking} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesTokenUsageTracking}</CodeBlock>
|
||||
|
||||
<details>
|
||||
<summary>Response with token usage</summary>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Projects endpoints
|
||||
slug: /api-projects
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiProjectsReadProjects from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-projects/read-projects.sh';
|
||||
import resultApiProjectsResultReadProjects from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-projects/result-read-projects.json';
|
||||
import exampleApiProjectsCreateProject from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-projects/create-project.sh';
|
||||
@ -46,17 +46,17 @@ Get a list of Langflow projects, including project IDs, names, and descriptions.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsReadProjects} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsReadProjects}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsReadProjects} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsReadProjects}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsReadProjects} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsReadProjects}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -64,7 +64,7 @@ Get a list of Langflow projects, including project IDs, names, and descriptions.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultReadProjects} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultReadProjects}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -75,17 +75,17 @@ Create a new project.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsCreateProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsCreateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsCreateProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsCreateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsCreateProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsCreateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -93,7 +93,7 @@ Create a new project.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultCreateProject} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultCreateProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -104,17 +104,17 @@ Adding a flow to a project moves the flow from its previous location. The flow i
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsCreateProject2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsCreateProject2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsCreateProject2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsCreateProject2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsCreateProject2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsCreateProject2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -128,17 +128,17 @@ To find the UUID of your project, call the [read projects](#read-projects) endpo
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsReadProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsReadProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsReadProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsReadProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsReadProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsReadProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -146,7 +146,7 @@ To find the UUID of your project, call the [read projects](#read-projects) endpo
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultReadProject} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultReadProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -161,17 +161,17 @@ If you send the same values multiple times, the update is still processed, even
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsUpdateProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsUpdateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsUpdateProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsUpdateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsUpdateProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsUpdateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -179,7 +179,7 @@ If you send the same values multiple times, the update is still processed, even
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultUpdateProject} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultUpdateProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -190,17 +190,17 @@ Delete a specific project.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsDeleteProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsDeleteProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsDeleteProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsDeleteProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsDeleteProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsDeleteProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -208,7 +208,7 @@ Delete a specific project.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultDeleteProject} language="text" />
|
||||
<CodeBlock language="text">{resultApiProjectsResultDeleteProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -221,17 +221,17 @@ The `--output` flag is optional.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsExportAProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsExportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsExportAProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsExportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsExportAProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsExportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -243,17 +243,17 @@ Import a project and its flows by uploading a Langflow project zip file:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsImportAProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsImportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsImportAProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsImportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsImportAProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsImportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Get started with the Langflow API
|
||||
slug: /api-reference-api-examples
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiReferenceApiExamplesFormLangflowApiRequests from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-reference-api-examples/form-langflow-api-requests.sh';
|
||||
import exampleApiReferenceApiExamplesSetEnvironmentVariables from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-reference-api-examples/set-environment-variables.sh';
|
||||
import exampleApiReferenceApiExamplesHealthCheck from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-reference-api-examples/health-check.sh';
|
||||
@ -53,17 +53,17 @@ As an example of a Langflow API request, the following curl command calls the `/
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesFormLangflowApiRequests} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesFormLangflowApiRequests}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesFormLangflowApiRequests} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesFormLangflowApiRequests}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesFormLangflowApiRequests} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesFormLangflowApiRequests}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -112,7 +112,7 @@ You can use any method you prefer to set environment variables, such as `export`
|
||||
Then, reference those environment variables in your API requests.
|
||||
For example:
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesSetEnvironmentVariables} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesSetEnvironmentVariables}</CodeBlock>
|
||||
|
||||
Commonly used values in Langflow API requests include your [Langflow server URL](#base-url), [Langflow API keys](#authentication), flow IDs, and [project IDs](/api-projects#read-projects).
|
||||
|
||||
@ -129,17 +129,17 @@ Returns the health status of the Langflow database and chat services:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesHealthCheck} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesHealthCheck}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesHealthCheck} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesHealthCheck}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesHealthCheck} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesHealthCheck}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -147,7 +147,7 @@ Returns the health status of the Langflow database and chat services:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiReferenceApiExamplesResultHealthCheck} language="json" />
|
||||
<CodeBlock language="json">{resultApiReferenceApiExamplesResultHealthCheck}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -161,17 +161,17 @@ Returns the current Langflow API version:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesGetVersion} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesGetVersion}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesGetVersion} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesGetVersion}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesGetVersion} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesGetVersion}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -179,7 +179,7 @@ Returns the current Langflow API version:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiReferenceApiExamplesResultGetVersion} language="text" />
|
||||
<CodeBlock language="text">{resultApiReferenceApiExamplesResultGetVersion}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -191,17 +191,17 @@ Requires a [Langflow API key](/api-keys-and-authentication).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesGetConfiguration} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesGetConfiguration}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesGetConfiguration} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesGetConfiguration}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesGetConfiguration} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesGetConfiguration}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -209,7 +209,7 @@ Requires a [Langflow API key](/api-keys-and-authentication).
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiReferenceApiExamplesResultGetConfiguration} language="json" />
|
||||
<CodeBlock language="json">{resultApiReferenceApiExamplesResultGetConfiguration}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -221,17 +221,17 @@ Requires a [Langflow API key](/api-keys-and-authentication).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesGetAllComponents} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesGetAllComponents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesGetAllComponents} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesGetAllComponents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesGetAllComponents} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesGetAllComponents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Users endpoints
|
||||
slug: /api-users
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiUsersAddUser from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-users/add-user.sh';
|
||||
import resultApiUsersResultAddUser from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-users/result-add-user.json';
|
||||
import exampleApiUsersGetCurrentUser from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-users/get-current-user.sh';
|
||||
@ -43,17 +43,17 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersAddUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersAddUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersAddUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersAddUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersAddUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersAddUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -65,7 +65,7 @@ This `user_id` key is specifically for Langflow user management.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultAddUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultAddUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -76,17 +76,17 @@ Retrieve information about the authenticated user.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersGetCurrentUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersGetCurrentUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersGetCurrentUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersGetCurrentUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersGetCurrentUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersGetCurrentUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -94,7 +94,7 @@ Retrieve information about the authenticated user.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultGetCurrentUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultGetCurrentUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -107,17 +107,17 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersListAllUsers} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersListAllUsers}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersListAllUsers} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersListAllUsers}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersListAllUsers} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersListAllUsers}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -125,7 +125,7 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultListAllUsers} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultListAllUsers}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -140,17 +140,17 @@ This example activates the specified user's account and makes them a superuser:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersUpdateUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersUpdateUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersUpdateUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersUpdateUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersUpdateUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersUpdateUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -158,7 +158,7 @@ This example activates the specified user's account and makes them a superuser:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultUpdateUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultUpdateUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -171,17 +171,17 @@ Requires authentication as the target user.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersResetPassword} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersResetPassword}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersResetPassword} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersResetPassword}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersResetPassword} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersResetPassword}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -189,7 +189,7 @@ Requires authentication as the target user.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultResetPassword} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultResetPassword}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -202,17 +202,17 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersDeleteUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersDeleteUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersDeleteUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersDeleteUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersDeleteUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersDeleteUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -220,6 +220,6 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultDeleteUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultDeleteUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Workflow API (Beta)
|
||||
slug: /workflow-api
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleWorkflowsApiExampleSynchronousRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/workflows-api/example-synchronous-request.sh';
|
||||
import exampleWorkflowsApiExampleAsynchronousRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/workflows-api/example-asynchronous-request.sh';
|
||||
import exampleWorkflowsApiExampleRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/workflows-api/example-request.sh';
|
||||
@ -54,17 +54,17 @@ Execute a workflow synchronously and receive complete results immediately:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleSynchronousRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleSynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleSynchronousRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleSynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleSynchronousRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleSynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -84,17 +84,17 @@ The asynchronous request contains `stream` parameter, but streaming is not yet s
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleAsynchronousRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleAsynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleAsynchronousRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleAsynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleAsynchronousRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleAsynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -174,17 +174,17 @@ The response includes an `outputs` field containing component-level results. Eac
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -249,17 +249,17 @@ The response includes a `status` field that indicates the current state of the w
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleRequest2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleRequest2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleRequest2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleRequest2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleRequest2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleRequest2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -4,7 +4,6 @@ slug: /concepts-components
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import CodeSnippet from "@site/src/components/CodeSnippet";
|
||||
import RecursiveCharacterSource from "!!raw-loader!@langflow/src/lfx/src/lfx/components/langchain_utilities/recursive_character.py";
|
||||
|
||||
Components are the building blocks of your flows.
|
||||
@ -168,26 +167,59 @@ Each component's code includes definitions for inputs and outputs, which are rep
|
||||
For example, the `RecursiveCharacterTextSplitter` has four inputs. Each input definition specifies the input type, such as `IntInput`, as well as the encoded name, display name, description, and other parameters for that specific input.
|
||||
These values determine the component settings, such as display names and tooltips in the visual editor.
|
||||
|
||||
<CodeSnippet
|
||||
source={RecursiveCharacterSource}
|
||||
startLine={17}
|
||||
endLine={41}
|
||||
language="python"
|
||||
title="RecursiveCharacterTextSplitter inputs (from recursive_character.py)"
|
||||
showLineNumbers
|
||||
/>
|
||||
{/* Snippet copied from src/lfx/src/lfx/components/langchain_utilities/recursive_character.py — keep in sync if the component changes. */}
|
||||
```python title="RecursiveCharacterTextSplitter inputs (from recursive_character.py)" showLineNumbers
|
||||
inputs = [
|
||||
IntInput(
|
||||
name="chunk_size",
|
||||
display_name="Chunk Size",
|
||||
info="The maximum length of each chunk.",
|
||||
value=1000,
|
||||
),
|
||||
IntInput(
|
||||
name="chunk_overlap",
|
||||
display_name="Chunk Overlap",
|
||||
info="The amount of overlap between chunks.",
|
||||
value=200,
|
||||
),
|
||||
DataInput(
|
||||
name="data_input",
|
||||
display_name="Input",
|
||||
info="The texts to split.",
|
||||
input_types=["Document", "Data", "JSON"],
|
||||
required=True,
|
||||
),
|
||||
MessageTextInput(
|
||||
name="separators",
|
||||
display_name="Separators",
|
||||
info='The characters to split on.\nIf left empty defaults to ["\\n\\n", "\\n", " ", ""].',
|
||||
is_list=True,
|
||||
),
|
||||
]
|
||||
```
|
||||
|
||||
Additionally, components have methods or functions that handle their functionality.
|
||||
For example, the `RecursiveCharacterTextSplitter` has two methods:
|
||||
|
||||
<CodeSnippet
|
||||
source={RecursiveCharacterSource}
|
||||
startLine={45}
|
||||
endLine={60}
|
||||
language="python"
|
||||
title="RecursiveCharacterTextSplitter methods (from recursive_character.py)"
|
||||
showLineNumbers
|
||||
/>
|
||||
{/* Snippet copied from src/lfx/src/lfx/components/langchain_utilities/recursive_character.py — keep in sync if the component changes. */}
|
||||
```python title="RecursiveCharacterTextSplitter methods (from recursive_character.py)" showLineNumbers
|
||||
def get_data_input(self) -> Any:
|
||||
return self.data_input
|
||||
|
||||
def build_text_splitter(self) -> TextSplitter:
|
||||
if not self.separators:
|
||||
separators: list[str] | None = None
|
||||
else:
|
||||
# check if the separators list has escaped characters
|
||||
# if there are escaped characters, unescape them
|
||||
separators = [unescape_string(x) for x in self.separators]
|
||||
|
||||
return RecursiveCharacterTextSplitter(
|
||||
separators=separators,
|
||||
chunk_size=self.chunk_size,
|
||||
chunk_overlap=self.chunk_overlap,
|
||||
)
|
||||
```
|
||||
|
||||
The `get_data_input` method retrieves the text to be split from the component's input, which makes the data available to the class.
|
||||
The `build_text_splitter` method creates a `RecursiveCharacterTextSplitter` object by calling its parent class's `build` method. Then, the text is split with the created splitter and passed to the next component.
|
||||
|
||||
@ -129,3 +129,6 @@ The loader and validator both emit typed errors keyed by the manifest field that
|
||||
Run `lfx extension validate <path>` to see every error as a structured object with `code`, `message`, `location`, `hint`, and `ref_url`.
|
||||
|
||||
## See also
|
||||
|
||||
- [Bundle extensions overview](./extensions-overview)
|
||||
- [Build your first extension](./extensions-quickstart)
|
||||
|
||||
@ -70,4 +70,9 @@ lfx extension list
|
||||
|
||||
If you have custom components that you want to distribute and version independently of your Langflow install, you can package them as an extension.
|
||||
|
||||
For more information, see [Build your first Langflow Extension](./extensions-quickstart.mdx).
|
||||
For more information, see [Build your first Langflow Extension](./extensions-quickstart.mdx).
|
||||
|
||||
## See also
|
||||
|
||||
- [Build your first extension](./extensions-quickstart)
|
||||
- [Manifest reference](./extensions-manifest)
|
||||
@ -107,3 +107,6 @@ The scaffold ships a working `Component` subclass that prints `"Hello, {name}!"`
|
||||
The bundle appears in the palette without further configuration.
|
||||
|
||||
## See also
|
||||
|
||||
- [Bundle extensions overview](./extensions-overview)
|
||||
- [Manifest reference](./extensions-manifest)
|
||||
|
||||
@ -4,8 +4,6 @@ slug: /concepts-components
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import CodeSnippet from "@site/src/components/CodeSnippet";
|
||||
import RecursiveCharacterSource from "!!raw-loader!@langflow/src/lfx/src/lfx/components/langchain_utilities/recursive_character.py";
|
||||
|
||||
Components are the building blocks of your flows.
|
||||
Like classes in an application, each component is designed for a specific use case or integration.
|
||||
@ -168,26 +166,59 @@ Each component's code includes definitions for inputs and outputs, which are rep
|
||||
For example, the `RecursiveCharacterTextSplitter` has four inputs. Each input definition specifies the input type, such as `IntInput`, as well as the encoded name, display name, description, and other parameters for that specific input.
|
||||
These values determine the component settings, such as display names and tooltips in the visual editor.
|
||||
|
||||
<CodeSnippet
|
||||
source={RecursiveCharacterSource}
|
||||
startLine={17}
|
||||
endLine={41}
|
||||
language="python"
|
||||
title="RecursiveCharacterTextSplitter inputs (from recursive_character.py)"
|
||||
showLineNumbers
|
||||
/>
|
||||
{/* Snippet copied from src/lfx/src/lfx/components/langchain_utilities/recursive_character.py — keep in sync if the component changes. */}
|
||||
```python title="RecursiveCharacterTextSplitter inputs (from recursive_character.py)" showLineNumbers
|
||||
inputs = [
|
||||
IntInput(
|
||||
name="chunk_size",
|
||||
display_name="Chunk Size",
|
||||
info="The maximum length of each chunk.",
|
||||
value=1000,
|
||||
),
|
||||
IntInput(
|
||||
name="chunk_overlap",
|
||||
display_name="Chunk Overlap",
|
||||
info="The amount of overlap between chunks.",
|
||||
value=200,
|
||||
),
|
||||
DataInput(
|
||||
name="data_input",
|
||||
display_name="Input",
|
||||
info="The texts to split.",
|
||||
input_types=["Document", "Data", "JSON"],
|
||||
required=True,
|
||||
),
|
||||
MessageTextInput(
|
||||
name="separators",
|
||||
display_name="Separators",
|
||||
info='The characters to split on.\nIf left empty defaults to ["\\n\\n", "\\n", " ", ""].',
|
||||
is_list=True,
|
||||
),
|
||||
]
|
||||
```
|
||||
|
||||
Additionally, components have methods or functions that handle their functionality.
|
||||
For example, the `RecursiveCharacterTextSplitter` has two methods:
|
||||
|
||||
<CodeSnippet
|
||||
source={RecursiveCharacterSource}
|
||||
startLine={45}
|
||||
endLine={60}
|
||||
language="python"
|
||||
title="RecursiveCharacterTextSplitter methods (from recursive_character.py)"
|
||||
showLineNumbers
|
||||
/>
|
||||
{/* Snippet copied from src/lfx/src/lfx/components/langchain_utilities/recursive_character.py — keep in sync if the component changes. */}
|
||||
```python title="RecursiveCharacterTextSplitter methods (from recursive_character.py)" showLineNumbers
|
||||
def get_data_input(self) -> Any:
|
||||
return self.data_input
|
||||
|
||||
def build_text_splitter(self) -> TextSplitter:
|
||||
if not self.separators:
|
||||
separators: list[str] | None = None
|
||||
else:
|
||||
# check if the separators list has escaped characters
|
||||
# if there are escaped characters, unescape them
|
||||
separators = [unescape_string(x) for x in self.separators]
|
||||
|
||||
return RecursiveCharacterTextSplitter(
|
||||
separators=separators,
|
||||
chunk_size=self.chunk_size,
|
||||
chunk_overlap=self.chunk_overlap,
|
||||
)
|
||||
```
|
||||
|
||||
The `get_data_input` method retrieves the text to be split from the component's input, which makes the data available to the class.
|
||||
The `build_text_splitter` method creates a `RecursiveCharacterTextSplitter` object by calling its parent class's `build` method. Then, the text is split with the created splitter and passed to the next component.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Build endpoints
|
||||
slug: /api-build
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiBuildBuildFlowAndStreamEvents from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-build/build-flow-and-stream-events.sh';
|
||||
import resultApiBuildResultBuildFlowAndStreamEvents from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-build/result-build-flow-and-stream-events.json';
|
||||
import exampleApiBuildBuildFlowAndStreamEvents2 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-build/build-flow-and-stream-events-2.sh';
|
||||
@ -47,17 +47,17 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildBuildFlowAndStreamEvents} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildBuildFlowAndStreamEvents} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildBuildFlowAndStreamEvents} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -65,7 +65,7 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiBuildResultBuildFlowAndStreamEvents} language="json" />
|
||||
<CodeBlock language="json">{resultApiBuildResultBuildFlowAndStreamEvents}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -74,17 +74,17 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildBuildFlowAndStreamEvents2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildBuildFlowAndStreamEvents2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildBuildFlowAndStreamEvents2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -92,7 +92,7 @@ This endpoint builds and executes a flow, returning a job ID that can be used to
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiBuildResultBuildFlowAndStreamEvents2} language="json" />
|
||||
<CodeBlock language="json">{resultApiBuildResultBuildFlowAndStreamEvents2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -102,17 +102,17 @@ To disable streaming and get all events at once, set `?stream=false`.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildBuildFlowAndStreamEvents3} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildBuildFlowAndStreamEvents3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildBuildFlowAndStreamEvents3} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildBuildFlowAndStreamEvents3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildBuildFlowAndStreamEvents3} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildBuildFlowAndStreamEvents3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -146,17 +146,17 @@ The following example stops flow execution at an **OpenAI** component:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildSetStartAndStopPoints} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildSetStartAndStopPoints}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildSetStartAndStopPoints} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildSetStartAndStopPoints}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildSetStartAndStopPoints} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildSetStartAndStopPoints}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -169,17 +169,17 @@ This is useful for running flows without having to pass custom values through th
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiBuildOverrideFlowParameters} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiBuildOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiBuildOverrideFlowParameters} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiBuildOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiBuildOverrideFlowParameters} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiBuildOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -187,7 +187,7 @@ This is useful for running flows without having to pass custom values through th
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiBuildResultOverrideFlowParameters} language="json" />
|
||||
<CodeBlock language="json">{resultApiBuildResultOverrideFlowParameters}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Files endpoints
|
||||
slug: /api-files
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiFilesUploadFileV1 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-files/upload-file-v1.sh';
|
||||
import resultApiFilesResultUploadFileV1 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-files/result-upload-file-v1.json';
|
||||
import exampleApiFilesUploadImageFilesV1 from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-files/upload-image-files-v1.sh';
|
||||
@ -96,17 +96,17 @@ Replace **FILE_NAME** with the uploaded file name.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadFileV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadFileV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadFileV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -117,7 +117,7 @@ Not all file types are supported.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultUploadFileV1} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultUploadFileV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -133,17 +133,17 @@ To change this limit, set the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment varia
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadImageFilesV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadImageFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadImageFilesV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadImageFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadImageFilesV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadImageFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -166,17 +166,17 @@ To change this limit, set the `LANGFLOW_MAX_FILE_SIZE_UPLOAD` [environment varia
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadImageFilesV12} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadImageFilesV12}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadImageFilesV12} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadImageFilesV12}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadImageFilesV12} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadImageFilesV12}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -193,17 +193,17 @@ List all files associated with a specific flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesListFilesV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesListFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesListFilesV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesListFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesListFilesV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesListFilesV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -211,7 +211,7 @@ List all files associated with a specific flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultListFilesV1} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultListFilesV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -222,17 +222,17 @@ Download a specific file from a flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDownloadFileV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDownloadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDownloadFileV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDownloadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDownloadFileV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDownloadFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -240,7 +240,7 @@ Download a specific file from a flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDownloadFileV1} language="text" />
|
||||
<CodeBlock language="text">{resultApiFilesResultDownloadFileV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -251,17 +251,17 @@ Delete a specific file from a flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDeleteFileV1} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDeleteFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDeleteFileV1} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDeleteFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDeleteFileV1} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDeleteFileV1}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -269,7 +269,7 @@ Delete a specific file from a flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDeleteFileV1} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultDeleteFileV1}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -291,17 +291,17 @@ The file is uploaded in the format `USER_ID/FILE_ID.FILE_EXTENSION`, such as `07
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadFileV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadFileV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadFileV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -309,7 +309,7 @@ The file is uploaded in the format `USER_ID/FILE_ID.FILE_EXTENSION`, such as `07
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultUploadFileV2} language="text" />
|
||||
<CodeBlock language="text">{resultApiFilesResultUploadFileV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -319,17 +319,17 @@ You must include the ampersand (`@`) in the request to instruct curl to upload t
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesUploadFileV22} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesUploadFileV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesUploadFileV22} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesUploadFileV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesUploadFileV22} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesUploadFileV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -366,17 +366,17 @@ The default file limit is 1024 MB. To configure this value, change the `LANGFLOW
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesSendFilesToYourFlowsV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesSendFilesToYourFlowsV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesSendFilesToYourFlowsV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesSendFilesToYourFlowsV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesSendFilesToYourFlowsV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesSendFilesToYourFlowsV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -401,17 +401,17 @@ This component loads files into flows from your local machine or Langflow file m
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesSendFilesToYourFlowsV22} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesSendFilesToYourFlowsV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesSendFilesToYourFlowsV22} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesSendFilesToYourFlowsV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesSendFilesToYourFlowsV22} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesSendFilesToYourFlowsV22}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -427,17 +427,17 @@ List all files associated with your user account.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesListFilesV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesListFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesListFilesV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesListFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesListFilesV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesListFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -445,7 +445,7 @@ List all files associated with your user account.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultListFilesV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultListFilesV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -458,17 +458,17 @@ You must specify the file type you expect in the `--output` value.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDownloadFileV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDownloadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDownloadFileV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDownloadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDownloadFileV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDownloadFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -476,7 +476,7 @@ You must specify the file type you expect in the `--output` value.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDownloadFileV2} language="text" />
|
||||
<CodeBlock language="text">{resultApiFilesResultDownloadFileV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -487,17 +487,17 @@ Change a file name.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesEditFileNameV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesEditFileNameV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesEditFileNameV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesEditFileNameV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesEditFileNameV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesEditFileNameV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -505,7 +505,7 @@ Change a file name.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultEditFileNameV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultEditFileNameV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -516,17 +516,17 @@ Delete a specific file by its ID.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDeleteFileV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDeleteFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDeleteFileV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDeleteFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDeleteFileV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDeleteFileV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -534,7 +534,7 @@ Delete a specific file by its ID.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDeleteFileV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultDeleteFileV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -545,17 +545,17 @@ Delete all files associated with your user account.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFilesDeleteAllFilesV2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFilesDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFilesDeleteAllFilesV2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFilesDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFilesDeleteAllFilesV2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFilesDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -563,7 +563,7 @@ Delete all files associated with your user account.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFilesResultDeleteAllFilesV2} language="json" />
|
||||
<CodeBlock language="json">{resultApiFilesResultDeleteAllFilesV2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Flow trigger endpoints
|
||||
slug: /api-flows-run
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiFlowsRunRunFlow from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows-run/run-flow.sh';
|
||||
import exampleApiFlowsRunStreamLlmTokenResponses from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows-run/stream-llm-token-responses.sh';
|
||||
import exampleApiFlowsRunRequestExampleWithAllHeadersAndParameters from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows-run/request-example-with-all-headers-and-parameters.sh';
|
||||
@ -46,17 +46,17 @@ This flow requires a chat input string (`input_value`), and uses default values
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunRunFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunRunFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunRunFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -113,17 +113,17 @@ To stream LLM token responses, append the `?stream=true` query parameter to the
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunStreamLlmTokenResponses} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunStreamLlmTokenResponses}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunStreamLlmTokenResponses} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunStreamLlmTokenResponses}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunStreamLlmTokenResponses} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunStreamLlmTokenResponses}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -186,17 +186,17 @@ The following example is truncated to illustrate a series of `token` events as w
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunRequestExampleWithAllHeadersAndParameters} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunRequestExampleWithAllHeadersAndParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunRequestExampleWithAllHeadersAndParameters} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunRequestExampleWithAllHeadersAndParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunRequestExampleWithAllHeadersAndParameters} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunRequestExampleWithAllHeadersAndParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -214,17 +214,17 @@ You don't need to create these variables in Langflow's Global Variables section
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunPassGlobalVariablesInRequestHeaders} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunPassGlobalVariablesInRequestHeaders}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunPassGlobalVariablesInRequestHeaders} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunPassGlobalVariablesInRequestHeaders}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunPassGlobalVariablesInRequestHeaders} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunPassGlobalVariablesInRequestHeaders}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -244,17 +244,17 @@ For more information, see [Trigger flows with webhooks](/webhook).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsRunWebhookRunFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsRunWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsRunWebhookRunFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsRunWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsRunWebhookRunFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsRunWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -262,7 +262,7 @@ For more information, see [Trigger flows with webhooks](/webhook).
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsRunResultWebhookRunFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsRunResultWebhookRunFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Flow management endpoints
|
||||
slug: /api-flows
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiFlowsCreateFlow from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows/create-flow.sh';
|
||||
import resultApiFlowsResultCreateFlow from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows/result-create-flow.json';
|
||||
import exampleApiFlowsCreateFlows from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-flows/create-flows.sh';
|
||||
@ -54,17 +54,17 @@ Creates a new flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsCreateFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsCreateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsCreateFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsCreateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsCreateFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsCreateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -72,7 +72,7 @@ Creates a new flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultCreateFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultCreateFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -83,17 +83,17 @@ Creates multiple new flows, returning an array of flow objects.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsCreateFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsCreateFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsCreateFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsCreateFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsCreateFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsCreateFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -105,17 +105,17 @@ Retrieves a specific flow by its ID.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -123,7 +123,7 @@ Retrieves a specific flow by its ID.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultReadFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultReadFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -136,17 +136,17 @@ Retrieve all flows with pagination:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -156,17 +156,17 @@ To retrieve flows from a specific project, use the `project_id` query parameter:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadFlows2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadFlows2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadFlows2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadFlows2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadFlows2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadFlows2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -178,17 +178,17 @@ Retrieves a list of sample flows:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsReadSampleFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsReadSampleFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsReadSampleFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsReadSampleFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsReadSampleFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsReadSampleFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -202,17 +202,17 @@ This example changes the value for `endpoint_name` from a random UUID to `my_new
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsUpdateFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsUpdateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsUpdateFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsUpdateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsUpdateFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsUpdateFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -220,7 +220,7 @@ This example changes the value for `endpoint_name` from a random UUID to `my_new
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultUpdateFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultUpdateFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -231,17 +231,17 @@ Deletes a specific flow by its ID.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsDeleteFlow} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsDeleteFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsDeleteFlow} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsDeleteFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsDeleteFlow} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsDeleteFlow}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -249,7 +249,7 @@ Deletes a specific flow by its ID.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultDeleteFlow} language="json" />
|
||||
<CodeBlock language="json">{resultApiFlowsResultDeleteFlow}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -262,17 +262,17 @@ This endpoint downloads a ZIP file containing [Langflow JSON files](/concepts-fl
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsExportFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsExportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsExportFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsExportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsExportFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsExportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -280,7 +280,7 @@ This endpoint downloads a ZIP file containing [Langflow JSON files](/concepts-fl
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiFlowsResultExportFlows} language="text" />
|
||||
<CodeBlock language="text">{resultApiFlowsResultExportFlows}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -296,17 +296,17 @@ This example uploads a local file named `agent-with-astra-db-tool.json` to a fol
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiFlowsImportFlows} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiFlowsImportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiFlowsImportFlows} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiFlowsImportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiFlowsImportFlows} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiFlowsImportFlows}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Logs endpoints
|
||||
slug: /api-logs
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiLogsStreamLogs from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-logs/stream-logs.sh';
|
||||
import resultApiLogsResultStreamLogs from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-logs/result-stream-logs.txt';
|
||||
import exampleApiLogsRetrieveLogsWithOptionalParameters from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-logs/retrieve-logs-with-optional-parameters.sh';
|
||||
@ -37,17 +37,17 @@ Stream logs in real-time using Server Sent Events (SSE):
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiLogsStreamLogs} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiLogsStreamLogs}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiLogsStreamLogs} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiLogsStreamLogs}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiLogsStreamLogs} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiLogsStreamLogs}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -55,7 +55,7 @@ Stream logs in real-time using Server Sent Events (SSE):
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiLogsResultStreamLogs} language="text" />
|
||||
<CodeBlock language="text">{resultApiLogsResultStreamLogs}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -73,17 +73,17 @@ With default values, the endpoint returns the last 10 lines of logs.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiLogsRetrieveLogsWithOptionalParameters} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiLogsRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiLogsRetrieveLogsWithOptionalParameters} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiLogsRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiLogsRetrieveLogsWithOptionalParameters} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiLogsRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -91,6 +91,6 @@ With default values, the endpoint returns the last 10 lines of logs.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiLogsResultRetrieveLogsWithOptionalParameters} language="text" />
|
||||
<CodeBlock language="text">{resultApiLogsResultRetrieveLogsWithOptionalParameters}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Monitor endpoints
|
||||
slug: /api-monitor
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiMonitorGetVertexBuilds from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-monitor/get-vertex-builds.sh';
|
||||
import resultApiMonitorResultGetVertexBuilds from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-monitor/result-get-vertex-builds.json';
|
||||
import exampleApiMonitorDeleteVertexBuilds from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-monitor/delete-vertex-builds.sh';
|
||||
@ -73,17 +73,17 @@ Retrieve Vertex builds for a specific flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetVertexBuilds} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetVertexBuilds} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetVertexBuilds} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -91,7 +91,7 @@ Retrieve Vertex builds for a specific flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultGetVertexBuilds} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultGetVertexBuilds}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -102,17 +102,17 @@ Delete Vertex builds for a specific flow.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorDeleteVertexBuilds} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorDeleteVertexBuilds} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorDeleteVertexBuilds} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -120,7 +120,7 @@ Delete Vertex builds for a specific flow.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultDeleteVertexBuilds} language="text" />
|
||||
<CodeBlock language="text">{resultApiMonitorResultDeleteVertexBuilds}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -136,17 +136,17 @@ Retrieve a list of all messages:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetMessages} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetMessages} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetMessages} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -160,17 +160,17 @@ This example retrieves messages sent by `Machine` and `AI` in a given chat sessi
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetMessages2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetMessages2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetMessages2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetMessages2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetMessages2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetMessages2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -178,7 +178,7 @@ This example retrieves messages sent by `Machine` and `AI` in a given chat sessi
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultGetMessages2} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultGetMessages2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -191,17 +191,17 @@ This example deletes the message retrieved in the previous `GET /messages` examp
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorDeleteMessages} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorDeleteMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorDeleteMessages} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorDeleteMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorDeleteMessages} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorDeleteMessages}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -209,7 +209,7 @@ This example deletes the message retrieved in the previous `GET /messages` examp
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultDeleteMessages} language="text" />
|
||||
<CodeBlock language="text">{resultApiMonitorResultDeleteMessages}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -222,17 +222,17 @@ This example updates the `text` value of message `3ab66cc6-c048-48f8-ab07-570f5a
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorUpdateMessage} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorUpdateMessage}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorUpdateMessage} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorUpdateMessage}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorUpdateMessage} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorUpdateMessage}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -240,7 +240,7 @@ This example updates the `text` value of message `3ab66cc6-c048-48f8-ab07-570f5a
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultUpdateMessage} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultUpdateMessage}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -253,17 +253,17 @@ This example updates the `session_ID` value `01ce083d-748b-4b8d-97b6-33adbb6a528
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorUpdateSessionId} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorUpdateSessionId}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorUpdateSessionId} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorUpdateSessionId}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorUpdateSessionId} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorUpdateSessionId}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -271,7 +271,7 @@ This example updates the `session_ID` value `01ce083d-748b-4b8d-97b6-33adbb6a528
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultUpdateSessionId} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultUpdateSessionId}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -282,17 +282,17 @@ Delete all messages for a specific session.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorDeleteMessagesBySession} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorDeleteMessagesBySession} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorDeleteMessagesBySession} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -300,7 +300,7 @@ Delete all messages for a specific session.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultDeleteMessagesBySession} language="text" />
|
||||
<CodeBlock language="text">{resultApiMonitorResultDeleteMessagesBySession}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -315,7 +315,7 @@ Use `GET /monitor/traces` and filter by `flow_id`:
|
||||
<Tabs>
|
||||
<TabItem value="python" label="Python">
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorExampleRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="typescript" label="TypeScript">
|
||||
@ -352,7 +352,7 @@ listTraces().catch(console.error);
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorExampleRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -401,17 +401,17 @@ This information is also available in [flow logs](/logging).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiMonitorGetTransactions} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiMonitorGetTransactions}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiMonitorGetTransactions} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiMonitorGetTransactions}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiMonitorGetTransactions} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiMonitorGetTransactions}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -419,7 +419,7 @@ This information is also available in [flow logs](/logging).
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiMonitorResultGetTransactions} language="json" />
|
||||
<CodeBlock language="json">{resultApiMonitorResultGetTransactions}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: OpenAI Responses API
|
||||
slug: /api-openai-responses
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiOpenaiResponsesExampleRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-openai-responses/example-request.sh';
|
||||
import exampleApiOpenaiResponsesExampleStreamingRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-openai-responses/example-streaming-request.sh';
|
||||
import resultApiOpenaiResponsesResultExampleStreamingRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-openai-responses/result-example-streaming-request.json';
|
||||
@ -70,12 +70,12 @@ In the following examples, replace the values for `LANGFLOW_SERVER_URL`, `LANGFL
|
||||
<Tabs groupId="client">
|
||||
<TabItem value="Python" label="OpenAI Python Client" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="OpenAI TypeScript Client">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesAdditionalConfigurationForOpenaiClientLibraries}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -105,17 +105,17 @@ If you need these in a different format or want a downloadable calendar, let me
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesExampleRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesExampleRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesExampleRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -234,17 +234,17 @@ When you set `"stream": true` with your request, the API returns a stream where
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesExampleStreamingRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesExampleStreamingRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesExampleStreamingRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -252,7 +252,7 @@ When you set `"stream": true` with your request, the API returns a stream where
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultExampleStreamingRequest} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultExampleStreamingRequest}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -295,17 +295,17 @@ First Message:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -313,7 +313,7 @@ First Message:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -322,17 +322,17 @@ Follow-up message:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -340,7 +340,7 @@ Follow-up message:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds2} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultContinueConversationsWithResponseAndSessionIds2}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -349,17 +349,17 @@ Optionally, you can use your own session ID values for the `previous_response_id
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesContinueConversationsWithResponseAndSessionIds3}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -419,17 +419,17 @@ To get the raw `results` of each tool execution, add `include: ["tool_call.resu
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesRetrieveToolCallResults} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesRetrieveToolCallResults} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesRetrieveToolCallResults} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -450,7 +450,7 @@ For example:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiOpenaiResponsesResultRetrieveToolCallResults} language="json" />
|
||||
<CodeBlock language="json">{resultApiOpenaiResponsesResultRetrieveToolCallResults}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -477,17 +477,17 @@ The `usage` field is always present in the response, either with token counts or
|
||||
<Tabs groupId="token-usage">
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiOpenaiResponsesTokenUsageTracking} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiOpenaiResponsesTokenUsageTracking}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiOpenaiResponsesTokenUsageTracking} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiOpenaiResponsesTokenUsageTracking}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiOpenaiResponsesTokenUsageTracking} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiOpenaiResponsesTokenUsageTracking}</CodeBlock>
|
||||
|
||||
<details>
|
||||
<summary>Response with token usage</summary>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Projects endpoints
|
||||
slug: /api-projects
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiProjectsReadProjects from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-projects/read-projects.sh';
|
||||
import resultApiProjectsResultReadProjects from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-projects/result-read-projects.json';
|
||||
import exampleApiProjectsCreateProject from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-projects/create-project.sh';
|
||||
@ -46,17 +46,17 @@ Get a list of Langflow projects, including project IDs, names, and descriptions.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsReadProjects} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsReadProjects}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsReadProjects} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsReadProjects}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsReadProjects} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsReadProjects}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -64,7 +64,7 @@ Get a list of Langflow projects, including project IDs, names, and descriptions.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultReadProjects} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultReadProjects}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -75,17 +75,17 @@ Create a new project.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsCreateProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsCreateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsCreateProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsCreateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsCreateProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsCreateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -93,7 +93,7 @@ Create a new project.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultCreateProject} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultCreateProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -104,17 +104,17 @@ Adding a flow to a project moves the flow from its previous location. The flow i
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsCreateProject2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsCreateProject2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsCreateProject2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsCreateProject2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsCreateProject2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsCreateProject2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -128,17 +128,17 @@ To find the UUID of your project, call the [read projects](#read-projects) endpo
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsReadProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsReadProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsReadProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsReadProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsReadProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsReadProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -146,7 +146,7 @@ To find the UUID of your project, call the [read projects](#read-projects) endpo
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultReadProject} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultReadProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -161,17 +161,17 @@ If you send the same values multiple times, the update is still processed, even
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsUpdateProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsUpdateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsUpdateProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsUpdateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsUpdateProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsUpdateProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -179,7 +179,7 @@ If you send the same values multiple times, the update is still processed, even
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultUpdateProject} language="json" />
|
||||
<CodeBlock language="json">{resultApiProjectsResultUpdateProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -190,17 +190,17 @@ Delete a specific project.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsDeleteProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsDeleteProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsDeleteProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsDeleteProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsDeleteProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsDeleteProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -208,7 +208,7 @@ Delete a specific project.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiProjectsResultDeleteProject} language="text" />
|
||||
<CodeBlock language="text">{resultApiProjectsResultDeleteProject}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -221,17 +221,17 @@ The `--output` flag is optional.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsExportAProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsExportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsExportAProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsExportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsExportAProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsExportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -243,17 +243,17 @@ Import a project and its flows by uploading a Langflow project zip file:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiProjectsImportAProject} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiProjectsImportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiProjectsImportAProject} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiProjectsImportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiProjectsImportAProject} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiProjectsImportAProject}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Get started with the Langflow API
|
||||
slug: /api-reference-api-examples
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiReferenceApiExamplesFormLangflowApiRequests from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-reference-api-examples/form-langflow-api-requests.sh';
|
||||
import exampleApiReferenceApiExamplesSetEnvironmentVariables from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-reference-api-examples/set-environment-variables.sh';
|
||||
import exampleApiReferenceApiExamplesHealthCheck from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-reference-api-examples/health-check.sh';
|
||||
@ -53,17 +53,17 @@ As an example of a Langflow API request, the following curl command calls the `/
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesFormLangflowApiRequests} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesFormLangflowApiRequests}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesFormLangflowApiRequests} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesFormLangflowApiRequests}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesFormLangflowApiRequests} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesFormLangflowApiRequests}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -112,7 +112,7 @@ You can use any method you prefer to set environment variables, such as `export`
|
||||
Then, reference those environment variables in your API requests.
|
||||
For example:
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesSetEnvironmentVariables} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesSetEnvironmentVariables}</CodeBlock>
|
||||
|
||||
Commonly used values in Langflow API requests include your [Langflow server URL](#base-url), [Langflow API keys](#authentication), flow IDs, and [project IDs](/api-projects#read-projects).
|
||||
|
||||
@ -129,17 +129,17 @@ Returns the health status of the Langflow database and chat services:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesHealthCheck} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesHealthCheck}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesHealthCheck} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesHealthCheck}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesHealthCheck} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesHealthCheck}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -147,7 +147,7 @@ Returns the health status of the Langflow database and chat services:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiReferenceApiExamplesResultHealthCheck} language="json" />
|
||||
<CodeBlock language="json">{resultApiReferenceApiExamplesResultHealthCheck}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -161,17 +161,17 @@ Returns the current Langflow API version:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesGetVersion} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesGetVersion}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesGetVersion} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesGetVersion}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesGetVersion} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesGetVersion}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -179,7 +179,7 @@ Returns the current Langflow API version:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiReferenceApiExamplesResultGetVersion} language="text" />
|
||||
<CodeBlock language="text">{resultApiReferenceApiExamplesResultGetVersion}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -191,17 +191,17 @@ Requires a [Langflow API key](/api-keys-and-authentication).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesGetConfiguration} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesGetConfiguration}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesGetConfiguration} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesGetConfiguration}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesGetConfiguration} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesGetConfiguration}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -209,7 +209,7 @@ Requires a [Langflow API key](/api-keys-and-authentication).
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiReferenceApiExamplesResultGetConfiguration} language="json" />
|
||||
<CodeBlock language="json">{resultApiReferenceApiExamplesResultGetConfiguration}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -221,17 +221,17 @@ Requires a [Langflow API key](/api-keys-and-authentication).
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiReferenceApiExamplesGetAllComponents} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiReferenceApiExamplesGetAllComponents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiReferenceApiExamplesGetAllComponents} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiReferenceApiExamplesGetAllComponents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiReferenceApiExamplesGetAllComponents} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiReferenceApiExamplesGetAllComponents}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Users endpoints
|
||||
slug: /api-users
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleApiUsersAddUser from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-users/add-user.sh';
|
||||
import resultApiUsersResultAddUser from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-users/result-add-user.json';
|
||||
import exampleApiUsersGetCurrentUser from '!!raw-loader!@site/docs/API-Reference/curl-examples/api-users/get-current-user.sh';
|
||||
@ -43,17 +43,17 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersAddUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersAddUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersAddUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersAddUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersAddUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersAddUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -65,7 +65,7 @@ This `user_id` key is specifically for Langflow user management.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultAddUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultAddUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -76,17 +76,17 @@ Retrieve information about the authenticated user.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersGetCurrentUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersGetCurrentUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersGetCurrentUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersGetCurrentUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersGetCurrentUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersGetCurrentUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -94,7 +94,7 @@ Retrieve information about the authenticated user.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultGetCurrentUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultGetCurrentUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -107,17 +107,17 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersListAllUsers} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersListAllUsers}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersListAllUsers} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersListAllUsers}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersListAllUsers} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersListAllUsers}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -125,7 +125,7 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultListAllUsers} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultListAllUsers}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -140,17 +140,17 @@ This example activates the specified user's account and makes them a superuser:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersUpdateUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersUpdateUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersUpdateUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersUpdateUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersUpdateUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersUpdateUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -158,7 +158,7 @@ This example activates the specified user's account and makes them a superuser:
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultUpdateUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultUpdateUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -171,17 +171,17 @@ Requires authentication as the target user.
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersResetPassword} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersResetPassword}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersResetPassword} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersResetPassword}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersResetPassword} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersResetPassword}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -189,7 +189,7 @@ Requires authentication as the target user.
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultResetPassword} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultResetPassword}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -202,17 +202,17 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonApiUsersDeleteUser} language="python" />
|
||||
<CodeBlock language="python">{examplePythonApiUsersDeleteUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptApiUsersDeleteUser} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptApiUsersDeleteUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleApiUsersDeleteUser} language="bash" />
|
||||
<CodeBlock language="bash">{exampleApiUsersDeleteUser}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -220,6 +220,6 @@ Requires authentication as a superuser if the Langflow server has authentication
|
||||
<details>
|
||||
<summary>Result</summary>
|
||||
|
||||
<CodeSnippet source={resultApiUsersResultDeleteUser} language="json" />
|
||||
<CodeBlock language="json">{resultApiUsersResultDeleteUser}</CodeBlock>
|
||||
|
||||
</details>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
title: Workflow API (Beta)
|
||||
slug: /workflow-api
|
||||
---
|
||||
import CodeSnippet from '@site/src/components/CodeSnippet';
|
||||
import CodeBlock from '@theme/CodeBlock';
|
||||
import exampleWorkflowsApiExampleSynchronousRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/workflows-api/example-synchronous-request.sh';
|
||||
import exampleWorkflowsApiExampleAsynchronousRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/workflows-api/example-asynchronous-request.sh';
|
||||
import exampleWorkflowsApiExampleRequest from '!!raw-loader!@site/docs/API-Reference/curl-examples/workflows-api/example-request.sh';
|
||||
@ -54,17 +54,17 @@ Execute a workflow synchronously and receive complete results immediately:
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleSynchronousRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleSynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleSynchronousRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleSynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleSynchronousRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleSynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -84,17 +84,17 @@ The asynchronous request contains `stream` parameter, but streaming is not yet s
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleAsynchronousRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleAsynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleAsynchronousRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleAsynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleAsynchronousRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleAsynchronousRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -169,17 +169,17 @@ The response includes an `outputs` field containing component-level results. Eac
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleRequest} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleRequest} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleRequest} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleRequest}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
@ -244,17 +244,17 @@ The response includes a `status` field that indicates the current state of the w
|
||||
<Tabs>
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
<CodeSnippet source={examplePythonWorkflowsApiExampleRequest2} language="python" />
|
||||
<CodeBlock language="python">{examplePythonWorkflowsApiExampleRequest2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
<CodeSnippet source={exampleJavascriptWorkflowsApiExampleRequest2} language="javascript" />
|
||||
<CodeBlock language="javascript">{exampleJavascriptWorkflowsApiExampleRequest2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
<CodeSnippet source={exampleWorkflowsApiExampleRequest2} language="bash" />
|
||||
<CodeBlock language="bash">{exampleWorkflowsApiExampleRequest2}</CodeBlock>
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
@ -4,8 +4,6 @@ slug: /concepts-components
|
||||
---
|
||||
|
||||
import Icon from "@site/src/components/icon";
|
||||
import CodeSnippet from "@site/src/components/CodeSnippet";
|
||||
import RecursiveCharacterSource from "!!raw-loader!@langflow/src/lfx/src/lfx/components/langchain_utilities/recursive_character.py";
|
||||
|
||||
Components are the building blocks of your flows.
|
||||
Like classes in an application, each component is designed for a specific use case or integration.
|
||||
@ -168,26 +166,59 @@ Each component's code includes definitions for inputs and outputs, which are rep
|
||||
For example, the `RecursiveCharacterTextSplitter` has four inputs. Each input definition specifies the input type, such as `IntInput`, as well as the encoded name, display name, description, and other parameters for that specific input.
|
||||
These values determine the component settings, such as display names and tooltips in the visual editor.
|
||||
|
||||
<CodeSnippet
|
||||
source={RecursiveCharacterSource}
|
||||
startLine={17}
|
||||
endLine={41}
|
||||
language="python"
|
||||
title="RecursiveCharacterTextSplitter inputs (from recursive_character.py)"
|
||||
showLineNumbers
|
||||
/>
|
||||
{/* Snippet copied from src/lfx/src/lfx/components/langchain_utilities/recursive_character.py — keep in sync if the component changes. */}
|
||||
```python title="RecursiveCharacterTextSplitter inputs (from recursive_character.py)" showLineNumbers
|
||||
inputs = [
|
||||
IntInput(
|
||||
name="chunk_size",
|
||||
display_name="Chunk Size",
|
||||
info="The maximum length of each chunk.",
|
||||
value=1000,
|
||||
),
|
||||
IntInput(
|
||||
name="chunk_overlap",
|
||||
display_name="Chunk Overlap",
|
||||
info="The amount of overlap between chunks.",
|
||||
value=200,
|
||||
),
|
||||
DataInput(
|
||||
name="data_input",
|
||||
display_name="Input",
|
||||
info="The texts to split.",
|
||||
input_types=["Document", "Data", "JSON"],
|
||||
required=True,
|
||||
),
|
||||
MessageTextInput(
|
||||
name="separators",
|
||||
display_name="Separators",
|
||||
info='The characters to split on.\nIf left empty defaults to ["\\n\\n", "\\n", " ", ""].',
|
||||
is_list=True,
|
||||
),
|
||||
]
|
||||
```
|
||||
|
||||
Additionally, components have methods or functions that handle their functionality.
|
||||
For example, the `RecursiveCharacterTextSplitter` has two methods:
|
||||
|
||||
<CodeSnippet
|
||||
source={RecursiveCharacterSource}
|
||||
startLine={45}
|
||||
endLine={60}
|
||||
language="python"
|
||||
title="RecursiveCharacterTextSplitter methods (from recursive_character.py)"
|
||||
showLineNumbers
|
||||
/>
|
||||
{/* Snippet copied from src/lfx/src/lfx/components/langchain_utilities/recursive_character.py — keep in sync if the component changes. */}
|
||||
```python title="RecursiveCharacterTextSplitter methods (from recursive_character.py)" showLineNumbers
|
||||
def get_data_input(self) -> Any:
|
||||
return self.data_input
|
||||
|
||||
def build_text_splitter(self) -> TextSplitter:
|
||||
if not self.separators:
|
||||
separators: list[str] | None = None
|
||||
else:
|
||||
# check if the separators list has escaped characters
|
||||
# if there are escaped characters, unescape them
|
||||
separators = [unescape_string(x) for x in self.separators]
|
||||
|
||||
return RecursiveCharacterTextSplitter(
|
||||
separators=separators,
|
||||
chunk_size=self.chunk_size,
|
||||
chunk_overlap=self.chunk_overlap,
|
||||
)
|
||||
```
|
||||
|
||||
The `get_data_input` method retrieves the text to be split from the component's input, which makes the data available to the class.
|
||||
The `build_text_splitter` method creates a `RecursiveCharacterTextSplitter` object by calling its parent class's `build` method. Then, the text is split with the created splitter and passed to the next component.
|
||||
|
||||
@ -19,10 +19,28 @@ maintainers = [
|
||||
dependencies = [
|
||||
"langflow-base[complete]>=0.11.0",
|
||||
# langflow-extensions:bundle-deps-start
|
||||
"lfx-duckduckgo>=0.1.0",
|
||||
"lfx-arxiv>=0.1.0",
|
||||
"lfx-ibm>=0.1.0",
|
||||
"lfx-docling>=0.1.0",
|
||||
# Release coordination: langflow declares BOUNDED ranges (>=A,<B) for every
|
||||
# curated lfx-* package, never exact pins -- exact pins in reusable library
|
||||
# metadata create resolver conflicts for downstreams that depend on a
|
||||
# different version. Exact pins for reproducibility live in uv.lock and the
|
||||
# release-build manifests. Bundles follow their own 0.1.x cadence (bound
|
||||
# <1.0.0); lfx-bundles versions with the metapackage contract (bound <2.0).
|
||||
# The cross-bundle CI matrix verifies these ranges resolve together across
|
||||
# the supported lfx axis.
|
||||
"lfx-duckduckgo>=0.1.0,<1.0.0",
|
||||
"lfx-arxiv>=0.1.0,<1.0.0",
|
||||
"lfx-ibm>=0.1.0,<1.0.0",
|
||||
"lfx-docling>=0.1.0,<1.0.0",
|
||||
"lfx-bundles[all]>=1.0,<2.0",
|
||||
# TODO: Re-enable these direct dependencies after the PyPI projects are published.
|
||||
# "lfx-datastax>=0.1.0,<1.0.0",
|
||||
# "lfx-openai>=0.1.0,<1.0.0",
|
||||
"lfx-anthropic>=0.1.0,<1.0.0",
|
||||
"lfx-amazon>=0.1.0,<1.0.0",
|
||||
"lfx-cohere>=0.1.0,<1.0.0",
|
||||
# "lfx-oracle>=0.1.0,<1.0.0",
|
||||
"lfx-firecrawl>=0.1.0,<1.0.0",
|
||||
"lfx-nextplaid>=0.1.0,<1.0.0",
|
||||
# langflow-extensions:bundle-deps-end
|
||||
]
|
||||
|
||||
@ -84,6 +102,15 @@ lfx-duckduckgo = { workspace = true }
|
||||
lfx-arxiv = { workspace = true }
|
||||
lfx-ibm = { workspace = true }
|
||||
lfx-docling = { workspace = true }
|
||||
lfx-bundles = { workspace = true }
|
||||
lfx-datastax = { workspace = true }
|
||||
lfx-openai = { workspace = true }
|
||||
lfx-anthropic = { workspace = true }
|
||||
lfx-amazon = { workspace = true }
|
||||
lfx-cohere = { workspace = true }
|
||||
lfx-oracle = { workspace = true }
|
||||
lfx-firecrawl = { workspace = true }
|
||||
lfx-nextplaid = { workspace = true }
|
||||
# langflow-extensions:bundle-sources-end
|
||||
torch = { index = "pytorch-cpu" }
|
||||
torchvision = { index = "pytorch-cpu" }
|
||||
@ -100,6 +127,15 @@ members = [
|
||||
"src/bundles/arxiv",
|
||||
"src/bundles/ibm",
|
||||
"src/bundles/docling",
|
||||
"src/bundles/lfx-bundles",
|
||||
"src/bundles/datastax",
|
||||
"src/bundles/openai",
|
||||
"src/bundles/anthropic",
|
||||
"src/bundles/amazon",
|
||||
"src/bundles/cohere",
|
||||
"src/bundles/oracle",
|
||||
"src/bundles/firecrawl",
|
||||
"src/bundles/nextplaid",
|
||||
# langflow-extensions:bundle-members-end
|
||||
]
|
||||
|
||||
@ -112,15 +148,15 @@ Documentation = "https://docs.langflow.org"
|
||||
|
||||
[project.optional-dependencies]
|
||||
docling = [
|
||||
"lfx-docling[local]>=0.1.0",
|
||||
"lfx-docling[local]>=0.1.0,<1.0.0",
|
||||
]
|
||||
|
||||
docling-chunking = [
|
||||
"lfx-docling[chunking]>=0.1.0",
|
||||
"lfx-docling[chunking]>=0.1.0,<1.0.0",
|
||||
]
|
||||
|
||||
docling-image-description = [
|
||||
"lfx-docling[image-description]>=0.1.0",
|
||||
"lfx-docling[image-description]>=0.1.0,<1.0.0",
|
||||
]
|
||||
|
||||
audio = [
|
||||
@ -172,6 +208,8 @@ override-dependencies = [
|
||||
"mako>=1.3.12,<2.0.0", # CVE-2026-44307
|
||||
"urllib3>=2.7.0,<3.0.0", # CVE-2026-44431, CVE-2026-44432
|
||||
"python-liquid>=2.2.0,<3.0.0", # CVE-2026-45017
|
||||
# TODO: unpin torchvision once 0.27.1+df56172 isn't the prefered index
|
||||
"torchvision<0.27.1"
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
@ -349,16 +387,13 @@ external = ["RUF027"]
|
||||
"src/lfx/src/lfx/components/data/save_file.py" = [
|
||||
"SLF001", # Google API client private member access
|
||||
]
|
||||
"src/lfx/src/lfx/components/datastax/astradb_vectorstore.py" = [
|
||||
"S110", # Try-except-pass for optional metadata
|
||||
]
|
||||
"src/lfx/src/lfx/components/google/google_generative_ai_embeddings.py" = [
|
||||
"SLF001", # Google AI library private member access
|
||||
]
|
||||
"src/lfx/src/lfx/components/knowledge_bases/retrieval.py" = [
|
||||
"SLF001", # Chroma client private member access
|
||||
]
|
||||
"src/lfx/src/lfx/components/mongodb/mongodb_atlas.py" = [
|
||||
"src/bundles/lfx-bundles/src/lfx_bundles/mongodb/mongodb_atlas.py" = [
|
||||
"SLF001", # MongoDB collection private member access
|
||||
]
|
||||
"src/lfx/src/lfx/components/tools/{python_code_structured_tool.py,searxng.py}" = [
|
||||
|
||||
90
scripts/ci/check_components_frozen.py
Executable file
90
scripts/ci/check_components_frozen.py
Executable file
@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env python3
|
||||
"""CI gate: freeze the top-level provider directories under ``lfx/components/``.
|
||||
|
||||
After the bundle metapackage split (1.11), no NEW top-level subdirectory may be
|
||||
added to ``src/lfx/src/lfx/components/`` -- new providers go to the
|
||||
``lfx-bundles`` metapackage (``src/bundles/lfx-bundles/src/lfx_bundles/<provider>/``)
|
||||
or a graduated ``lfx-<provider>`` package, never in-tree.
|
||||
|
||||
This is an **additions-only** gate: it fails when the live listing contains a
|
||||
top-level directory that is not in the committed baseline
|
||||
(``frozen_component_dirs.txt``). Removals are allowed and never fail the gate --
|
||||
the bulk move (PR-6) replaces each moved provider with a near-empty import
|
||||
shim that keeps the directory present, and the M4 shim cleanup later removes
|
||||
those dirs, which only shrinks the set.
|
||||
|
||||
Stdlib-only by design so it runs on a bare runner without ``uv sync``.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
# scripts/ci/check_components_frozen.py -> repo root is two parents up.
|
||||
REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
COMPONENTS_DIR = REPO_ROOT / "src" / "lfx" / "src" / "lfx" / "components"
|
||||
BASELINE_FILE = Path(__file__).resolve().parent / "frozen_component_dirs.txt"
|
||||
|
||||
# Directories that are package machinery, not providers; never counted.
|
||||
_SKIP = {"__pycache__"}
|
||||
|
||||
|
||||
def _current_dirs() -> set[str]:
|
||||
"""Top-level provider directories present in the working tree.
|
||||
|
||||
A directory only counts as a provider when it ships an ``__init__.py`` --
|
||||
a stray empty directory (or one holding only ``__pycache__`` bytecode left
|
||||
behind by a branch switch) is not a provider and must not trip the gate.
|
||||
"""
|
||||
return {
|
||||
entry.name
|
||||
for entry in COMPONENTS_DIR.iterdir()
|
||||
if entry.is_dir()
|
||||
and entry.name not in _SKIP
|
||||
and not entry.name.startswith(".")
|
||||
and (entry / "__init__.py").is_file()
|
||||
}
|
||||
|
||||
|
||||
def _baseline_dirs() -> set[str]:
|
||||
"""The frozen baseline set (blank lines and ``#`` comments ignored)."""
|
||||
lines = BASELINE_FILE.read_text(encoding="utf-8").splitlines()
|
||||
return {line.strip() for line in lines if line.strip() and not line.lstrip().startswith("#")}
|
||||
|
||||
|
||||
def main() -> int:
|
||||
if not COMPONENTS_DIR.is_dir():
|
||||
print(f"::error:: components directory not found: {COMPONENTS_DIR}", file=sys.stderr)
|
||||
return 1
|
||||
if not BASELINE_FILE.is_file():
|
||||
print(f"::error:: frozen baseline not found: {BASELINE_FILE}", file=sys.stderr)
|
||||
return 1
|
||||
|
||||
current = _current_dirs()
|
||||
baseline = _baseline_dirs()
|
||||
|
||||
new_dirs = sorted(current - baseline)
|
||||
if new_dirs:
|
||||
print(
|
||||
"::error:: src/lfx/src/lfx/components/ is frozen: no new top-level provider "
|
||||
"directory may be added in-tree.\n"
|
||||
f" Offending new directories: {new_dirs}\n"
|
||||
" New providers go to the lfx-bundles metapackage "
|
||||
"(src/bundles/lfx-bundles/src/lfx_bundles/<provider>/) or a graduated "
|
||||
"lfx-<provider> package -- not src/lfx/src/lfx/components/.\n"
|
||||
f" If a directory is a deliberate exception, add it to {BASELINE_FILE.name}.",
|
||||
file=sys.stderr,
|
||||
)
|
||||
return 1
|
||||
|
||||
removed = sorted(baseline - current)
|
||||
if removed:
|
||||
# Informational only: shim cleanup (M4) legitimately shrinks the set.
|
||||
print(f"note: {len(removed)} baselined component dir(s) no longer present (allowed): {removed}")
|
||||
print(f"OK: {len(current)} top-level component dir(s); no additions beyond the frozen baseline.")
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user