mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-10 23:48:09 -05:00
Compare commits
38 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a4b9e281e | ||
|
|
fcf947df22 | ||
|
|
7be9941bc9 | ||
|
|
807014a5d2 | ||
|
|
aef1f18c1e | ||
|
|
368576b082 | ||
|
|
aace3066aa | ||
|
|
ef5b6999ab | ||
|
|
9df886d1e9 | ||
|
|
9991796661 | ||
|
|
095a15d7b5 | ||
|
|
a02016e247 | ||
|
|
8620ab255a | ||
|
|
47ddfb639e | ||
|
|
5d48c2780c | ||
|
|
38614fad79 | ||
|
|
6f32aea96b | ||
|
|
98e98496e8 | ||
|
|
659b46fa2f | ||
|
|
fb3d6d4c88 | ||
|
|
ec2cc82b72 | ||
|
|
274d5e3afc | ||
|
|
c552bb9c5f | ||
|
|
ad7b791242 | ||
|
|
ce4893a53c | ||
|
|
7f1ff7fd86 | ||
|
|
517f1a91b6 | ||
|
|
9b2490c4b1 | ||
|
|
dba7514350 | ||
|
|
e94de1dd26 | ||
|
|
a4e874b266 | ||
|
|
ec034f3fc7 | ||
|
|
e425d064c0 | ||
|
|
bcd1a2faf6 | ||
|
|
989a77261c | ||
|
|
71ae27b6cd | ||
|
|
5ab482127d | ||
|
|
b8bc632baa |
@@ -6,10 +6,9 @@ import Link from 'next/link'
|
||||
import { notFound } from 'next/navigation'
|
||||
import { StructuredData } from '@/components/structured-data'
|
||||
import { CodeBlock } from '@/components/ui/code-block'
|
||||
import { CopyPageButton } from '@/components/ui/copy-page-button'
|
||||
import { source } from '@/lib/source'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export default async function Page(props: { params: Promise<{ slug?: string[]; lang: string }> }) {
|
||||
const params = await props.params
|
||||
const page = source.getPage(params.slug, params.lang)
|
||||
@@ -193,8 +192,19 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
|
||||
component: <CustomFooter />,
|
||||
}}
|
||||
>
|
||||
<DocsTitle>{page.data.title}</DocsTitle>
|
||||
<DocsDescription>{page.data.description}</DocsDescription>
|
||||
<div className='relative'>
|
||||
<div className='absolute top-1 right-0'>
|
||||
<CopyPageButton
|
||||
content={`# ${page.data.title}
|
||||
|
||||
${page.data.description || ''}
|
||||
|
||||
${page.data.content || ''}`}
|
||||
/>
|
||||
</div>
|
||||
<DocsTitle>{page.data.title}</DocsTitle>
|
||||
<DocsDescription>{page.data.description}</DocsDescription>
|
||||
</div>
|
||||
<DocsBody>
|
||||
<MDX
|
||||
components={{
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
/* Shift the sidebar slightly left from the content edge for extra breathing room */
|
||||
--sidebar-shift: 90px;
|
||||
--sidebar-offset: max(0px, calc(var(--edge-gutter) - var(--sidebar-shift)));
|
||||
--toc-offset: var(--edge-gutter);
|
||||
/* Shift TOC slightly right to match sidebar spacing for symmetry */
|
||||
--toc-shift: 90px;
|
||||
--toc-offset: max(0px, calc(var(--edge-gutter) - var(--toc-shift)));
|
||||
/* Sidebar and TOC have 20px internal padding - navbar accounts for this directly */
|
||||
/* Extra gap between sidebar/TOC and the main text content */
|
||||
--content-gap: 1.75rem;
|
||||
@@ -50,9 +52,7 @@
|
||||
|
||||
/* Light mode navbar and search styling */
|
||||
:root:not(.dark) nav {
|
||||
background-color: hsla(0, 0%, 96%, 0.92) !important;
|
||||
backdrop-filter: blur(25px) saturate(180%) brightness(1.05) !important;
|
||||
-webkit-backdrop-filter: blur(25px) saturate(180%) brightness(1.05) !important;
|
||||
background-color: hsla(0, 0%, 96%, 0.85) !important;
|
||||
}
|
||||
|
||||
:root:not(.dark) nav button[type="button"] {
|
||||
@@ -66,6 +66,13 @@
|
||||
color: rgba(0, 0, 0, 0.6) !important;
|
||||
}
|
||||
|
||||
/* Dark mode navbar and search styling */
|
||||
:root.dark nav {
|
||||
background-color: hsla(0, 0%, 7.04%, 0.92) !important;
|
||||
backdrop-filter: blur(25px) saturate(180%) brightness(0.6) !important;
|
||||
-webkit-backdrop-filter: blur(25px) saturate(180%) brightness(0.6) !important;
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
Custom Sidebar Styling (Turborepo-inspired)
|
||||
============================================ */
|
||||
@@ -107,8 +114,21 @@ aside#nd-sidebar {
|
||||
aside#nd-sidebar {
|
||||
left: var(--sidebar-offset) !important;
|
||||
}
|
||||
[data-toc] {
|
||||
margin-right: var(--toc-offset) !important;
|
||||
/* TOC positioning - target all possible selectors */
|
||||
[data-toc],
|
||||
aside[data-toc],
|
||||
div[data-toc],
|
||||
.fd-toc,
|
||||
#nd-toc,
|
||||
nav[data-toc],
|
||||
aside:has([role="complementary"]) {
|
||||
right: var(--toc-offset) !important;
|
||||
}
|
||||
|
||||
/* Alternative TOC container targeting */
|
||||
[data-docs-page] > aside:last-child,
|
||||
main ~ aside {
|
||||
right: var(--toc-offset) !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,21 +11,20 @@ export function Navbar() {
|
||||
<nav
|
||||
className='sticky top-0 z-50 border-border/50 border-b'
|
||||
style={{
|
||||
backgroundColor: 'hsla(0, 0%, 7.04%, 0.92)',
|
||||
backdropFilter: 'blur(25px) saturate(180%) brightness(0.6)',
|
||||
WebkitBackdropFilter: 'blur(25px) saturate(180%) brightness(0.6)',
|
||||
backdropFilter: 'blur(25px) saturate(180%)',
|
||||
WebkitBackdropFilter: 'blur(25px) saturate(180%)',
|
||||
}}
|
||||
>
|
||||
{/* Desktop: Single row layout */}
|
||||
<div className='hidden h-16 w-full items-center lg:flex'>
|
||||
<div
|
||||
className='grid w-full grid-cols-[auto_1fr_auto] items-center'
|
||||
className='relative flex w-full items-center justify-between'
|
||||
style={{
|
||||
paddingLeft: 'calc(var(--sidebar-offset) + 20px)',
|
||||
paddingRight: 'calc(var(--toc-offset) + 20px)',
|
||||
paddingRight: 'calc(var(--toc-offset) + 60px)',
|
||||
}}
|
||||
>
|
||||
{/* Left cluster: translate by sidebar delta to align with sidebar edge */}
|
||||
{/* Left cluster: logo */}
|
||||
<div className='flex items-center'>
|
||||
<Link href='/' className='flex min-w-[100px] items-center'>
|
||||
<Image
|
||||
@@ -38,12 +37,12 @@ export function Navbar() {
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
{/* Center cluster: search */}
|
||||
<div className='flex flex-1 items-center justify-center pl-32'>
|
||||
{/* Center cluster: search - absolutely positioned to center */}
|
||||
<div className='-translate-x-1/2 absolute left-1/2 flex items-center justify-center'>
|
||||
<SearchTrigger />
|
||||
</div>
|
||||
|
||||
{/* Right cluster aligns with TOC edge using the same right gutter */}
|
||||
{/* Right cluster aligns with TOC edge */}
|
||||
<div className='flex items-center gap-4'>
|
||||
<Link
|
||||
href='https://sim.ai'
|
||||
|
||||
42
apps/docs/components/ui/copy-page-button.tsx
Normal file
42
apps/docs/components/ui/copy-page-button.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
'use client'
|
||||
|
||||
import { useState } from 'react'
|
||||
import { Check, Copy } from 'lucide-react'
|
||||
|
||||
interface CopyPageButtonProps {
|
||||
content: string
|
||||
}
|
||||
|
||||
export function CopyPageButton({ content }: CopyPageButtonProps) {
|
||||
const [copied, setCopied] = useState(false)
|
||||
|
||||
const handleCopy = async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(content)
|
||||
setCopied(true)
|
||||
setTimeout(() => setCopied(false), 2000)
|
||||
} catch (err) {
|
||||
console.error('Failed to copy:', err)
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<button
|
||||
onClick={handleCopy}
|
||||
className='flex items-center gap-1.5 rounded-lg border border-border/40 bg-background px-2.5 py-1.5 text-muted-foreground/60 text-sm transition-all hover:border-border hover:bg-accent/50 hover:text-muted-foreground'
|
||||
aria-label={copied ? 'Copied to clipboard' : 'Copy page content'}
|
||||
>
|
||||
{copied ? (
|
||||
<>
|
||||
<Check className='h-4 w-4' />
|
||||
<span>Copied</span>
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<Copy className='h-4 w-4' />
|
||||
<span>Copy page</span>
|
||||
</>
|
||||
)}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
@@ -16,7 +16,7 @@ Blöcke sind die Bausteine, die du miteinander verbindest, um KI-Workflows zu er
|
||||
|
||||
## Grundlegende Blocktypen
|
||||
|
||||
Sim bietet sieben grundlegende Blocktypen, die die wesentlichen Funktionen von KI-Workflows abdecken:
|
||||
Sim bietet wesentliche Blocktypen, die die Kernfunktionen von KI-Workflows abdecken:
|
||||
|
||||
### Verarbeitungsblöcke
|
||||
- **[Agent](/blocks/agent)** - Chatte mit KI-Modellen (OpenAI, Anthropic, Google, lokale Modelle)
|
||||
@@ -28,16 +28,20 @@ Sim bietet sieben grundlegende Blocktypen, die die wesentlichen Funktionen von K
|
||||
- **[Router](/blocks/router)** - Nutze KI, um Anfragen intelligent auf verschiedene Pfade zu leiten
|
||||
- **[Evaluator](/blocks/evaluator)** - Bewerte und beurteile die Inhaltsqualität mit KI
|
||||
|
||||
### Ablaufsteuerungsblöcke
|
||||
- **[Variablen](/blocks/variables)** - Workflow-bezogene Variablen setzen und verwalten
|
||||
- **[Warten](/blocks/wait)** - Workflow-Ausführung für eine bestimmte Zeitverzögerung pausieren
|
||||
|
||||
### Ausgabeblöcke
|
||||
- **[Response](/blocks/response)** - Formatiere und gib endgültige Ergebnisse aus deinem Workflow zurück
|
||||
- **[Antwort](/blocks/response)** - Formatieren und Zurückgeben der endgültigen Ergebnisse aus Ihrem Workflow
|
||||
|
||||
## Wie Blöcke funktionieren
|
||||
|
||||
Jeder Block hat drei Hauptkomponenten:
|
||||
|
||||
**Eingaben**: Daten, die in den Block von anderen Blöcken oder Benutzereingaben kommen
|
||||
**Konfiguration**: Einstellungen, die das Verhalten des Blocks steuern
|
||||
**Ausgaben**: Daten, die der Block für andere Blöcke produziert
|
||||
**Konfiguration**: Einstellungen, die steuern, wie der Block sich verhält
|
||||
**Ausgaben**: Daten, die der Block für andere Blöcke zur Verwendung erzeugt
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
@@ -56,7 +60,7 @@ Jeder Block hat drei Hauptkomponenten:
|
||||
Sie erstellen Workflows, indem Sie Blöcke miteinander verbinden. Die Ausgabe eines Blocks wird zur Eingabe eines anderen:
|
||||
|
||||
- **Ziehen zum Verbinden**: Ziehen Sie von einem Ausgabeport zu einem Eingabeport
|
||||
- **Mehrfachverbindungen**: Eine Ausgabe kann mit mehreren Eingängen verbunden werden
|
||||
- **Mehrfachverbindungen**: Eine Ausgabe kann mit mehreren Eingaben verbunden werden
|
||||
- **Verzweigende Pfade**: Einige Blöcke können basierend auf Bedingungen zu verschiedenen Pfaden weiterleiten
|
||||
|
||||
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
|
||||
@@ -73,7 +77,7 @@ User Input → Agent → Function → Response
|
||||
```
|
||||
|
||||
### Bedingte Verzweigung
|
||||
Verwenden Sie Bedingungsblöcke oder Router-Blöcke, um verschiedene Pfade zu erstellen:
|
||||
Verwenden Sie Bedingung- oder Router-Blöcke, um verschiedene Pfade zu erstellen:
|
||||
|
||||
```
|
||||
User Input → Router → Agent A (for questions)
|
||||
@@ -93,37 +97,43 @@ Agent → Evaluator → Condition → Response (if good)
|
||||
Jeder Blocktyp hat spezifische Konfigurationsoptionen:
|
||||
|
||||
**Alle Blöcke**:
|
||||
- Ein-/Ausgabeverbindungen
|
||||
- Eingabe-/Ausgabeverbindungen
|
||||
- Fehlerbehandlungsverhalten
|
||||
- Zeitüberschreitungseinstellungen für die Ausführung
|
||||
- Einstellungen für Ausführungs-Timeout
|
||||
|
||||
**KI-Blöcke** (Agent, Router, Evaluator):
|
||||
- Modellauswahl (OpenAI, Anthropic, Google, lokal)
|
||||
- API-Schlüssel und Authentifizierung
|
||||
- Temperature und andere Modellparameter
|
||||
- Temperatur und andere Modellparameter
|
||||
- Systemaufforderungen und Anweisungen
|
||||
|
||||
**Logikblöcke** (Bedingung, Funktion):
|
||||
**Logik-Blöcke** (Bedingung, Funktion):
|
||||
- Benutzerdefinierte Ausdrücke oder Code
|
||||
- Variablenreferenzen
|
||||
- Einstellungen für die Ausführungsumgebung
|
||||
- Einstellungen für Ausführungsumgebung
|
||||
|
||||
**Integrationsblöcke** (API, Antwort):
|
||||
**Integrations-Blöcke** (API, Response):
|
||||
- Endpunktkonfiguration
|
||||
- Header und Authentifizierung
|
||||
- Anfrage-/Antwortformatierung
|
||||
|
||||
<Cards>
|
||||
<Card title="Agent Block" href="/blocks/agent">
|
||||
Verbindung zu KI-Modellen herstellen und intelligente Antworten erzeugen
|
||||
<Card title="Agent-Block" href="/blocks/agent">
|
||||
Verbindung zu KI-Modellen herstellen und intelligente Antworten erstellen
|
||||
</Card>
|
||||
<Card title="Function Block" href="/blocks/function">
|
||||
<Card title="Funktions-Block" href="/blocks/function">
|
||||
Benutzerdefinierten Code ausführen, um Daten zu verarbeiten und zu transformieren
|
||||
</Card>
|
||||
<Card title="API Block" href="/blocks/api">
|
||||
<Card title="API-Block" href="/blocks/api">
|
||||
Integration mit externen Diensten und APIs
|
||||
</Card>
|
||||
<Card title="Condition Block" href="/blocks/condition">
|
||||
<Card title="Bedingungs-Block" href="/blocks/condition">
|
||||
Verzweigende Logik basierend auf Datenbewertung erstellen
|
||||
</Card>
|
||||
<Card title="Variablen-Block" href="/blocks/variables">
|
||||
Workflow-bezogene Variablen setzen und verwalten
|
||||
</Card>
|
||||
<Card title="Warte-Block" href="/blocks/wait">
|
||||
Workflow-Ausführung für bestimmte Zeitverzögerungen pausieren
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
Der Loop-Block ist ein Container-Block in Sim, der es ermöglicht, iterative Workflows zu erstellen, indem eine Gruppe von Blöcken wiederholt ausgeführt wird. Loops ermöglichen iterative Verarbeitung in deinen Workflows.
|
||||
|
||||
Der Loop-Block unterstützt zwei Arten der Iteration:
|
||||
Der Schleifenblock unterstützt vier Arten der Iteration:
|
||||
|
||||
<Callout type="info">
|
||||
Loop-Blöcke sind Container-Knoten, die andere Blöcke enthalten können. Die Blöcke innerhalb einer Schleife werden basierend auf deiner Konfiguration mehrfach ausgeführt.
|
||||
@@ -27,10 +27,10 @@ Der Loop-Block ermöglicht dir:
|
||||
<strong>Operationen wiederholen</strong>: Blöcke eine festgelegte Anzahl von Malen ausführen
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Sequentielle Verarbeitung</strong>: Datentransformation in geordneten Iterationen durchführen
|
||||
<strong>Auf Bedingungen basierte Schleifen</strong>: Ausführung fortsetzen, während oder bis eine Bedingung erfüllt ist
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Ergebnisse aggregieren</strong>: Ausgaben aus allen Schleifeniterationen sammeln
|
||||
<strong>Ergebnisse aggregieren</strong>: Ausgaben aus allen Schleifendurchläufen sammeln
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -47,23 +47,23 @@ Der Loop-Block führt enthaltene Blöcke durch sequentielle Iteration aus:
|
||||
|
||||
### Schleifentyp
|
||||
|
||||
Wähle zwischen zwei Arten von Schleifen:
|
||||
Wähle zwischen vier Arten von Schleifen:
|
||||
|
||||
<Tabs items={['For Loop', 'ForEach Loop']}>
|
||||
<Tabs items={['For-Schleife', 'ForEach-Schleife', 'While-Schleife', 'Do-While-Schleife']}>
|
||||
<Tab>
|
||||
**For Loop (Iterationen)** - Eine numerische Schleife, die eine feste Anzahl von Malen ausgeführt wird:
|
||||
**For-Schleife (Iterationen)** - Eine numerische Schleife, die eine festgelegte Anzahl von Malen ausgeführt wird:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-1.png"
|
||||
alt="For Loop mit Iterationen"
|
||||
alt="For-Schleife mit Iterationen"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Verwende diese Option, wenn du eine Operation eine bestimmte Anzahl von Malen wiederholen musst.
|
||||
Verwende diese, wenn du eine Operation eine bestimmte Anzahl von Malen wiederholen musst.
|
||||
|
||||
|
||||
```
|
||||
@@ -100,6 +100,58 @@ Wähle zwischen zwei Arten von Schleifen:
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
**While-Schleife (Bedingungsbasiert)** - Wird weiter ausgeführt, solange eine Bedingung als wahr ausgewertet wird:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="While-Schleife mit Bedingung"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Verwende diese, wenn du eine Schleife benötigst, die läuft, bis eine bestimmte Bedingung erfüllt ist. Die Bedingung wird **vor** jeder Iteration überprüft.
|
||||
|
||||
|
||||
```
|
||||
Example: While <variable.i> < 10
|
||||
- Check condition → Execute if true
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Execute if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
**Do-While-Schleife (Bedingungsbasiert)** - Wird mindestens einmal ausgeführt und dann fortgesetzt, solange eine Bedingung wahr ist:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="Do-While-Schleife mit Bedingung"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Verwende diese, wenn du mindestens eine Ausführung benötigst und dann eine Schleife, bis eine Bedingung erfüllt ist. Die Bedingung wird **nach** jeder Iteration überprüft.
|
||||
|
||||
|
||||
```
|
||||
Example: Do-while <variable.i> < 10
|
||||
- Execute blocks
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Continue if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Wie man Schleifen verwendet
|
||||
@@ -113,9 +165,9 @@ Wähle zwischen zwei Arten von Schleifen:
|
||||
|
||||
### Auf Ergebnisse zugreifen
|
||||
|
||||
Nach Abschluss einer Schleife kannst du auf aggregierte Ergebnisse zugreifen:
|
||||
Nach Abschluss einer Schleife können Sie auf die aggregierten Ergebnisse zugreifen:
|
||||
|
||||
- **`<loop.results>`**: Array von Ergebnissen aus allen Schleifendurchläufen
|
||||
- **`<loop.results>`**: Array mit Ergebnissen aus allen Schleifendurchläufen
|
||||
|
||||
## Beispielanwendungsfälle
|
||||
|
||||
@@ -143,17 +195,30 @@ Nach Abschluss einer Schleife kannst du auf aggregierte Ergebnisse zugreifen:
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Zähler mit While-Schleife
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Szenario: Elemente mit zählerbasierter Schleife verarbeiten</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Workflow-Variable initialisieren: `i = 0`</li>
|
||||
<li>While-Schleife mit Bedingung: `<variable.i>` \< 10</li>
|
||||
<li>Innerhalb der Schleife: Agent verarbeitet Element am Index `<variable.i>`</li>
|
||||
<li>Innerhalb der Schleife: Variable erhöht `i = <variable.i> + 1`</li>
|
||||
<li>Schleife wird fortgesetzt, solange i kleiner als 10 ist</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Erweiterte Funktionen
|
||||
|
||||
### Einschränkungen
|
||||
|
||||
<Callout type="warning">
|
||||
Container-Blöcke (Schleifen und Parallele) können nicht ineinander verschachtelt werden. Das bedeutet:
|
||||
- Du kannst keinen Schleifenblock in einen anderen Schleifenblock platzieren
|
||||
- Du kannst keinen Parallelblock in einen Schleifenblock platzieren
|
||||
- Du kannst keinen Container-Block in einen anderen Container-Block platzieren
|
||||
- Sie können keinen Schleifenblock in einem anderen Schleifenblock platzieren
|
||||
- Sie können keinen Parallelblock in einem Schleifenblock platzieren
|
||||
- Sie können keinen Container-Block in einem anderen Container-Block platzieren
|
||||
|
||||
Wenn du mehrdimensionale Iterationen benötigst, erwäge eine Umstrukturierung deines Workflows, um sequentielle Schleifen zu verwenden oder Daten in Stufen zu verarbeiten.
|
||||
Wenn Sie mehrdimensionale Iterationen benötigen, sollten Sie Ihren Workflow umstrukturieren, um sequentielle Schleifen zu verwenden oder Daten in Stufen zu verarbeiten.
|
||||
</Callout>
|
||||
|
||||
<Callout type="info">
|
||||
@@ -162,17 +227,20 @@ Nach Abschluss einer Schleife kannst du auf aggregierte Ergebnisse zugreifen:
|
||||
|
||||
## Eingaben und Ausgaben
|
||||
|
||||
<Tabs items={['Konfiguration', 'Variablen', 'Ergebnisse']}>
|
||||
<Tabs items={['Configuration', 'Variables', 'Results']}>
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>Schleifentyp</strong>: Wählen Sie zwischen 'for' oder 'forEach'
|
||||
<strong>Schleifentyp</strong>: Wählen Sie zwischen 'for', 'forEach', 'while' oder 'doWhile'
|
||||
</li>
|
||||
<li>
|
||||
<strong>Iterationen</strong>: Anzahl der Ausführungen (für for-Schleifen)
|
||||
</li>
|
||||
<li>
|
||||
<strong>Sammlung</strong>: Array oder Objekt zum Durchlaufen (für forEach-Schleifen)
|
||||
<strong>Sammlung</strong>: Array oder Objekt, über das iteriert werden soll (forEach-Schleifen)
|
||||
</li>
|
||||
<li>
|
||||
<strong>Bedingung</strong>: Boolescher Ausdruck zur Auswertung (while/do-while-Schleifen)
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
@@ -204,8 +272,8 @@ Nach Abschluss einer Schleife kannst du auf aggregierte Ergebnisse zugreifen:
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Best Practices
|
||||
## Bewährte Praktiken
|
||||
|
||||
- **Setzen Sie vernünftige Grenzen**: Halten Sie die Anzahl der Iterationen in einem vernünftigen Rahmen, um lange Ausführungszeiten zu vermeiden
|
||||
- **Verwenden Sie ForEach für Sammlungen**: Verwenden Sie ForEach statt For-Schleifen, wenn Sie Arrays oder Objekte verarbeiten
|
||||
- **Behandeln Sie Fehler angemessen**: Erwägen Sie, Fehlerbehandlung innerhalb von Schleifen einzubauen, um robuste Workflows zu gewährleisten
|
||||
- **Vernünftige Grenzen setzen**: Halten Sie die Anzahl der Iterationen in einem vernünftigen Rahmen, um lange Ausführungszeiten zu vermeiden
|
||||
- **ForEach für Sammlungen verwenden**: Verwenden Sie ForEach statt For-Schleifen, wenn Sie Arrays oder Objekte verarbeiten
|
||||
- **Fehler elegant behandeln**: Erwägen Sie, Fehlerbehandlung innerhalb von Schleifen einzubauen, um robuste Workflows zu gewährleisten
|
||||
|
||||
123
apps/docs/content/docs/de/blocks/variables.mdx
Normal file
123
apps/docs/content/docs/de/blocks/variables.mdx
Normal file
@@ -0,0 +1,123 @@
|
||||
---
|
||||
title: Variablen
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
Der Variablen-Block aktualisiert Workflow-Variablen während der Ausführung. Variablen müssen zuerst im Variablen-Bereich deines Workflows initialisiert werden, dann kannst du diesen Block verwenden, um ihre Werte während der Ausführung deines Workflows zu aktualisieren.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/variables.png"
|
||||
alt="Variablen-Block"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Callout>
|
||||
Greife überall in deinem Workflow auf Variablen zu, indem du die `<variable.variableName>` Syntax verwendest.
|
||||
</Callout>
|
||||
|
||||
## Überblick
|
||||
|
||||
Der Variablen-Block ermöglicht dir:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Workflow-Variablen aktualisieren</strong>: Ändere Variablenwerte während der Ausführung
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Dynamische Daten speichern</strong>: Erfasse Block-Ausgaben in Variablen
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Zustand beibehalten</strong>: Verfolge Zähler, Flags und Zwischenergebnisse
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Wie man Variablen verwendet
|
||||
|
||||
### 1. Im Workflow-Variablenbereich initialisieren
|
||||
|
||||
Erstelle zunächst deine Variablen im Variablen-Bereich des Workflows (zugänglich über die Workflow-Einstellungen):
|
||||
|
||||
```
|
||||
customerEmail = ""
|
||||
retryCount = 0
|
||||
currentStatus = "pending"
|
||||
```
|
||||
|
||||
### 2. Mit dem Variablen-Block aktualisieren
|
||||
|
||||
Verwende den Variablen-Block, um diese Werte während der Ausführung zu aktualisieren:
|
||||
|
||||
```
|
||||
customerEmail = <api.email>
|
||||
retryCount = <variable.retryCount> + 1
|
||||
currentStatus = "processing"
|
||||
```
|
||||
|
||||
### 3. Überall zugreifen
|
||||
|
||||
Referenziere Variablen in jedem Block:
|
||||
|
||||
```
|
||||
Agent prompt: "Send email to <variable.customerEmail>"
|
||||
Condition: <variable.retryCount> < 5
|
||||
API body: {"status": "<variable.currentStatus>"}
|
||||
```
|
||||
|
||||
## Beispielanwendungsfälle
|
||||
|
||||
### Schleifenzähler und Zustand
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Szenario: Fortschritt durch Schleifeniterationen verfolgen</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Im Workflow initialisieren: `itemsProcessed = 0`, `lastResult = ""`</li>
|
||||
<li>Schleife iteriert über Elemente</li>
|
||||
<li>Innerhalb der Schleife: Agent verarbeitet aktuelles Element</li>
|
||||
<li>Innerhalb der Schleife: Variablen aktualisieren `itemsProcessed = <variable.itemsProcessed> + 1`</li>
|
||||
<li>Innerhalb der Schleife: Variablen aktualisieren `lastResult = <agent.content>`</li>
|
||||
<li>Nächste Iteration: Auf `<variable.lastResult>` zugreifen, um mit aktuellem Ergebnis zu vergleichen</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Wiederholungslogik
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Szenario: API-Wiederholungsversuche verfolgen</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Im Workflow initialisieren: `retryCount = 0`</li>
|
||||
<li>API-Block versucht Anfrage</li>
|
||||
<li>Bei Fehlschlag erhöht Variablen: `retryCount = <variable.retryCount> + 1`</li>
|
||||
<li>Bedingung prüft, ob `<variable.retryCount>` \< 3 ist, um zu wiederholen oder abzubrechen</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Dynamische Konfiguration
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Szenario: Benutzerkontext für Workflow speichern</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Im Workflow initialisieren: `userId = ""`, `userTier = ""`</li>
|
||||
<li>API ruft Benutzerprofil ab</li>
|
||||
<li>Variablen speichern: `userId = <api.id>`, `userTier = <api.tier>`</li>
|
||||
<li>Agent personalisiert Antwort mit `<variable.userTier>`</li>
|
||||
<li>API verwendet `<variable.userId>` für Logging</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Ausgaben
|
||||
|
||||
- **`<variables.assignments>`**: JSON-Objekt mit allen Variablenzuweisungen aus diesem Block
|
||||
|
||||
## Bewährte Praktiken
|
||||
|
||||
- **Im Workflow-Einstellungen initialisieren**: Erstellen Sie Variablen immer im Workflow-Variablenbereich, bevor Sie sie verwenden
|
||||
- **Dynamisch aktualisieren**: Verwenden Sie Variablenblöcke, um Werte basierend auf Blockausgaben oder Berechnungen zu aktualisieren
|
||||
- **In Schleifen verwenden**: Perfekt für die Zustandsverfolgung über Iterationen hinweg
|
||||
- **Beschreibend benennen**: Verwenden Sie klare Namen wie `currentIndex`, `totalProcessed` oder `lastError`
|
||||
99
apps/docs/content/docs/de/blocks/wait.mdx
Normal file
99
apps/docs/content/docs/de/blocks/wait.mdx
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: Warten
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
Der Warten-Block pausiert deinen Workflow für eine bestimmte Zeit, bevor er mit dem nächsten Block fortfährt. Verwende ihn, um Verzögerungen zwischen Aktionen einzufügen, API-Ratenbegrenzungen einzuhalten oder Operationen zeitlich zu verteilen.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/wait.png"
|
||||
alt="Warten-Block"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
## Übersicht
|
||||
|
||||
Mit dem Warten-Block kannst du:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Zeitverzögerungen hinzufügen</strong>: Ausführung zwischen Workflow-Schritten pausieren
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Ratenbegrenzungen einhalten</strong>: API-Aufrufe zeitlich verteilen, um innerhalb der Limits zu bleiben
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Sequenzen planen</strong>: Zeitgesteuerte Workflows mit Verzögerungen zwischen Aktionen erstellen
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Konfiguration
|
||||
|
||||
### Wartezeit
|
||||
|
||||
Gib die Dauer der Ausführungspause ein:
|
||||
- **Eingabe**: Positive Zahl
|
||||
- **Maximum**: 600 Sekunden (10 Minuten) oder 10 Minuten
|
||||
|
||||
### Einheit
|
||||
|
||||
Wähle die Zeiteinheit:
|
||||
- **Sekunden**: Für kurze, präzise Verzögerungen
|
||||
- **Minuten**: Für längere Pausen
|
||||
|
||||
<Callout type="info">
|
||||
Warten-Blöcke können durch Stoppen des Workflows abgebrochen werden. Die maximale Wartezeit beträgt 10 Minuten.
|
||||
</Callout>
|
||||
|
||||
## Ausgaben
|
||||
|
||||
- **`<wait.waitDuration>`**: Die Wartezeit in Millisekunden
|
||||
- **`<wait.status>`**: Status des Wartens ('waiting', 'completed' oder 'cancelled')
|
||||
|
||||
## Beispielanwendungsfälle
|
||||
|
||||
### API-Ratenbegrenzung
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Szenario: Innerhalb der API-Ratenbegrenzungen bleiben</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>API-Block macht erste Anfrage</li>
|
||||
<li>Warten-Block pausiert für 2 Sekunden</li>
|
||||
<li>API-Block macht zweite Anfrage</li>
|
||||
<li>Prozess läuft weiter, ohne Ratenbegrenzungen zu überschreiten</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Zeitgesteuerte Benachrichtigungen
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Szenario: Folgenachrichten senden</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Funktion sendet erste E-Mail</li>
|
||||
<li>Warten-Block pausiert für 5 Minuten</li>
|
||||
<li>Funktion sendet Folge-E-Mail</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Verarbeitungsverzögerungen
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Szenario: Warten auf externes System</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>API-Block löst Job im externen System aus</li>
|
||||
<li>Warte-Block pausiert für 30 Sekunden</li>
|
||||
<li>API-Block prüft den Abschlussstatus des Jobs</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Bewährte Praktiken
|
||||
|
||||
- **Halte Wartezeiten angemessen**: Verwende Warten für Verzögerungen bis zu 10 Minuten. Für längere Verzögerungen solltest du geplante Workflows in Betracht ziehen
|
||||
- **Überwache die Ausführungszeit**: Denke daran, dass Wartezeiten die Gesamtdauer des Workflows verlängern
|
||||
@@ -207,18 +207,18 @@ Populate Clay with data from a JSON file. Enables direct communication and notif
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `webhookURL` | string | Yes | The webhook URL to populate |
|
||||
| `data` | json | Yes | The data to populate |
|
||||
| `authToken` | string | Yes | Auth token for Clay webhook authentication |
|
||||
| `webhookURL` | string | Ja | Die Webhook-URL, die befüllt werden soll |
|
||||
| `data` | json | Ja | Die Daten, die befüllt werden sollen |
|
||||
| `authToken` | string | Nein | Optionaler Auth-Token für die Clay-Webhook-Authentifizierung \(die meisten Webhooks benötigen dies nicht\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | json | Clay populate operation results including response data from Clay webhook |
|
||||
| `data` | json | Antwortdaten vom Clay-Webhook |
|
||||
| `metadata` | object | Webhook-Antwort-Metadaten |
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="discord"
|
||||
color="#E0E0E0"
|
||||
color="#5865F2"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
@@ -72,6 +72,7 @@ Eine Nachricht an einen Discord-Kanal senden
|
||||
| `channelId` | string | Ja | Die Discord-Kanal-ID, an die die Nachricht gesendet werden soll |
|
||||
| `content` | string | Nein | Der Textinhalt der Nachricht |
|
||||
| `serverId` | string | Ja | Die Discord-Server-ID \(Guild-ID\) |
|
||||
| `files` | file[] | Nein | Dateien, die an die Nachricht angehängt werden sollen |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
|
||||
@@ -85,10 +85,11 @@ Eine Datei zu Google Drive hochladen
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `fileName` | string | Ja | Der Name der hochzuladenden Datei |
|
||||
| `content` | string | Ja | Der Inhalt der hochzuladenden Datei |
|
||||
| `mimeType` | string | Nein | Der MIME-Typ der hochzuladenden Datei |
|
||||
| `file` | file | Nein | Binärdatei zum Hochladen (UserFile-Objekt) |
|
||||
| `content` | string | Nein | Textinhalt zum Hochladen (verwenden Sie entweder diesen ODER file, nicht beides) |
|
||||
| `mimeType` | string | Nein | Der MIME-Typ der hochzuladenden Datei (wird automatisch aus der Datei erkannt, wenn nicht angegeben) |
|
||||
| `folderSelector` | string | Nein | Wählen Sie den Ordner aus, in den die Datei hochgeladen werden soll |
|
||||
| `folderId` | string | Nein | Die ID des Ordners, in den die Datei hochgeladen werden soll \(interne Verwendung\) |
|
||||
| `folderId` | string | Nein | Die ID des Ordners, in den die Datei hochgeladen werden soll (interne Verwendung) |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ Inhalte in einem Microsoft Teams-Chat schreiben oder aktualisieren
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `chatId` | string | Ja | Die ID des Chats, in den geschrieben werden soll |
|
||||
| `content` | string | Ja | Der Inhalt, der in die Nachricht geschrieben werden soll |
|
||||
| `files` | file[] | Nein | Dateien, die der Nachricht angehängt werden sollen |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
@@ -181,9 +182,10 @@ Schreiben oder senden einer Nachricht an einen Microsoft Teams-Kanal
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `teamId` | string | Ja | Die ID des Teams, an das geschrieben werden soll |
|
||||
| `channelId` | string | Ja | Die ID des Kanals, an den geschrieben werden soll |
|
||||
| `content` | string | Ja | Der Inhalt, der an den Kanal gesendet werden soll |
|
||||
| `teamId` | string | Ja | Die ID des Teams, in das geschrieben werden soll |
|
||||
| `channelId` | string | Ja | Die ID des Kanals, in den geschrieben werden soll |
|
||||
| `content` | string | Ja | Der Inhalt, der in den Kanal geschrieben werden soll |
|
||||
| `files` | file[] | Nein | Dateien, die der Nachricht angehängt werden sollen |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ In Sim ermöglicht die OneDrive-Integration Ihren Agenten die direkte Interaktio
|
||||
|
||||
## Nutzungsanweisungen
|
||||
|
||||
Integriert OneDrive in den Workflow. Kann Dateien erstellen, hochladen und auflisten. Erfordert OAuth.
|
||||
OneDrive in den Workflow integrieren. Kann Text- und Excel-Dateien erstellen, Dateien hochladen und Dateien auflisten.
|
||||
|
||||
## Tools
|
||||
|
||||
@@ -63,8 +63,10 @@ Eine Datei auf OneDrive hochladen
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `fileName` | string | Ja | Der Name der hochzuladenden Datei |
|
||||
| `content` | string | Ja | Der Inhalt der hochzuladenden Datei |
|
||||
| `folderSelector` | string | Nein | Wählen Sie den Ordner aus, in den die Datei hochgeladen werden soll |
|
||||
| `file` | file | Nein | Die hochzuladende Datei \(binär\) |
|
||||
| `content` | string | Nein | Der hochzuladende Textinhalt \(falls keine Datei bereitgestellt wird\) |
|
||||
| `mimeType` | string | Nein | Der MIME-Typ der zu erstellenden Datei \(z.B. text/plain für .txt, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet für .xlsx\) |
|
||||
| `folderSelector` | string | Nein | Ordner auswählen, in den die Datei hochgeladen werden soll |
|
||||
| `manualFolderId` | string | Nein | Manuell eingegebene Ordner-ID \(erweiterter Modus\) |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
@@ -154,10 +154,11 @@ E-Mails über Outlook versenden
|
||||
| `to` | string | Ja | E-Mail-Adresse des Empfängers |
|
||||
| `subject` | string | Ja | E-Mail-Betreff |
|
||||
| `body` | string | Ja | E-Mail-Inhalt |
|
||||
| `replyToMessageId` | string | Nein | Nachrichten-ID für Antworten \(für Threading\) |
|
||||
| `replyToMessageId` | string | Nein | Nachrichten-ID, auf die geantwortet wird \(für Threading\) |
|
||||
| `conversationId` | string | Nein | Konversations-ID für Threading |
|
||||
| `cc` | string | Nein | CC-Empfänger \(durch Kommas getrennt\) |
|
||||
| `bcc` | string | Nein | BCC-Empfänger \(durch Kommas getrennt\) |
|
||||
| `attachments` | file[] | Nein | Dateien, die an die E-Mail angehängt werden sollen |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
@@ -177,10 +178,11 @@ E-Mails mit Outlook erstellen
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `to` | string | Ja | E-Mail-Adresse des Empfängers |
|
||||
| `subject` | string | Ja | Betreff der E-Mail |
|
||||
| `body` | string | Ja | Inhalt der E-Mail |
|
||||
| `cc` | string | Nein | CC-Empfänger \(durch Komma getrennt\) |
|
||||
| `bcc` | string | Nein | BCC-Empfänger \(durch Komma getrennt\) |
|
||||
| `subject` | string | Ja | E-Mail-Betreff |
|
||||
| `body` | string | Ja | E-Mail-Inhalt |
|
||||
| `cc` | string | Nein | CC-Empfänger \(durch Kommas getrennt\) |
|
||||
| `bcc` | string | Nein | BCC-Empfänger \(durch Kommas getrennt\) |
|
||||
| `attachments` | file[] | Nein | Dateien, die an den E-Mail-Entwurf angehängt werden sollen |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
|
||||
@@ -139,7 +139,8 @@ Suche nach ähnlichen Vektoren in einer Qdrant-Sammlung
|
||||
| `collection` | string | Ja | Sammlungsname |
|
||||
| `vector` | array | Ja | Zu suchender Vektor |
|
||||
| `limit` | number | Nein | Anzahl der zurückzugebenden Ergebnisse |
|
||||
| `filter` | object | Nein | Filter für die Suche |
|
||||
| `filter` | object | Nein | Auf die Suche anzuwendender Filter |
|
||||
| `search_return_data` | string | Nein | Aus der Suche zurückzugebende Daten |
|
||||
| `with_payload` | boolean | Nein | Payload in Antwort einschließen |
|
||||
| `with_vector` | boolean | Nein | Vektor in Antwort einschließen |
|
||||
|
||||
@@ -161,7 +162,8 @@ Punkte anhand der ID aus einer Qdrant-Sammlung abrufen
|
||||
| `url` | string | Ja | Qdrant-Basis-URL |
|
||||
| `apiKey` | string | Nein | Qdrant-API-Schlüssel \(optional\) |
|
||||
| `collection` | string | Ja | Sammlungsname |
|
||||
| `ids` | array | Ja | Array von abzurufenden Punkt-IDs |
|
||||
| `ids` | array | Ja | Array von Punkt-IDs zum Abrufen |
|
||||
| `fetch_return_data` | string | Nein | Aus dem Abruf zurückzugebende Daten |
|
||||
| `with_payload` | boolean | Nein | Payload in Antwort einschließen |
|
||||
| `with_vector` | boolean | Nein | Vektor in Antwort einschließen |
|
||||
|
||||
|
||||
@@ -199,6 +199,26 @@ Ein neues Element zu einer SharePoint-Liste hinzufügen
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | object | Erstelltes SharePoint-Listenelement |
|
||||
|
||||
### `sharepoint_upload_file`
|
||||
|
||||
Dateien in eine SharePoint-Dokumentenbibliothek hochladen
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `siteId` | string | Nein | Die ID der SharePoint-Website |
|
||||
| `driveId` | string | Nein | Die ID der Dokumentenbibliothek (Laufwerk). Wenn nicht angegeben, wird das Standardlaufwerk verwendet. |
|
||||
| `folderPath` | string | Nein | Optionaler Ordnerpfad innerhalb der Dokumentenbibliothek (z.B. /Documents/Subfolder) |
|
||||
| `fileName` | string | Nein | Optional: Überschreiben des hochgeladenen Dateinamens |
|
||||
| `files` | file[] | Nein | Dateien, die nach SharePoint hochgeladen werden sollen |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `uploadedFiles` | array | Array von hochgeladenen Dateiobjekten |
|
||||
|
||||
## Hinweise
|
||||
|
||||
- Kategorie: `tools`
|
||||
|
||||
@@ -78,7 +78,8 @@ Senden Sie Nachrichten an Slack-Kanäle oder Benutzer über die Slack-API. Unter
|
||||
| `authMethod` | string | Nein | Authentifizierungsmethode: oauth oder bot_token |
|
||||
| `botToken` | string | Nein | Bot-Token für Custom Bot |
|
||||
| `channel` | string | Ja | Ziel-Slack-Kanal \(z.B. #general\) |
|
||||
| `text` | string | Ja | Zu sendender Nachrichtentext \(unterstützt Slack mrkdwn-Formatierung\) |
|
||||
| `text` | string | Ja | Nachrichtentext zum Senden \(unterstützt Slack mrkdwn-Formatierung\) |
|
||||
| `files` | file[] | Nein | Dateien, die an die Nachricht angehängt werden sollen |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
|
||||
@@ -202,6 +202,28 @@ Daten in eine Supabase-Tabelle einfügen oder aktualisieren (Upsert-Operation)
|
||||
| `message` | string | Statusmeldung der Operation |
|
||||
| `results` | array | Array der eingefügten/aktualisierten Datensätze |
|
||||
|
||||
### `supabase_vector_search`
|
||||
|
||||
Ähnlichkeitssuche mit pgvector in einer Supabase-Tabelle durchführen
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | Ja | Ihre Supabase-Projekt-ID \(z.B. jdrkgepadsdopsntdlom\) |
|
||||
| `functionName` | string | Ja | Der Name der PostgreSQL-Funktion, die die Vektorsuche durchführt \(z.B. match_documents\) |
|
||||
| `queryEmbedding` | array | Ja | Der Abfragevektor/Embedding, nach dem ähnliche Elemente gesucht werden sollen |
|
||||
| `matchThreshold` | number | Nein | Minimaler Ähnlichkeitsschwellenwert \(0-1\), typischerweise 0,7-0,9 |
|
||||
| `matchCount` | number | Nein | Maximale Anzahl der zurückzugebenden Ergebnisse \(Standard: 10\) |
|
||||
| `apiKey` | string | Ja | Ihr Supabase Service Role Secret Key |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Statusmeldung der Operation |
|
||||
| `results` | array | Array von Datensätzen mit Ähnlichkeitswerten aus der Vektorsuche. Jeder Datensatz enthält ein Ähnlichkeitsfeld \(0-1\), das angibt, wie ähnlich er dem Abfragevektor ist. |
|
||||
|
||||
## Hinweise
|
||||
|
||||
- Kategorie: `tools`
|
||||
|
||||
@@ -190,6 +190,26 @@ Senden Sie Animationen (GIFs) an Telegram-Kanäle oder Benutzer über die Telegr
|
||||
| `message` | string | Erfolgs- oder Fehlermeldung |
|
||||
| `data` | object | Telegram-Nachrichtendaten einschließlich optionaler Medien |
|
||||
|
||||
### `telegram_send_document`
|
||||
|
||||
Senden Sie Dokumente (PDF, ZIP, DOC, etc.) an Telegram-Kanäle oder -Nutzer über die Telegram Bot API.
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Ja | Ihr Telegram Bot API-Token |
|
||||
| `chatId` | string | Ja | Ziel-Telegram-Chat-ID |
|
||||
| `files` | file[] | Nein | Zu sendende Dokumentdatei \(PDF, ZIP, DOC, etc.\). Maximale Größe: 50MB |
|
||||
| `caption` | string | Nein | Dokumentbeschreibung \(optional\) |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Erfolgs- oder Fehlermeldung |
|
||||
| `data` | object | Telegram-Nachrichtendaten einschließlich Dokument |
|
||||
|
||||
## Hinweise
|
||||
|
||||
- Kategorie: `tools`
|
||||
|
||||
@@ -59,8 +59,9 @@ Verarbeiten und analysieren Sie Bilder mit fortschrittlichen Vision-Modellen. F
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `apiKey` | string | Ja | API-Schlüssel für den ausgewählten Modellanbieter |
|
||||
| `imageUrl` | string | Ja | Öffentlich zugängliche Bild-URL |
|
||||
| `model` | string | Nein | Zu verwendendes Vision-Modell \(gpt-4o, claude-3-opus-20240229, etc\) |
|
||||
| `imageUrl` | string | Nein | Öffentlich zugängliche Bild-URL |
|
||||
| `imageFile` | file | Nein | Zu analysierende Bilddatei |
|
||||
| `model` | string | Nein | Zu verwendendes Vision-Modell \(gpt-4o, claude-3-opus-20240229, usw.\) |
|
||||
| `prompt` | string | Nein | Benutzerdefinierte Eingabeaufforderung für die Bildanalyse |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
145
apps/docs/content/docs/de/tools/webflow.mdx
Normal file
145
apps/docs/content/docs/de/tools/webflow.mdx
Normal file
@@ -0,0 +1,145 @@
|
||||
---
|
||||
title: Webflow
|
||||
description: Webflow CMS-Sammlungen verwalten
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="webflow"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 1080 674'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
fillRule='evenodd'
|
||||
clipRule='evenodd'
|
||||
d='M1080 0L735.386 673.684H411.695L555.916 394.481H549.445C430.464 548.934 252.942 650.61 -0.000488281 673.684V398.344C-0.000488281 398.344 161.813 388.787 256.938 288.776H-0.000488281V0.0053214H288.771V237.515L295.252 237.489L413.254 0.0053214H631.644V236.009L638.126 235.999L760.555 0H1080Z'
|
||||
fill='#146EF5'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Webflow](https://webflow.com/) ist eine leistungsstarke visuelle Webdesign-Plattform, mit der Sie responsive Websites ohne Programmierung erstellen können. Sie kombiniert eine visuelle Design-Oberfläche mit einem robusten CMS (Content Management System), das es Ihnen ermöglicht, dynamische Inhalte für Ihre Websites zu erstellen, zu verwalten und zu veröffentlichen.
|
||||
|
||||
Mit Webflow können Sie:
|
||||
|
||||
- **Visuell gestalten**: Erstellen Sie benutzerdefinierte Websites mit einem visuellen Editor, der sauberen, semantischen HTML/CSS-Code generiert
|
||||
- **Inhalte dynamisch verwalten**: Nutzen Sie das CMS, um Sammlungen strukturierter Inhalte wie Blogbeiträge, Produkte, Teammitglieder oder beliebige benutzerdefinierte Daten zu erstellen
|
||||
- **Sofort veröffentlichen**: Stellen Sie Ihre Websites auf Webflows Hosting bereit oder exportieren Sie den Code für benutzerdefiniertes Hosting
|
||||
- **Responsive Designs erstellen**: Bauen Sie Websites, die nahtlos auf Desktop, Tablet und Mobilgeräten funktionieren
|
||||
- **Sammlungen anpassen**: Definieren Sie benutzerdefinierte Felder und Datenstrukturen für Ihre Inhaltstypen
|
||||
- **Inhaltsaktualisierungen automatisieren**: Verwalten Sie Ihre CMS-Inhalte programmgesteuert über APIs
|
||||
|
||||
In Sim ermöglicht die Webflow-Integration Ihren Agenten, nahtlos mit Ihren Webflow-CMS-Sammlungen über API-Authentifizierung zu interagieren. Dies ermöglicht leistungsstarke Automatisierungsszenarien wie das automatische Erstellen von Blogbeiträgen aus KI-generierten Inhalten, das Aktualisieren von Produktinformationen, das Verwalten von Teammitgliederprofilen und das Abrufen von CMS-Elementen für die dynamische Inhaltsgenerierung. Ihre Agenten können vorhandene Elemente auflisten, um Ihre Inhalte zu durchsuchen, bestimmte Elemente nach ID abrufen, neue Einträge erstellen, um frische Inhalte hinzuzufügen, bestehende Elemente aktualisieren, um Informationen aktuell zu halten, und veraltete Inhalte löschen. Diese Integration überbrückt die Lücke zwischen Ihren KI-Workflows und Ihrem Webflow-CMS und ermöglicht automatisierte Inhaltsverwaltung, dynamische Website-Aktualisierungen und optimierte Inhalts-Workflows, die Ihre Websites ohne manuelles Eingreifen frisch und aktuell halten.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## Gebrauchsanweisung
|
||||
|
||||
Integriert Webflow CMS in den Workflow. Kann Elemente in Webflow CMS-Sammlungen erstellen, abrufen, auflisten, aktualisieren oder löschen. Verwalten Sie Ihre Webflow-Inhalte programmatisch. Kann im Trigger-Modus verwendet werden, um Workflows auszulösen, wenn sich Sammlungselemente ändern oder Formulare übermittelt werden.
|
||||
|
||||
## Tools
|
||||
|
||||
### `webflow_list_items`
|
||||
|
||||
Alle Elemente aus einer Webflow CMS-Sammlung auflisten
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Ja | ID der Sammlung |
|
||||
| `offset` | number | Nein | Offset für Paginierung \(optional\) |
|
||||
| `limit` | number | Nein | Maximale Anzahl der zurückzugebenden Elemente \(optional, Standard: 100\) |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | json | Array von Sammlungselementen |
|
||||
| `metadata` | json | Metadaten über die Abfrage |
|
||||
|
||||
### `webflow_get_item`
|
||||
|
||||
Ein einzelnes Element aus einer Webflow CMS-Sammlung abrufen
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Ja | ID der Sammlung |
|
||||
| `itemId` | string | Ja | ID des abzurufenden Elements |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | Das abgerufene Elementobjekt |
|
||||
| `metadata` | json | Metadaten über das abgerufene Element |
|
||||
|
||||
### `webflow_create_item`
|
||||
|
||||
Ein neues Element in einer Webflow CMS-Sammlung erstellen
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Ja | ID der Sammlung |
|
||||
| `fieldData` | json | Ja | Felddaten für das neue Element als JSON-Objekt. Die Schlüssel sollten mit den Feldnamen der Sammlung übereinstimmen. |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | Das erstellte Element-Objekt |
|
||||
| `metadata` | json | Metadaten über das erstellte Element |
|
||||
|
||||
### `webflow_update_item`
|
||||
|
||||
Ein vorhandenes Element in einer Webflow CMS-Sammlung aktualisieren
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Ja | ID der Sammlung |
|
||||
| `itemId` | string | Ja | ID des zu aktualisierenden Elements |
|
||||
| `fieldData` | json | Ja | Zu aktualisierende Felddaten als JSON-Objekt. Nur Felder einschließen, die geändert werden sollen. |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | Das aktualisierte Element-Objekt |
|
||||
| `metadata` | json | Metadaten über das aktualisierte Element |
|
||||
|
||||
### `webflow_delete_item`
|
||||
|
||||
Ein Element aus einer Webflow CMS-Sammlung löschen
|
||||
|
||||
#### Eingabe
|
||||
|
||||
| Parameter | Typ | Erforderlich | Beschreibung |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Ja | ID der Sammlung |
|
||||
| `itemId` | string | Ja | ID des zu löschenden Elements |
|
||||
|
||||
#### Ausgabe
|
||||
|
||||
| Parameter | Typ | Beschreibung |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Ob die Löschung erfolgreich war |
|
||||
| `metadata` | json | Metadaten über die Löschung |
|
||||
|
||||
## Hinweise
|
||||
|
||||
- Kategorie: `tools`
|
||||
- Typ: `webflow`
|
||||
@@ -16,7 +16,7 @@ Blocks are the building components you connect together to create AI workflows.
|
||||
|
||||
## Core Block Types
|
||||
|
||||
Sim provides seven core block types that handle the essential functions of AI workflows:
|
||||
Sim provides essential block types that handle the core functions of AI workflows:
|
||||
|
||||
### Processing Blocks
|
||||
- **[Agent](/blocks/agent)** - Chat with AI models (OpenAI, Anthropic, Google, local models)
|
||||
@@ -28,6 +28,10 @@ Sim provides seven core block types that handle the essential functions of AI wo
|
||||
- **[Router](/blocks/router)** - Use AI to intelligently route requests to different paths
|
||||
- **[Evaluator](/blocks/evaluator)** - Score and assess content quality using AI
|
||||
|
||||
### Control Flow Blocks
|
||||
- **[Variables](/blocks/variables)** - Set and manage workflow-scoped variables
|
||||
- **[Wait](/blocks/wait)** - Pause workflow execution for a specified time delay
|
||||
|
||||
### Output Blocks
|
||||
- **[Response](/blocks/response)** - Format and return final results from your workflow
|
||||
|
||||
@@ -123,4 +127,10 @@ Each block type has specific configuration options:
|
||||
<Card title="Condition Block" href="/blocks/condition">
|
||||
Create branching logic based on data evaluation
|
||||
</Card>
|
||||
<Card title="Variables Block" href="/blocks/variables">
|
||||
Set and manage workflow-scoped variables
|
||||
</Card>
|
||||
<Card title="Wait Block" href="/blocks/wait">
|
||||
Pause workflow execution for specified time delays
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
The Loop block is a container block in Sim that allows you to create iterative workflows by executing a group of blocks repeatedly. Loops enable iterative processing in your workflows.
|
||||
|
||||
The Loop block supports two types of iteration:
|
||||
The Loop block supports four types of iteration:
|
||||
|
||||
<Callout type="info">
|
||||
Loop blocks are container nodes that can hold other blocks inside them. The blocks inside a loop will execute multiple times based on your configuration.
|
||||
@@ -27,7 +27,7 @@ The Loop block enables you to:
|
||||
<strong>Repeat operations</strong>: Execute blocks a fixed number of times
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Sequential processing</strong>: Handle data transformation in ordered iterations
|
||||
<strong>Loop on conditions</strong>: Continue executing while or until a condition is met
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Aggregate results</strong>: Collect outputs from all loop iterations
|
||||
@@ -47,9 +47,9 @@ The Loop block executes contained blocks through sequential iteration:
|
||||
|
||||
### Loop Type
|
||||
|
||||
Choose between two types of loops:
|
||||
Choose between four types of loops:
|
||||
|
||||
<Tabs items={['For Loop', 'ForEach Loop']}>
|
||||
<Tabs items={['For Loop', 'ForEach Loop', 'While Loop', 'Do-While Loop']}>
|
||||
<Tab>
|
||||
**For Loop (Iterations)** - A numeric loop that executes a fixed number of times:
|
||||
|
||||
@@ -96,6 +96,54 @@ Choose between two types of loops:
|
||||
- Iteration 3: Process "orange"
|
||||
```
|
||||
</Tab>
|
||||
<Tab>
|
||||
**While Loop (Condition-based)** - Continues executing while a condition evaluates to true:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="While Loop with condition"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Use this when you need to loop until a specific condition is met. The condition is checked **before** each iteration.
|
||||
|
||||
```
|
||||
Example: While <variable.i> < 10
|
||||
- Check condition → Execute if true
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Execute if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
</Tab>
|
||||
<Tab>
|
||||
**Do-While Loop (Condition-based)** - Executes at least once, then continues while a condition is true:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="Do-While Loop with condition"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Use this when you need to execute at least once, then loop until a condition is met. The condition is checked **after** each iteration.
|
||||
|
||||
```
|
||||
Example: Do-while <variable.i> < 10
|
||||
- Execute blocks
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Continue if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## How to Use Loops
|
||||
@@ -139,6 +187,19 @@ After a loop completes, you can access aggregated results:
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Counter with While Loop
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Process items with counter-based loop</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Initialize workflow variable: `i = 0`</li>
|
||||
<li>While loop with condition: `<variable.i>` \< 10</li>
|
||||
<li>Inside loop: Agent processes item at index `<variable.i>`</li>
|
||||
<li>Inside loop: Variables increments `i = <variable.i> + 1`</li>
|
||||
<li>Loop continues while i is less than 10</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Limitations
|
||||
@@ -162,7 +223,7 @@ After a loop completes, you can access aggregated results:
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>Loop Type</strong>: Choose between 'for' or 'forEach'
|
||||
<strong>Loop Type</strong>: Choose between 'for', 'forEach', 'while', or 'doWhile'
|
||||
</li>
|
||||
<li>
|
||||
<strong>Iterations</strong>: Number of times to execute (for loops)
|
||||
@@ -170,6 +231,9 @@ After a loop completes, you can access aggregated results:
|
||||
<li>
|
||||
<strong>Collection</strong>: Array or object to iterate over (forEach loops)
|
||||
</li>
|
||||
<li>
|
||||
<strong>Condition</strong>: Boolean expression to evaluate (while/do-while loops)
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
"parallel",
|
||||
"response",
|
||||
"router",
|
||||
"variables",
|
||||
"wait",
|
||||
"workflow"
|
||||
]
|
||||
}
|
||||
|
||||
123
apps/docs/content/docs/en/blocks/variables.mdx
Normal file
123
apps/docs/content/docs/en/blocks/variables.mdx
Normal file
@@ -0,0 +1,123 @@
|
||||
---
|
||||
title: Variables
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
The Variables block updates workflow variables during execution. Variables must first be initialized in your workflow's Variables section, then you can use this block to update their values as your workflow runs.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/variables.png"
|
||||
alt="Variables Block"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Callout>
|
||||
Access variables anywhere in your workflow using `<variable.variableName>` syntax.
|
||||
</Callout>
|
||||
|
||||
## Overview
|
||||
|
||||
The Variables block enables you to:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Update workflow variables</strong>: Change variable values during execution
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Store dynamic data</strong>: Capture block outputs into variables
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Maintain state</strong>: Track counters, flags, and intermediate results
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## How to Use Variables
|
||||
|
||||
### 1. Initialize in Workflow Variables
|
||||
|
||||
First, create your variables in the workflow's Variables section (accessible from the workflow settings):
|
||||
|
||||
```
|
||||
customerEmail = ""
|
||||
retryCount = 0
|
||||
currentStatus = "pending"
|
||||
```
|
||||
|
||||
### 2. Update with Variables Block
|
||||
|
||||
Use the Variables block to update these values during execution:
|
||||
|
||||
```
|
||||
customerEmail = <api.email>
|
||||
retryCount = <variable.retryCount> + 1
|
||||
currentStatus = "processing"
|
||||
```
|
||||
|
||||
### 3. Access Anywhere
|
||||
|
||||
Reference variables in any block:
|
||||
|
||||
```
|
||||
Agent prompt: "Send email to <variable.customerEmail>"
|
||||
Condition: <variable.retryCount> < 5
|
||||
API body: {"status": "<variable.currentStatus>"}
|
||||
```
|
||||
|
||||
## Example Use Cases
|
||||
|
||||
### Loop Counter and State
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Track progress through loop iterations</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Initialize in workflow: `itemsProcessed = 0`, `lastResult = ""`</li>
|
||||
<li>Loop iterates over items</li>
|
||||
<li>Inside loop: Agent processes current item</li>
|
||||
<li>Inside loop: Variables updates `itemsProcessed = <variable.itemsProcessed> + 1`</li>
|
||||
<li>Inside loop: Variables updates `lastResult = <agent.content>`</li>
|
||||
<li>Next iteration: Access `<variable.lastResult>` to compare with current result</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Retry Logic
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Track API retry attempts</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Initialize in workflow: `retryCount = 0`</li>
|
||||
<li>API block attempts request</li>
|
||||
<li>If failed, Variables increments: `retryCount = <variable.retryCount> + 1`</li>
|
||||
<li>Condition checks if `<variable.retryCount>` \< 3 to retry or fail</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Dynamic Configuration
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Store user context for workflow</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Initialize in workflow: `userId = ""`, `userTier = ""`</li>
|
||||
<li>API fetches user profile</li>
|
||||
<li>Variables stores: `userId = <api.id>`, `userTier = <api.tier>`</li>
|
||||
<li>Agent personalizes response using `<variable.userTier>`</li>
|
||||
<li>API uses `<variable.userId>` for logging</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Outputs
|
||||
|
||||
- **`<variables.assignments>`**: JSON object with all variable assignments from this block
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Initialize in workflow settings**: Always create variables in the workflow Variables section before using them
|
||||
- **Update dynamically**: Use Variables blocks to update values based on block outputs or calculations
|
||||
- **Use in loops**: Perfect for tracking state across iterations
|
||||
- **Name descriptively**: Use clear names like `currentIndex`, `totalProcessed`, or `lastError`
|
||||
99
apps/docs/content/docs/en/blocks/wait.mdx
Normal file
99
apps/docs/content/docs/en/blocks/wait.mdx
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: Wait
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
The Wait block pauses your workflow for a specified amount of time before continuing to the next block. Use it to add delays between actions, respect API rate limits, or space out operations.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/wait.png"
|
||||
alt="Wait Block"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
## Overview
|
||||
|
||||
The Wait block enables you to:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Add time delays</strong>: Pause execution between workflow steps
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Respect rate limits</strong>: Space out API calls to stay within limits
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Schedule sequences</strong>: Create timed workflows with delays between actions
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Configuration
|
||||
|
||||
### Wait Amount
|
||||
|
||||
Enter the duration to pause execution:
|
||||
- **Input**: Positive number
|
||||
- **Maximum**: 600 seconds (10 minutes) or 10 minutes
|
||||
|
||||
### Unit
|
||||
|
||||
Choose the time unit:
|
||||
- **Seconds**: For short, precise delays
|
||||
- **Minutes**: For longer pauses
|
||||
|
||||
<Callout type="info">
|
||||
Wait blocks can be cancelled by stopping the workflow. The maximum wait time is 10 minutes.
|
||||
</Callout>
|
||||
|
||||
## Outputs
|
||||
|
||||
- **`<wait.waitDuration>`**: The wait duration in milliseconds
|
||||
- **`<wait.status>`**: Status of the wait ('waiting', 'completed', or 'cancelled')
|
||||
|
||||
## Example Use Cases
|
||||
|
||||
### API Rate Limiting
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Stay within API rate limits</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>API block makes first request</li>
|
||||
<li>Wait block pauses for 2 seconds</li>
|
||||
<li>API block makes second request</li>
|
||||
<li>Process continues without hitting rate limits</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Timed Notifications
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Send follow-up messages</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Function sends initial email</li>
|
||||
<li>Wait block pauses for 5 minutes</li>
|
||||
<li>Function sends follow-up email</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Processing Delays
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scenario: Wait for external system</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>API block triggers job in external system</li>
|
||||
<li>Wait block pauses for 30 seconds</li>
|
||||
<li>API block checks job completion status</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Best Practices
|
||||
|
||||
- **Keep waits reasonable**: Use Wait for delays up to 10 minutes. For longer delays, consider scheduled workflows
|
||||
- **Monitor execution time**: Remember that waits extend total workflow duration
|
||||
@@ -214,14 +214,14 @@ Populate Clay with data from a JSON file. Enables direct communication and notif
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `webhookURL` | string | Yes | The webhook URL to populate |
|
||||
| `data` | json | Yes | The data to populate |
|
||||
| `authToken` | string | Yes | Auth token for Clay webhook authentication |
|
||||
| `authToken` | string | No | Optional auth token for Clay webhook authentication \(most webhooks do not require this\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | json | Clay populate operation results including response data from Clay webhook |
|
||||
| `data` | json | Response data from Clay webhook |
|
||||
| `metadata` | object | Webhook response metadata |
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="discord"
|
||||
color="#E0E0E0"
|
||||
color="#5865F2"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
"typeform",
|
||||
"vision",
|
||||
"wealthbox",
|
||||
"webflow",
|
||||
"webhook",
|
||||
"whatsapp",
|
||||
"wikipedia",
|
||||
|
||||
@@ -51,7 +51,7 @@ In Sim, the OneDrive integration enables your agents to directly interact with y
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrate OneDrive into the workflow. Can create, upload, and list files.
|
||||
Integrate OneDrive into the workflow. Can create text and Excel files, upload files, and list files.
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ Upload a file to OneDrive
|
||||
| `fileName` | string | Yes | The name of the file to upload |
|
||||
| `file` | file | No | The file to upload \(binary\) |
|
||||
| `content` | string | No | The text content to upload \(if no file is provided\) |
|
||||
| `mimeType` | string | No | The MIME type of the file to create \(e.g., text/plain for .txt, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet for .xlsx\) |
|
||||
| `folderSelector` | string | No | Select the folder to upload the file to |
|
||||
| `manualFolderId` | string | No | Manually entered folder ID \(advanced mode\) |
|
||||
|
||||
|
||||
@@ -143,6 +143,7 @@ Search for similar vectors in a Qdrant collection
|
||||
| `vector` | array | Yes | Vector to search for |
|
||||
| `limit` | number | No | Number of results to return |
|
||||
| `filter` | object | No | Filter to apply to the search |
|
||||
| `search_return_data` | string | No | Data to return from search |
|
||||
| `with_payload` | boolean | No | Include payload in response |
|
||||
| `with_vector` | boolean | No | Include vector in response |
|
||||
|
||||
@@ -165,6 +166,7 @@ Fetch points by ID from a Qdrant collection
|
||||
| `apiKey` | string | No | Qdrant API key \(optional\) |
|
||||
| `collection` | string | Yes | Collection name |
|
||||
| `ids` | array | Yes | Array of point IDs to fetch |
|
||||
| `fetch_return_data` | string | No | Data to return from fetch |
|
||||
| `with_payload` | boolean | No | Include payload in response |
|
||||
| `with_vector` | boolean | No | Include vector in response |
|
||||
|
||||
|
||||
150
apps/docs/content/docs/en/tools/webflow.mdx
Normal file
150
apps/docs/content/docs/en/tools/webflow.mdx
Normal file
@@ -0,0 +1,150 @@
|
||||
---
|
||||
title: Webflow
|
||||
description: Manage Webflow CMS collections
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="webflow"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 1080 674'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
fillRule='evenodd'
|
||||
clipRule='evenodd'
|
||||
d='M1080 0L735.386 673.684H411.695L555.916 394.481H549.445C430.464 548.934 252.942 650.61 -0.000488281 673.684V398.344C-0.000488281 398.344 161.813 388.787 256.938 288.776H-0.000488281V0.0053214H288.771V237.515L295.252 237.489L413.254 0.0053214H631.644V236.009L638.126 235.999L760.555 0H1080Z'
|
||||
fill='#146EF5'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Webflow](https://webflow.com/) is a powerful visual web design platform that enables you to build responsive websites without writing code. It combines a visual design interface with a robust CMS (Content Management System) that allows you to create, manage, and publish dynamic content for your websites.
|
||||
|
||||
With Webflow, you can:
|
||||
|
||||
- **Design visually**: Create custom websites with a visual editor that generates clean, semantic HTML/CSS code
|
||||
- **Manage content dynamically**: Use the CMS to create collections of structured content like blog posts, products, team members, or any custom data
|
||||
- **Publish instantly**: Deploy your sites to Webflow's hosting or export the code for custom hosting
|
||||
- **Create responsive designs**: Build sites that work seamlessly across desktop, tablet, and mobile devices
|
||||
- **Customize collections**: Define custom fields and data structures for your content types
|
||||
- **Automate content updates**: Programmatically manage your CMS content through APIs
|
||||
|
||||
In Sim, the Webflow integration enables your agents to seamlessly interact with your Webflow CMS collections through API authentication. This allows for powerful automation scenarios such as automatically creating blog posts from AI-generated content, updating product information, managing team member profiles, and retrieving CMS items for dynamic content generation. Your agents can list existing items to browse your content, retrieve specific items by ID, create new entries to add fresh content, update existing items to keep information current, and delete outdated content. This integration bridges the gap between your AI workflows and your Webflow CMS, enabling automated content management, dynamic website updates, and streamlined content workflows that keep your sites fresh and up-to-date without manual intervention.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
## Usage Instructions
|
||||
|
||||
Integrates Webflow CMS into the workflow. Can create, get, list, update, or delete items in Webflow CMS collections. Manage your Webflow content programmatically. Can be used in trigger mode to trigger workflows when collection items change or forms are submitted.
|
||||
|
||||
|
||||
|
||||
## Tools
|
||||
|
||||
### `webflow_list_items`
|
||||
|
||||
List all items from a Webflow CMS collection
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Yes | ID of the collection |
|
||||
| `offset` | number | No | Offset for pagination \(optional\) |
|
||||
| `limit` | number | No | Maximum number of items to return \(optional, default: 100\) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | json | Array of collection items |
|
||||
| `metadata` | json | Metadata about the query |
|
||||
|
||||
### `webflow_get_item`
|
||||
|
||||
Get a single item from a Webflow CMS collection
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Yes | ID of the collection |
|
||||
| `itemId` | string | Yes | ID of the item to retrieve |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | The retrieved item object |
|
||||
| `metadata` | json | Metadata about the retrieved item |
|
||||
|
||||
### `webflow_create_item`
|
||||
|
||||
Create a new item in a Webflow CMS collection
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Yes | ID of the collection |
|
||||
| `fieldData` | json | Yes | Field data for the new item as a JSON object. Keys should match collection field names. |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | The created item object |
|
||||
| `metadata` | json | Metadata about the created item |
|
||||
|
||||
### `webflow_update_item`
|
||||
|
||||
Update an existing item in a Webflow CMS collection
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Yes | ID of the collection |
|
||||
| `itemId` | string | Yes | ID of the item to update |
|
||||
| `fieldData` | json | Yes | Field data to update as a JSON object. Only include fields you want to change. |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | The updated item object |
|
||||
| `metadata` | json | Metadata about the updated item |
|
||||
|
||||
### `webflow_delete_item`
|
||||
|
||||
Delete an item from a Webflow CMS collection
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Yes | ID of the collection |
|
||||
| `itemId` | string | Yes | ID of the item to delete |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Whether the deletion was successful |
|
||||
| `metadata` | json | Metadata about the deletion |
|
||||
|
||||
|
||||
|
||||
## Notes
|
||||
|
||||
- Category: `tools`
|
||||
- Type: `webflow`
|
||||
@@ -16,7 +16,7 @@ Los bloques son los componentes de construcción que conectas para crear flujos
|
||||
|
||||
## Tipos de bloques principales
|
||||
|
||||
Sim proporciona siete tipos de bloques principales que manejan las funciones esenciales de los flujos de trabajo de IA:
|
||||
Sim proporciona tipos de bloques esenciales que manejan las funciones principales de los flujos de trabajo de IA:
|
||||
|
||||
### Bloques de procesamiento
|
||||
- **[Agente](/blocks/agent)** - Chatea con modelos de IA (OpenAI, Anthropic, Google, modelos locales)
|
||||
@@ -28,14 +28,18 @@ Sim proporciona siete tipos de bloques principales que manejan las funciones ese
|
||||
- **[Enrutador](/blocks/router)** - Usa IA para dirigir inteligentemente las solicitudes a diferentes caminos
|
||||
- **[Evaluador](/blocks/evaluator)** - Puntúa y evalúa la calidad del contenido usando IA
|
||||
|
||||
### Bloques de flujo de control
|
||||
- **[Variables](/blocks/variables)** - Establecer y gestionar variables con alcance de flujo de trabajo
|
||||
- **[Espera](/blocks/wait)** - Pausar la ejecución del flujo de trabajo durante un tiempo específico
|
||||
|
||||
### Bloques de salida
|
||||
- **[Respuesta](/blocks/response)** - Formatea y devuelve resultados finales de tu flujo de trabajo
|
||||
- **[Respuesta](/blocks/response)** - Formatear y devolver resultados finales desde tu flujo de trabajo
|
||||
|
||||
## Cómo funcionan los bloques
|
||||
|
||||
Cada bloque tiene tres componentes principales:
|
||||
|
||||
**Entradas**: Datos que llegan al bloque desde otros bloques o entrada del usuario
|
||||
**Entradas**: Datos que ingresan al bloque desde otros bloques o entrada del usuario
|
||||
**Configuración**: Ajustes que controlan cómo se comporta el bloque
|
||||
**Salidas**: Datos que el bloque produce para que otros bloques los utilicen
|
||||
|
||||
@@ -55,8 +59,8 @@ Cada bloque tiene tres componentes principales:
|
||||
|
||||
Creas flujos de trabajo conectando bloques entre sí. La salida de un bloque se convierte en la entrada de otro:
|
||||
|
||||
- **Arrastra para conectar**: Arrastra desde un puerto de salida a un puerto de entrada
|
||||
- **Conexiones múltiples**: Una salida puede conectarse a múltiples entradas
|
||||
- **Arrastrar para conectar**: Arrastra desde un puerto de salida a un puerto de entrada
|
||||
- **Múltiples conexiones**: Una salida puede conectarse a múltiples entradas
|
||||
- **Rutas ramificadas**: Algunos bloques pueden dirigir a diferentes rutas según las condiciones
|
||||
|
||||
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
|
||||
@@ -110,7 +114,7 @@ Cada tipo de bloque tiene opciones de configuración específicas:
|
||||
|
||||
**Bloques de integración** (API, Respuesta):
|
||||
- Configuración de endpoint
|
||||
- Cabeceras y autenticación
|
||||
- Encabezados y autenticación
|
||||
- Formato de solicitud/respuesta
|
||||
|
||||
<Cards>
|
||||
@@ -126,4 +130,10 @@ Cada tipo de bloque tiene opciones de configuración específicas:
|
||||
<Card title="Bloque de condición" href="/blocks/condition">
|
||||
Crea lógica de ramificación basada en evaluación de datos
|
||||
</Card>
|
||||
<Card title="Bloque de variables" href="/blocks/variables">
|
||||
Establece y gestiona variables con alcance de flujo de trabajo
|
||||
</Card>
|
||||
<Card title="Bloque de espera" href="/blocks/wait">
|
||||
Pausa la ejecución del flujo de trabajo durante retrasos de tiempo específicos
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
El bloque Loop es un bloque contenedor en Sim que permite crear flujos de trabajo iterativos ejecutando un grupo de bloques repetidamente. Los bucles permiten el procesamiento iterativo en tus flujos de trabajo.
|
||||
|
||||
El bloque Loop admite dos tipos de iteración:
|
||||
El bloque Loop admite cuatro tipos de iteración:
|
||||
|
||||
<Callout type="info">
|
||||
Los bloques Loop son nodos contenedores que pueden albergar otros bloques dentro de ellos. Los bloques dentro de un bucle se ejecutarán múltiples veces según tu configuración.
|
||||
@@ -27,7 +27,7 @@ El bloque Loop te permite:
|
||||
<strong>Repetir operaciones</strong>: Ejecutar bloques un número fijo de veces
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Procesamiento secuencial</strong>: Manejar transformación de datos en iteraciones ordenadas
|
||||
<strong>Bucles con condiciones</strong>: Continuar ejecutando mientras o hasta que se cumpla una condición
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Agregar resultados</strong>: Recopilar salidas de todas las iteraciones del bucle
|
||||
@@ -47,11 +47,11 @@ El bloque Loop ejecuta los bloques contenidos a través de iteración secuencial
|
||||
|
||||
### Tipo de bucle
|
||||
|
||||
Elige entre dos tipos de bucles:
|
||||
Elige entre cuatro tipos de bucles:
|
||||
|
||||
<Tabs items={['For Loop', 'ForEach Loop']}>
|
||||
<Tabs items={['For Loop', 'ForEach Loop', 'While Loop', 'Do-While Loop']}>
|
||||
<Tab>
|
||||
**For Loop (Iteraciones)** - Un bucle numérico que se ejecuta un número fijo de veces:
|
||||
**Bucle For (Iteraciones)** - Un bucle numérico que se ejecuta un número fijo de veces:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
@@ -100,13 +100,65 @@ Elige entre dos tipos de bucles:
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
**Bucle While (Basado en condición)** - Continúa ejecutándose mientras una condición se evalúe como verdadera:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="Bucle While con condición"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Úsalo cuando necesites hacer un bucle hasta que se cumpla una condición específica. La condición se comprueba **antes** de cada iteración.
|
||||
|
||||
|
||||
```
|
||||
Example: While <variable.i> < 10
|
||||
- Check condition → Execute if true
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Execute if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
**Bucle Do-While (Basado en condición)** - Se ejecuta al menos una vez, luego continúa mientras una condición sea verdadera:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="Bucle Do-While con condición"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Úsalo cuando necesites ejecutar al menos una vez, luego hacer un bucle hasta que se cumpla una condición. La condición se comprueba **después** de cada iteración.
|
||||
|
||||
|
||||
```
|
||||
Example: Do-while <variable.i> < 10
|
||||
- Execute blocks
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Continue if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Cómo usar los bucles
|
||||
|
||||
### Creación de un bucle
|
||||
### Creando un bucle
|
||||
|
||||
1. Arrastra un bloque de bucle desde la barra de herramientas a tu lienzo
|
||||
1. Arrastra un bloque Loop desde la barra de herramientas a tu lienzo
|
||||
2. Configura el tipo de bucle y los parámetros
|
||||
3. Arrastra otros bloques dentro del contenedor del bucle
|
||||
4. Conecta los bloques según sea necesario
|
||||
@@ -136,19 +188,32 @@ Después de que un bucle se completa, puedes acceder a los resultados agregados:
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Escenario: Generar múltiples variaciones</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Configurar el bucle For para 5 iteraciones</li>
|
||||
<li>Configurar bucle For para 5 iteraciones</li>
|
||||
<li>Dentro del bucle: El agente genera una variación de contenido</li>
|
||||
<li>Dentro del bucle: El evaluador puntúa el contenido</li>
|
||||
<li>Después del bucle: La función selecciona la mejor variación</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Contador con bucle While
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Escenario: Procesar elementos con bucle basado en contador</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Inicializar variable de flujo de trabajo: `i = 0`</li>
|
||||
<li>Bucle While con condición: `<variable.i>` \< 10</li>
|
||||
<li>Dentro del bucle: El agente procesa el elemento en el índice `<variable.i>`</li>
|
||||
<li>Dentro del bucle: La variable incrementa `i = <variable.i> + 1`</li>
|
||||
<li>El bucle continúa mientras i sea menor que 10</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Características avanzadas
|
||||
|
||||
### Limitaciones
|
||||
|
||||
<Callout type="warning">
|
||||
Los bloques contenedores (Bucles y Paralelos) no pueden anidarse unos dentro de otros. Esto significa:
|
||||
Los bloques contenedores (Bucles y Paralelos) no pueden anidarse dentro de otros. Esto significa:
|
||||
- No puedes colocar un bloque de Bucle dentro de otro bloque de Bucle
|
||||
- No puedes colocar un bloque Paralelo dentro de un bloque de Bucle
|
||||
- No puedes colocar ningún bloque contenedor dentro de otro bloque contenedor
|
||||
@@ -157,7 +222,7 @@ Después de que un bucle se completa, puedes acceder a los resultados agregados:
|
||||
</Callout>
|
||||
|
||||
<Callout type="info">
|
||||
Los bucles se ejecutan secuencialmente, no en paralelo. Si necesitas ejecución concurrente, utiliza el bloque Paralelo en su lugar.
|
||||
Los bucles se ejecutan secuencialmente, no en paralelo. Si necesitas ejecución concurrente, usa el bloque Paralelo en su lugar.
|
||||
</Callout>
|
||||
|
||||
## Entradas y salidas
|
||||
@@ -166,7 +231,7 @@ Después de que un bucle se completa, puedes acceder a los resultados agregados:
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>Tipo de bucle</strong>: Elige entre 'for' o 'forEach'
|
||||
<strong>Tipo de bucle</strong>: Elige entre 'for', 'forEach', 'while', o 'doWhile'
|
||||
</li>
|
||||
<li>
|
||||
<strong>Iteraciones</strong>: Número de veces a ejecutar (bucles for)
|
||||
@@ -174,6 +239,9 @@ Después de que un bucle se completa, puedes acceder a los resultados agregados:
|
||||
<li>
|
||||
<strong>Colección</strong>: Array u objeto sobre el que iterar (bucles forEach)
|
||||
</li>
|
||||
<li>
|
||||
<strong>Condición</strong>: Expresión booleana a evaluar (bucles while/do-while)
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
@@ -192,7 +260,7 @@ Después de que un bucle se completa, puedes acceder a los resultados agregados:
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>loop.results</strong>: Array con todos los resultados de las iteraciones
|
||||
<strong>loop.results</strong>: Array de todos los resultados de iteración
|
||||
</li>
|
||||
<li>
|
||||
<strong>Estructura</strong>: Los resultados mantienen el orden de iteración
|
||||
@@ -206,6 +274,6 @@ Después de que un bucle se completa, puedes acceder a los resultados agregados:
|
||||
|
||||
## Mejores prácticas
|
||||
|
||||
- **Establece límites razonables**: Mantén un número razonable de iteraciones para evitar tiempos de ejecución largos
|
||||
- **Establece límites razonables**: Mantén el número de iteraciones razonable para evitar tiempos de ejecución largos
|
||||
- **Usa ForEach para colecciones**: Cuando proceses arrays u objetos, usa bucles ForEach en lugar de bucles For
|
||||
- **Maneja los errores con elegancia**: Considera añadir manejo de errores dentro de los bucles para flujos de trabajo robustos
|
||||
|
||||
123
apps/docs/content/docs/es/blocks/variables.mdx
Normal file
123
apps/docs/content/docs/es/blocks/variables.mdx
Normal file
@@ -0,0 +1,123 @@
|
||||
---
|
||||
title: Variables
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
El bloque Variables actualiza las variables del flujo de trabajo durante la ejecución. Las variables deben inicializarse primero en la sección Variables de tu flujo de trabajo, luego puedes usar este bloque para actualizar sus valores mientras se ejecuta tu flujo de trabajo.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/variables.png"
|
||||
alt="Bloque de Variables"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Callout>
|
||||
Accede a las variables en cualquier parte de tu flujo de trabajo usando la sintaxis `<variable.variableName>`.
|
||||
</Callout>
|
||||
|
||||
## Descripción general
|
||||
|
||||
El bloque Variables te permite:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Actualizar variables del flujo de trabajo</strong>: Cambiar valores de variables durante la ejecución
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Almacenar datos dinámicos</strong>: Capturar salidas de bloques en variables
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Mantener el estado</strong>: Seguir contadores, indicadores y resultados intermedios
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Cómo usar Variables
|
||||
|
||||
### 1. Inicializar en Variables del flujo de trabajo
|
||||
|
||||
Primero, crea tus variables en la sección Variables del flujo de trabajo (accesible desde la configuración del flujo de trabajo):
|
||||
|
||||
```
|
||||
customerEmail = ""
|
||||
retryCount = 0
|
||||
currentStatus = "pending"
|
||||
```
|
||||
|
||||
### 2. Actualizar con el bloque Variables
|
||||
|
||||
Usa el bloque Variables para actualizar estos valores durante la ejecución:
|
||||
|
||||
```
|
||||
customerEmail = <api.email>
|
||||
retryCount = <variable.retryCount> + 1
|
||||
currentStatus = "processing"
|
||||
```
|
||||
|
||||
### 3. Acceder desde cualquier lugar
|
||||
|
||||
Referencia variables en cualquier bloque:
|
||||
|
||||
```
|
||||
Agent prompt: "Send email to <variable.customerEmail>"
|
||||
Condition: <variable.retryCount> < 5
|
||||
API body: {"status": "<variable.currentStatus>"}
|
||||
```
|
||||
|
||||
## Ejemplos de casos de uso
|
||||
|
||||
### Contador de bucle y estado
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Escenario: Seguimiento del progreso a través de iteraciones de bucle</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Inicializar en el flujo de trabajo: `itemsProcessed = 0`, `lastResult = ""`</li>
|
||||
<li>El bucle itera sobre elementos</li>
|
||||
<li>Dentro del bucle: El agente procesa el elemento actual</li>
|
||||
<li>Dentro del bucle: Variables actualiza `itemsProcessed = <variable.itemsProcessed> + 1`</li>
|
||||
<li>Dentro del bucle: Variables actualiza `lastResult = <agent.content>`</li>
|
||||
<li>Siguiente iteración: Accede a `<variable.lastResult>` para comparar con el resultado actual</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Lógica de reintentos
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Escenario: Seguimiento de intentos de reintento de API</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Inicializar en el flujo de trabajo: `retryCount = 0`</li>
|
||||
<li>El bloque API intenta realizar la solicitud</li>
|
||||
<li>Si falla, Variables incrementa: `retryCount = <variable.retryCount> + 1`</li>
|
||||
<li>La condición verifica si `<variable.retryCount>` \< 3 para reintentar o fallar</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Configuración dinámica
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Escenario: Almacenar contexto de usuario para el flujo de trabajo</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Inicializar en el flujo de trabajo: `userId = ""`, `userTier = ""`</li>
|
||||
<li>La API obtiene el perfil del usuario</li>
|
||||
<li>Variables almacena: `userId = <api.id>`, `userTier = <api.tier>`</li>
|
||||
<li>El agente personaliza la respuesta usando `<variable.userTier>`</li>
|
||||
<li>La API usa `<variable.userId>` para el registro</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Salidas
|
||||
|
||||
- **`<variables.assignments>`**: Objeto JSON con todas las asignaciones de variables de este bloque
|
||||
|
||||
## Mejores prácticas
|
||||
|
||||
- **Inicializar en la configuración del flujo de trabajo**: Siempre crea variables en la sección Variables del flujo de trabajo antes de usarlas
|
||||
- **Actualizar dinámicamente**: Usa bloques de Variables para actualizar valores basados en salidas de bloques o cálculos
|
||||
- **Usar en bucles**: Perfecto para rastrear el estado a través de iteraciones
|
||||
- **Nombrar descriptivamente**: Usa nombres claros como `currentIndex`, `totalProcessed`, o `lastError`
|
||||
99
apps/docs/content/docs/es/blocks/wait.mdx
Normal file
99
apps/docs/content/docs/es/blocks/wait.mdx
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: Espera
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
El bloque Espera pausa tu flujo de trabajo durante un tiempo específico antes de continuar con el siguiente bloque. Úsalo para añadir retrasos entre acciones, respetar límites de frecuencia de API o espaciar operaciones.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/wait.png"
|
||||
alt="Bloque de Espera"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
## Descripción general
|
||||
|
||||
El bloque Espera te permite:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Añadir retrasos de tiempo</strong>: Pausar la ejecución entre pasos del flujo de trabajo
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Respetar límites de frecuencia</strong>: Espaciar llamadas a API para mantenerse dentro de los límites
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Programar secuencias</strong>: Crear flujos de trabajo temporizados con retrasos entre acciones
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Configuración
|
||||
|
||||
### Cantidad de espera
|
||||
|
||||
Introduce la duración para pausar la ejecución:
|
||||
- **Entrada**: Número positivo
|
||||
- **Máximo**: 600 segundos (10 minutos) o 10 minutos
|
||||
|
||||
### Unidad
|
||||
|
||||
Elige la unidad de tiempo:
|
||||
- **Segundos**: Para retrasos cortos y precisos
|
||||
- **Minutos**: Para pausas más largas
|
||||
|
||||
<Callout type="info">
|
||||
Los bloques de espera pueden cancelarse deteniendo el flujo de trabajo. El tiempo máximo de espera es de 10 minutos.
|
||||
</Callout>
|
||||
|
||||
## Salidas
|
||||
|
||||
- **`<wait.waitDuration>`**: La duración de la espera en milisegundos
|
||||
- **`<wait.status>`**: Estado de la espera ('waiting', 'completed', o 'cancelled')
|
||||
|
||||
## Ejemplos de casos de uso
|
||||
|
||||
### Limitación de frecuencia de API
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Escenario: Mantenerse dentro de los límites de frecuencia de API</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>El bloque API realiza la primera solicitud</li>
|
||||
<li>El bloque Espera pausa durante 2 segundos</li>
|
||||
<li>El bloque API realiza la segunda solicitud</li>
|
||||
<li>El proceso continúa sin alcanzar los límites de frecuencia</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Notificaciones temporizadas
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Escenario: Enviar mensajes de seguimiento</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>La función envía el correo electrónico inicial</li>
|
||||
<li>El bloque Espera pausa durante 5 minutos</li>
|
||||
<li>La función envía el correo electrónico de seguimiento</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Retrasos de procesamiento
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Escenario: Espera para sistema externo</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>El bloque API activa un trabajo en el sistema externo</li>
|
||||
<li>El bloque de espera pausa durante 30 segundos</li>
|
||||
<li>El bloque API verifica el estado de finalización del trabajo</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Mejores prácticas
|
||||
|
||||
- **Mantén esperas razonables**: Usa Espera para retrasos de hasta 10 minutos. Para retrasos más largos, considera flujos de trabajo programados
|
||||
- **Monitorea el tiempo de ejecución**: Recuerda que las esperas extienden la duración total del flujo de trabajo
|
||||
@@ -207,18 +207,18 @@ Poblar Clay con datos de un archivo JSON. Permite comunicación directa y notifi
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Requerido | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `webhookURL` | string | Sí | La URL del webhook para poblar |
|
||||
| `data` | json | Sí | Los datos para poblar |
|
||||
| `authToken` | string | Sí | Token de autenticación para la autenticación del webhook de Clay |
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `webhookURL` | string | Sí | La URL del webhook a completar |
|
||||
| `data` | json | Sí | Los datos para completar |
|
||||
| `authToken` | string | No | Token de autenticación opcional para la autenticación del webhook de Clay \(la mayoría de los webhooks no requieren esto\) |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Estado de éxito de la operación |
|
||||
| `output` | json | Resultados de la operación de poblado de Clay incluyendo datos de respuesta del webhook de Clay |
|
||||
| `data` | json | Datos de respuesta del webhook de Clay |
|
||||
| `metadata` | object | Metadatos de respuesta del webhook |
|
||||
|
||||
## Notas
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="discord"
|
||||
color="#E0E0E0"
|
||||
color="#5865F2"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
@@ -67,11 +67,12 @@ Enviar un mensaje a un canal de Discord
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | Sí | El token del bot para autenticación |
|
||||
| `channelId` | string | Sí | El ID del canal de Discord donde enviar el mensaje |
|
||||
| `channelId` | string | Sí | El ID del canal de Discord al que enviar el mensaje |
|
||||
| `content` | string | No | El contenido de texto del mensaje |
|
||||
| `serverId` | string | Sí | El ID del servidor de Discord \(ID del guild\) |
|
||||
| `files` | file[] | No | Archivos para adjuntar al mensaje |
|
||||
|
||||
#### Salida
|
||||
|
||||
|
||||
@@ -85,9 +85,10 @@ Subir un archivo a Google Drive
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `fileName` | string | Sí | El nombre del archivo a subir |
|
||||
| `content` | string | Sí | El contenido del archivo a subir |
|
||||
| `mimeType` | string | No | El tipo MIME del archivo a subir |
|
||||
| `folderSelector` | string | No | Selecciona la carpeta donde subir el archivo |
|
||||
| `file` | file | No | Archivo binario para subir \(objeto UserFile\) |
|
||||
| `content` | string | No | Contenido de texto para subir \(use esto O archivo, no ambos\) |
|
||||
| `mimeType` | string | No | El tipo MIME del archivo a subir \(auto-detectado del archivo si no se proporciona\) |
|
||||
| `folderSelector` | string | No | Seleccione la carpeta donde subir el archivo |
|
||||
| `folderId` | string | No | El ID de la carpeta donde subir el archivo \(uso interno\) |
|
||||
|
||||
#### Salida
|
||||
|
||||
@@ -133,8 +133,9 @@ Escribir o actualizar contenido en un chat de Microsoft Teams
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `chatId` | string | Sí | El ID del chat donde escribir |
|
||||
| `content` | string | Sí | El contenido a escribir en el mensaje |
|
||||
| `chatId` | string | Sí | El ID del chat en el que escribir |
|
||||
| `content` | string | Sí | El contenido para escribir en el mensaje |
|
||||
| `files` | file[] | No | Archivos para adjuntar al mensaje |
|
||||
|
||||
#### Salida
|
||||
|
||||
@@ -181,9 +182,10 @@ Escribir o enviar un mensaje a un canal de Microsoft Teams
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `teamId` | string | Sí | El ID del equipo al que escribir |
|
||||
| `channelId` | string | Sí | El ID del canal al que escribir |
|
||||
| `teamId` | string | Sí | El ID del equipo en el que escribir |
|
||||
| `channelId` | string | Sí | El ID del canal en el que escribir |
|
||||
| `content` | string | Sí | El contenido para escribir en el canal |
|
||||
| `files` | file[] | No | Archivos para adjuntar al mensaje |
|
||||
|
||||
#### Salida
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ En Sim, la integración con OneDrive permite a tus agentes interactuar directame
|
||||
|
||||
## Instrucciones de uso
|
||||
|
||||
Integra OneDrive en el flujo de trabajo. Puede crear, subir y listar archivos. Requiere OAuth.
|
||||
Integra OneDrive en el flujo de trabajo. Puede crear archivos de texto y Excel, subir archivos y listar archivos.
|
||||
|
||||
## Herramientas
|
||||
|
||||
@@ -63,7 +63,9 @@ Subir un archivo a OneDrive
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `fileName` | string | Sí | El nombre del archivo a subir |
|
||||
| `content` | string | Sí | El contenido del archivo a subir |
|
||||
| `file` | file | No | El archivo a subir \(binario\) |
|
||||
| `content` | string | No | El contenido de texto a subir \(si no se proporciona un archivo\) |
|
||||
| `mimeType` | string | No | El tipo MIME del archivo a crear \(p. ej., text/plain para .txt, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet para .xlsx\) |
|
||||
| `folderSelector` | string | No | Seleccionar la carpeta donde subir el archivo |
|
||||
| `manualFolderId` | string | No | ID de carpeta introducido manualmente \(modo avanzado\) |
|
||||
|
||||
|
||||
@@ -150,14 +150,15 @@ Enviar correos electrónicos usando Outlook
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `to` | string | Sí | Dirección de correo electrónico del destinatario |
|
||||
| `subject` | string | Sí | Asunto del correo electrónico |
|
||||
| `body` | string | Sí | Contenido del cuerpo del correo electrónico |
|
||||
| `replyToMessageId` | string | No | ID del mensaje al que responder (para hilos) |
|
||||
| `replyToMessageId` | string | No | ID del mensaje al que responder \(para hilos\) |
|
||||
| `conversationId` | string | No | ID de conversación para hilos |
|
||||
| `cc` | string | No | Destinatarios en CC (separados por comas) |
|
||||
| `bcc` | string | No | Destinatarios en CCO (separados por comas) |
|
||||
| `cc` | string | No | Destinatarios en CC \(separados por comas\) |
|
||||
| `bcc` | string | No | Destinatarios en CCO \(separados por comas\) |
|
||||
| `attachments` | file[] | No | Archivos para adjuntar al correo electrónico |
|
||||
|
||||
#### Salida
|
||||
|
||||
@@ -181,6 +182,7 @@ Crear borradores de correos electrónicos usando Outlook
|
||||
| `body` | string | Sí | Contenido del cuerpo del correo electrónico |
|
||||
| `cc` | string | No | Destinatarios en CC \(separados por comas\) |
|
||||
| `bcc` | string | No | Destinatarios en CCO \(separados por comas\) |
|
||||
| `attachments` | file[] | No | Archivos para adjuntar al borrador de correo electrónico |
|
||||
|
||||
#### Salida
|
||||
|
||||
|
||||
@@ -133,13 +133,14 @@ Buscar vectores similares en una colección de Qdrant
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `url` | string | Sí | URL base de Qdrant |
|
||||
| `apiKey` | string | No | Clave API de Qdrant \(opcional\) |
|
||||
| `collection` | string | Sí | Nombre de la colección |
|
||||
| `vector` | array | Sí | Vector a buscar |
|
||||
| `vector` | array | Sí | Vector para buscar |
|
||||
| `limit` | number | No | Número de resultados a devolver |
|
||||
| `filter` | object | No | Filtro a aplicar a la búsqueda |
|
||||
| `filter` | object | No | Filtro para aplicar a la búsqueda |
|
||||
| `search_return_data` | string | No | Datos a devolver de la búsqueda |
|
||||
| `with_payload` | boolean | No | Incluir payload en la respuesta |
|
||||
| `with_vector` | boolean | No | Incluir vector en la respuesta |
|
||||
|
||||
@@ -157,11 +158,12 @@ Obtener puntos por ID desde una colección de Qdrant
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `url` | string | Sí | URL base de Qdrant |
|
||||
| `apiKey` | string | No | Clave API de Qdrant \(opcional\) |
|
||||
| `collection` | string | Sí | Nombre de la colección |
|
||||
| `ids` | array | Sí | Array de IDs de puntos a obtener |
|
||||
| `ids` | array | Sí | Array de IDs de puntos para recuperar |
|
||||
| `fetch_return_data` | string | No | Datos a devolver de la recuperación |
|
||||
| `with_payload` | boolean | No | Incluir payload en la respuesta |
|
||||
| `with_vector` | boolean | No | Incluir vector en la respuesta |
|
||||
|
||||
|
||||
@@ -199,6 +199,26 @@ Añadir un nuevo elemento a una lista de SharePoint
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | object | Elemento de lista de SharePoint creado |
|
||||
|
||||
### `sharepoint_upload_file`
|
||||
|
||||
Subir archivos a una biblioteca de documentos de SharePoint
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `siteId` | cadena | No | El ID del sitio de SharePoint |
|
||||
| `driveId` | cadena | No | El ID de la biblioteca de documentos \(unidad\). Si no se proporciona, usa la unidad predeterminada. |
|
||||
| `folderPath` | cadena | No | Ruta de carpeta opcional dentro de la biblioteca de documentos \(p. ej., /Documents/Subfolder\) |
|
||||
| `fileName` | cadena | No | Opcional: sobrescribir el nombre del archivo subido |
|
||||
| `files` | archivo[] | No | Archivos para subir a SharePoint |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `uploadedFiles` | array | Array de objetos de archivos subidos |
|
||||
|
||||
## Notas
|
||||
|
||||
- Categoría: `tools`
|
||||
|
||||
@@ -79,6 +79,7 @@ Envía mensajes a canales o usuarios de Slack a través de la API de Slack. Comp
|
||||
| `botToken` | string | No | Token del bot para Bot personalizado |
|
||||
| `channel` | string | Sí | Canal de Slack objetivo (p. ej., #general) |
|
||||
| `text` | string | Sí | Texto del mensaje a enviar (admite formato mrkdwn de Slack) |
|
||||
| `files` | file[] | No | Archivos para adjuntar al mensaje |
|
||||
|
||||
#### Salida
|
||||
|
||||
|
||||
@@ -202,6 +202,28 @@ Insertar o actualizar datos en una tabla de Supabase (operación upsert)
|
||||
| `message` | string | Mensaje de estado de la operación |
|
||||
| `results` | array | Array de registros insertados o actualizados |
|
||||
|
||||
### `supabase_vector_search`
|
||||
|
||||
Realizar búsqueda de similitud usando pgvector en una tabla de Supabase
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `projectId` | string | Sí | ID de tu proyecto Supabase \(p. ej., jdrkgepadsdopsntdlom\) |
|
||||
| `functionName` | string | Sí | Nombre de la función PostgreSQL que realiza la búsqueda vectorial \(p. ej., match_documents\) |
|
||||
| `queryEmbedding` | array | Sí | El vector/embedding de consulta para buscar elementos similares |
|
||||
| `matchThreshold` | number | No | Umbral mínimo de similitud \(0-1\), típicamente 0.7-0.9 |
|
||||
| `matchCount` | number | No | Número máximo de resultados a devolver \(predeterminado: 10\) |
|
||||
| `apiKey` | string | Sí | Tu clave secreta de rol de servicio de Supabase |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Mensaje de estado de la operación |
|
||||
| `results` | array | Array de registros con puntuaciones de similitud de la búsqueda vectorial. Cada registro incluye un campo de similitud \(0-1\) que indica cuán similar es al vector de consulta. |
|
||||
|
||||
## Notas
|
||||
|
||||
- Categoría: `tools`
|
||||
|
||||
@@ -190,6 +190,26 @@ Envía animaciones (GIFs) a canales o usuarios de Telegram a través de la API d
|
||||
| `message` | string | Mensaje de éxito o error |
|
||||
| `data` | object | Datos del mensaje de Telegram incluyendo medios opcionales |
|
||||
|
||||
### `telegram_send_document`
|
||||
|
||||
Envía documentos (PDF, ZIP, DOC, etc.) a canales o usuarios de Telegram a través de la API de Bot de Telegram.
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | string | Sí | Tu token de API de Bot de Telegram |
|
||||
| `chatId` | string | Sí | ID del chat de Telegram objetivo |
|
||||
| `files` | file[] | No | Archivo de documento para enviar \(PDF, ZIP, DOC, etc.\). Tamaño máximo: 50MB |
|
||||
| `caption` | string | No | Leyenda del documento \(opcional\) |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | Mensaje de éxito o error |
|
||||
| `data` | object | Datos del mensaje de Telegram incluyendo documento |
|
||||
|
||||
## Notas
|
||||
|
||||
- Categoría: `tools`
|
||||
|
||||
@@ -57,11 +57,12 @@ Procesa y analiza imágenes utilizando modelos avanzados de visión. Capaz de co
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `apiKey` | string | Sí | Clave API para el proveedor de modelo seleccionado |
|
||||
| `imageUrl` | string | Sí | URL de imagen de acceso público |
|
||||
| `imageUrl` | string | No | URL de imagen accesible públicamente |
|
||||
| `imageFile` | file | No | Archivo de imagen para analizar |
|
||||
| `model` | string | No | Modelo de visión a utilizar \(gpt-4o, claude-3-opus-20240229, etc\) |
|
||||
| `prompt` | string | No | Indicación personalizada para análisis de imágenes |
|
||||
| `prompt` | string | No | Prompt personalizado para análisis de imagen |
|
||||
|
||||
#### Salida
|
||||
|
||||
|
||||
145
apps/docs/content/docs/es/tools/webflow.mdx
Normal file
145
apps/docs/content/docs/es/tools/webflow.mdx
Normal file
@@ -0,0 +1,145 @@
|
||||
---
|
||||
title: Webflow
|
||||
description: Gestionar colecciones CMS de Webflow
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="webflow"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 1080 674'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
fillRule='evenodd'
|
||||
clipRule='evenodd'
|
||||
d='M1080 0L735.386 673.684H411.695L555.916 394.481H549.445C430.464 548.934 252.942 650.61 -0.000488281 673.684V398.344C-0.000488281 398.344 161.813 388.787 256.938 288.776H-0.000488281V0.0053214H288.771V237.515L295.252 237.489L413.254 0.0053214H631.644V236.009L638.126 235.999L760.555 0H1080Z'
|
||||
fill='#146EF5'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Webflow](https://webflow.com/) es una potente plataforma visual de diseño web que te permite crear sitios web responsivos sin escribir código. Combina una interfaz de diseño visual con un robusto CMS (Sistema de Gestión de Contenidos) que te permite crear, gestionar y publicar contenido dinámico para tus sitios web.
|
||||
|
||||
Con Webflow, puedes:
|
||||
|
||||
- **Diseñar visualmente**: Crear sitios web personalizados con un editor visual que genera código HTML/CSS limpio y semántico
|
||||
- **Gestionar contenido dinámicamente**: Usar el CMS para crear colecciones de contenido estructurado como entradas de blog, productos, miembros del equipo o cualquier dato personalizado
|
||||
- **Publicar instantáneamente**: Implementar tus sitios en el alojamiento de Webflow o exportar el código para alojamiento personalizado
|
||||
- **Crear diseños responsivos**: Construir sitios que funcionen perfectamente en dispositivos de escritorio, tabletas y móviles
|
||||
- **Personalizar colecciones**: Definir campos personalizados y estructuras de datos para tus tipos de contenido
|
||||
- **Automatizar actualizaciones de contenido**: Gestionar programáticamente el contenido de tu CMS a través de APIs
|
||||
|
||||
En Sim, la integración con Webflow permite a tus agentes interactuar sin problemas con tus colecciones CMS de Webflow mediante autenticación API. Esto permite potentes escenarios de automatización como la creación automática de entradas de blog a partir de contenido generado por IA, actualización de información de productos, gestión de perfiles de miembros del equipo y recuperación de elementos CMS para la generación de contenido dinámico. Tus agentes pueden listar elementos existentes para navegar por tu contenido, recuperar elementos específicos por ID, crear nuevas entradas para añadir contenido fresco, actualizar elementos existentes para mantener la información actualizada y eliminar contenido obsoleto. Esta integración cierra la brecha entre tus flujos de trabajo de IA y tu CMS de Webflow, permitiendo la gestión automatizada de contenido, actualizaciones dinámicas del sitio web y flujos de trabajo de contenido optimizados que mantienen tus sitios frescos y actualizados sin intervención manual.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## Instrucciones de uso
|
||||
|
||||
Integra el CMS de Webflow en el flujo de trabajo. Puede crear, obtener, listar, actualizar o eliminar elementos en las colecciones del CMS de Webflow. Gestiona tu contenido de Webflow de forma programática. Se puede usar en modo de activación para iniciar flujos de trabajo cuando cambian los elementos de la colección o se envían formularios.
|
||||
|
||||
## Herramientas
|
||||
|
||||
### `webflow_list_items`
|
||||
|
||||
Listar todos los elementos de una colección del CMS de Webflow
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Sí | ID de la colección |
|
||||
| `offset` | number | No | Desplazamiento para paginación \(opcional\) |
|
||||
| `limit` | number | No | Número máximo de elementos a devolver \(opcional, predeterminado: 100\) |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | json | Array de elementos de la colección |
|
||||
| `metadata` | json | Metadatos sobre la consulta |
|
||||
|
||||
### `webflow_get_item`
|
||||
|
||||
Obtener un solo elemento de una colección del CMS de Webflow
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Sí | ID de la colección |
|
||||
| `itemId` | string | Sí | ID del elemento a recuperar |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | El objeto del elemento recuperado |
|
||||
| `metadata` | json | Metadatos sobre el elemento recuperado |
|
||||
|
||||
### `webflow_create_item`
|
||||
|
||||
Crear un nuevo elemento en una colección del CMS de Webflow
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Sí | ID de la colección |
|
||||
| `fieldData` | json | Sí | Datos de campo para el nuevo elemento como objeto JSON. Las claves deben coincidir con los nombres de campo de la colección. |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | El objeto del elemento creado |
|
||||
| `metadata` | json | Metadatos sobre el elemento creado |
|
||||
|
||||
### `webflow_update_item`
|
||||
|
||||
Actualizar un elemento existente en una colección CMS de Webflow
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Sí | ID de la colección |
|
||||
| `itemId` | string | Sí | ID del elemento a actualizar |
|
||||
| `fieldData` | json | Sí | Datos de campo para actualizar como objeto JSON. Solo incluye los campos que quieres cambiar. |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | El objeto del elemento actualizado |
|
||||
| `metadata` | json | Metadatos sobre el elemento actualizado |
|
||||
|
||||
### `webflow_delete_item`
|
||||
|
||||
Eliminar un elemento de una colección CMS de Webflow
|
||||
|
||||
#### Entrada
|
||||
|
||||
| Parámetro | Tipo | Obligatorio | Descripción |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Sí | ID de la colección |
|
||||
| `itemId` | string | Sí | ID del elemento a eliminar |
|
||||
|
||||
#### Salida
|
||||
|
||||
| Parámetro | Tipo | Descripción |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Si la eliminación fue exitosa |
|
||||
| `metadata` | json | Metadatos sobre la eliminación |
|
||||
|
||||
## Notas
|
||||
|
||||
- Categoría: `tools`
|
||||
- Tipo: `webflow`
|
||||
@@ -16,7 +16,7 @@ Les blocs sont les composants de construction que vous connectez pour créer des
|
||||
|
||||
## Types de blocs principaux
|
||||
|
||||
Sim propose sept types de blocs principaux qui gèrent les fonctions essentielles des flux de travail d'IA :
|
||||
Sim fournit des types de blocs essentiels qui gèrent les fonctions principales des flux de travail IA :
|
||||
|
||||
### Blocs de traitement
|
||||
- **[Agent](/blocks/agent)** - Dialoguez avec des modèles d'IA (OpenAI, Anthropic, Google, modèles locaux)
|
||||
@@ -28,8 +28,12 @@ Sim propose sept types de blocs principaux qui gèrent les fonctions essentielle
|
||||
- **[Router](/blocks/router)** - Utilisez l'IA pour acheminer intelligemment les requêtes vers différents chemins
|
||||
- **[Evaluator](/blocks/evaluator)** - Notez et évaluez la qualité du contenu à l'aide de l'IA
|
||||
|
||||
### Blocs de flux de contrôle
|
||||
- **[Variables](/blocks/variables)** - Définir et gérer des variables à portée de flux de travail
|
||||
- **[Wait](/blocks/wait)** - Mettre en pause l'exécution du flux de travail pendant un délai spécifié
|
||||
|
||||
### Blocs de sortie
|
||||
- **[Response](/blocks/response)** - Formatez et renvoyez les résultats finaux de votre flux de travail
|
||||
- **[Response](/blocks/response)** - Formater et renvoyer les résultats finaux de votre flux de travail
|
||||
|
||||
## Comment fonctionnent les blocs
|
||||
|
||||
@@ -37,7 +41,7 @@ Chaque bloc comporte trois composants principaux :
|
||||
|
||||
**Entrées** : données entrant dans le bloc depuis d'autres blocs ou saisies utilisateur
|
||||
**Configuration** : paramètres qui contrôlent le comportement du bloc
|
||||
**Sorties** : données que le bloc produit pour être utilisées par d'autres blocs
|
||||
**Sorties** : données produites par le bloc pour être utilisées par d'autres blocs
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
@@ -55,9 +59,9 @@ Chaque bloc comporte trois composants principaux :
|
||||
|
||||
Vous créez des flux de travail en connectant des blocs entre eux. La sortie d'un bloc devient l'entrée d'un autre :
|
||||
|
||||
- **Glisser pour connecter** : Faites glisser d'un port de sortie vers un port d'entrée
|
||||
- **Connexions multiples** : Une sortie peut se connecter à plusieurs entrées
|
||||
- **Chemins de ramification** : Certains blocs peuvent acheminer vers différents chemins selon les conditions
|
||||
- **Glisser pour connecter** : faites glisser d'un port de sortie vers un port d'entrée
|
||||
- **Connexions multiples** : une sortie peut se connecter à plusieurs entrées
|
||||
- **Chemins de branchement** : certains blocs peuvent acheminer vers différents chemins selon les conditions
|
||||
|
||||
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
|
||||
<Video src="connections.mp4" width={700} height={450} />
|
||||
@@ -72,8 +76,8 @@ Connectez les blocs en chaîne où chaque bloc traite la sortie du précédent :
|
||||
User Input → Agent → Function → Response
|
||||
```
|
||||
|
||||
### Ramification conditionnelle
|
||||
Utilisez des blocs de Condition ou de Routeur pour créer différents chemins :
|
||||
### Branchement conditionnel
|
||||
Utilisez des blocs Condition ou Router pour créer différents chemins :
|
||||
|
||||
```
|
||||
User Input → Router → Agent A (for questions)
|
||||
@@ -81,7 +85,7 @@ User Input → Router → Agent A (for questions)
|
||||
```
|
||||
|
||||
### Contrôle qualité
|
||||
Utilisez des blocs Évaluateur pour évaluer et filtrer les sorties :
|
||||
Utilisez des blocs Evaluator pour évaluer et filtrer les sorties :
|
||||
|
||||
```
|
||||
Agent → Evaluator → Condition → Response (if good)
|
||||
@@ -101,7 +105,7 @@ Chaque type de bloc possède des options de configuration spécifiques :
|
||||
- Sélection du modèle (OpenAI, Anthropic, Google, local)
|
||||
- Clés API et authentification
|
||||
- Température et autres paramètres du modèle
|
||||
- Prompts système et instructions
|
||||
- Instructions et prompts système
|
||||
|
||||
**Blocs logiques** (Condition, Fonction) :
|
||||
- Expressions ou code personnalisés
|
||||
@@ -109,7 +113,7 @@ Chaque type de bloc possède des options de configuration spécifiques :
|
||||
- Paramètres d'environnement d'exécution
|
||||
|
||||
**Blocs d'intégration** (API, Réponse) :
|
||||
- Configuration des points de terminaison
|
||||
- Configuration du point de terminaison
|
||||
- En-têtes et authentification
|
||||
- Formatage des requêtes/réponses
|
||||
|
||||
@@ -124,6 +128,12 @@ Chaque type de bloc possède des options de configuration spécifiques :
|
||||
Intégrez des services externes et des API
|
||||
</Card>
|
||||
<Card title="Bloc Condition" href="/blocks/condition">
|
||||
Créez une logique de ramification basée sur l'évaluation des données
|
||||
Créez une logique de branchement basée sur l'évaluation des données
|
||||
</Card>
|
||||
<Card title="Bloc Variables" href="/blocks/variables">
|
||||
Définissez et gérez des variables à portée de workflow
|
||||
</Card>
|
||||
<Card title="Bloc Attente" href="/blocks/wait">
|
||||
Mettez en pause l'exécution du workflow pour des délais spécifiés
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
Le bloc Loop est un bloc conteneur dans Sim qui vous permet de créer des flux de travail itératifs en exécutant un groupe de blocs de façon répétée. Les boucles permettent un traitement itératif dans vos flux de travail.
|
||||
|
||||
Le bloc Loop prend en charge deux types d'itération :
|
||||
Le bloc Boucle prend en charge quatre types d'itération :
|
||||
|
||||
<Callout type="info">
|
||||
Les blocs Loop sont des nœuds conteneurs qui peuvent contenir d'autres blocs. Les blocs à l'intérieur d'une boucle s'exécuteront plusieurs fois selon votre configuration.
|
||||
@@ -21,16 +21,16 @@ Le bloc Loop vous permet de :
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Itérer sur des collections</strong> : traiter des tableaux ou des objets un élément à la fois
|
||||
<strong>Itérer sur des collections</strong> : Traiter des tableaux ou des objets un élément à la fois
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Répéter des opérations</strong> : exécuter des blocs un nombre fixe de fois
|
||||
<strong>Répéter des opérations</strong> : Exécuter des blocs un nombre fixe de fois
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Traitement séquentiel</strong> : gérer la transformation des données dans des itérations ordonnées
|
||||
<strong>Boucler sur des conditions</strong> : Continuer l'exécution tant qu'une condition est remplie ou jusqu'à ce qu'elle le soit
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Agréger les résultats</strong> : collecter les sorties de toutes les itérations de la boucle
|
||||
<strong>Agréger des résultats</strong> : Collecter les sorties de toutes les itérations de la boucle
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
@@ -47,11 +47,11 @@ Le bloc Loop exécute les blocs contenus par itération séquentielle :
|
||||
|
||||
### Type de boucle
|
||||
|
||||
Choisissez entre deux types de boucles :
|
||||
Choisissez parmi quatre types de boucles :
|
||||
|
||||
<Tabs items={['For Loop', 'ForEach Loop']}>
|
||||
<Tabs items={['Boucle For', 'Boucle ForEach', 'Boucle While', 'Boucle Do-While']}>
|
||||
<Tab>
|
||||
**For Loop (Itérations)** - Une boucle numérique qui s'exécute un nombre fixe de fois :
|
||||
**Boucle For (Itérations)** - Une boucle numérique qui s'exécute un nombre fixe de fois :
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
@@ -100,6 +100,58 @@ Choisissez entre deux types de boucles :
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
**Boucle While (Basée sur condition)** - Continue l'exécution tant qu'une condition est évaluée à vrai :
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="Boucle While avec condition"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Utilisez cette option lorsque vous devez boucler jusqu'à ce qu'une condition spécifique soit remplie. La condition est vérifiée **avant** chaque itération.
|
||||
|
||||
|
||||
```
|
||||
Example: While <variable.i> < 10
|
||||
- Check condition → Execute if true
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Execute if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
**Boucle Do-While (Basée sur condition)** - S'exécute au moins une fois, puis continue tant qu'une condition est vraie :
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="Boucle Do-While avec condition"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Utilisez cette option lorsque vous devez exécuter au moins une fois, puis boucler jusqu'à ce qu'une condition soit remplie. La condition est vérifiée **après** chaque itération.
|
||||
|
||||
|
||||
```
|
||||
Example: Do-while <variable.i> < 10
|
||||
- Execute blocks
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Continue if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## Comment utiliser les boucles
|
||||
@@ -113,16 +165,16 @@ Choisissez entre deux types de boucles :
|
||||
|
||||
### Accès aux résultats
|
||||
|
||||
Une fois qu'une boucle est terminée, vous pouvez accéder aux résultats agrégés :
|
||||
Après la fin d'une boucle, vous pouvez accéder aux résultats agrégés :
|
||||
|
||||
- **`<loop.results>`** : tableau des résultats de toutes les itérations de la boucle
|
||||
- **`<loop.results>`** : Tableau des résultats de toutes les itérations de la boucle
|
||||
|
||||
## Exemples de cas d'utilisation
|
||||
|
||||
### Traitement des résultats d'API
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scénario : traiter plusieurs enregistrements clients</h4>
|
||||
<h4 className="font-medium">Scénario : Traiter plusieurs enregistrements clients</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Le bloc API récupère la liste des clients</li>
|
||||
<li>La boucle ForEach itère sur chaque client</li>
|
||||
@@ -134,15 +186,28 @@ Une fois qu'une boucle est terminée, vous pouvez accéder aux résultats agrég
|
||||
### Génération itérative de contenu
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scénario : générer plusieurs variations</h4>
|
||||
<h4 className="font-medium">Scénario : Générer plusieurs variations</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Définir une boucle For à 5 itérations</li>
|
||||
<li>Configurer la boucle For à 5 itérations</li>
|
||||
<li>À l'intérieur de la boucle : l'agent génère une variation de contenu</li>
|
||||
<li>À l'intérieur de la boucle : l'évaluateur note le contenu</li>
|
||||
<li>Après la boucle : la fonction sélectionne la meilleure variation</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Compteur avec boucle While
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scénario : Traiter des éléments avec une boucle basée sur un compteur</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Initialiser la variable de workflow : `i = 0`</li>
|
||||
<li>Boucle While avec condition : `<variable.i>` \< 10</li>
|
||||
<li>À l'intérieur de la boucle : l'agent traite l'élément à l'index `<variable.i>`</li>
|
||||
<li>À l'intérieur de la boucle : la variable incrémente `i = <variable.i> + 1`</li>
|
||||
<li>La boucle continue tant que i est inférieur à 10</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Fonctionnalités avancées
|
||||
|
||||
### Limitations
|
||||
@@ -153,7 +218,7 @@ Une fois qu'une boucle est terminée, vous pouvez accéder aux résultats agrég
|
||||
- Vous ne pouvez pas placer un bloc Parallèle à l'intérieur d'un bloc Boucle
|
||||
- Vous ne pouvez pas placer un bloc conteneur à l'intérieur d'un autre bloc conteneur
|
||||
|
||||
Si vous avez besoin d'une itération multidimensionnelle, envisagez de restructurer votre flux de travail pour utiliser des boucles séquentielles ou traiter les données par étapes.
|
||||
Si vous avez besoin d'une itération multidimensionnelle, envisagez de restructurer votre workflow pour utiliser des boucles séquentielles ou traiter les données par étapes.
|
||||
</Callout>
|
||||
|
||||
<Callout type="info">
|
||||
@@ -166,13 +231,16 @@ Une fois qu'une boucle est terminée, vous pouvez accéder aux résultats agrég
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>Type de boucle</strong> : choisissez entre 'for' ou 'forEach'
|
||||
<strong>Type de boucle</strong> : choisissez entre 'for', 'forEach', 'while' ou 'doWhile'
|
||||
</li>
|
||||
<li>
|
||||
<strong>Itérations</strong> : nombre de fois à exécuter (pour les boucles for)
|
||||
<strong>Itérations</strong> : nombre de fois à exécuter (boucles for)
|
||||
</li>
|
||||
<li>
|
||||
<strong>Collection</strong> : tableau ou objet à parcourir (pour les boucles forEach)
|
||||
<strong>Collection</strong> : tableau ou objet à parcourir (boucles forEach)
|
||||
</li>
|
||||
<li>
|
||||
<strong>Condition</strong> : expression booléenne à évaluer (boucles while/do-while)
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
@@ -208,4 +276,4 @@ Une fois qu'une boucle est terminée, vous pouvez accéder aux résultats agrég
|
||||
|
||||
- **Définir des limites raisonnables** : gardez un nombre d'itérations raisonnable pour éviter des temps d'exécution longs
|
||||
- **Utiliser ForEach pour les collections** : lors du traitement de tableaux ou d'objets, utilisez les boucles ForEach plutôt que les boucles For
|
||||
- **Gérer les erreurs avec élégance** : envisagez d'ajouter une gestion des erreurs à l'intérieur des boucles pour des flux de travail robustes
|
||||
- **Gérer les erreurs avec élégance** : envisagez d'ajouter une gestion des erreurs à l'intérieur des boucles pour des workflows robustes
|
||||
|
||||
123
apps/docs/content/docs/fr/blocks/variables.mdx
Normal file
123
apps/docs/content/docs/fr/blocks/variables.mdx
Normal file
@@ -0,0 +1,123 @@
|
||||
---
|
||||
title: Variables
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
Le bloc Variables met à jour les variables du workflow pendant l'exécution. Les variables doivent d'abord être initialisées dans la section Variables de votre workflow, puis vous pouvez utiliser ce bloc pour mettre à jour leurs valeurs pendant l'exécution de votre workflow.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/variables.png"
|
||||
alt="Bloc Variables"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Callout>
|
||||
Accédez aux variables n'importe où dans votre workflow en utilisant la syntaxe `<variable.variableName>`.
|
||||
</Callout>
|
||||
|
||||
## Aperçu
|
||||
|
||||
Le bloc Variables vous permet de :
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Mettre à jour les variables du workflow</strong> : modifier les valeurs des variables pendant l'exécution
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Stocker des données dynamiques</strong> : capturer les sorties de blocs dans des variables
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Maintenir l'état</strong> : suivre les compteurs, les indicateurs et les résultats intermédiaires
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Comment utiliser les variables
|
||||
|
||||
### 1. Initialiser dans les variables du workflow
|
||||
|
||||
Tout d'abord, créez vos variables dans la section Variables du workflow (accessible depuis les paramètres du workflow) :
|
||||
|
||||
```
|
||||
customerEmail = ""
|
||||
retryCount = 0
|
||||
currentStatus = "pending"
|
||||
```
|
||||
|
||||
### 2. Mettre à jour avec le bloc Variables
|
||||
|
||||
Utilisez le bloc Variables pour mettre à jour ces valeurs pendant l'exécution :
|
||||
|
||||
```
|
||||
customerEmail = <api.email>
|
||||
retryCount = <variable.retryCount> + 1
|
||||
currentStatus = "processing"
|
||||
```
|
||||
|
||||
### 3. Accéder n'importe où
|
||||
|
||||
Référencez les variables dans n'importe quel bloc :
|
||||
|
||||
```
|
||||
Agent prompt: "Send email to <variable.customerEmail>"
|
||||
Condition: <variable.retryCount> < 5
|
||||
API body: {"status": "<variable.currentStatus>"}
|
||||
```
|
||||
|
||||
## Exemples de cas d'utilisation
|
||||
|
||||
### Compteur de boucle et état
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scénario : suivre la progression à travers les itérations de boucle</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Initialisation dans le workflow : `itemsProcessed = 0`, `lastResult = ""`</li>
|
||||
<li>La boucle itère sur les éléments</li>
|
||||
<li>Dans la boucle : l'agent traite l'élément actuel</li>
|
||||
<li>Dans la boucle : Variables met à jour `itemsProcessed = <variable.itemsProcessed> + 1`</li>
|
||||
<li>Dans la boucle : Variables met à jour `lastResult = <agent.content>`</li>
|
||||
<li>Itération suivante : accès à `<variable.lastResult>` pour comparer avec le résultat actuel</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Logique de nouvelle tentative
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scénario : suivre les tentatives de nouvelle requête API</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Initialisation dans le workflow : `retryCount = 0`</li>
|
||||
<li>Le bloc API tente une requête</li>
|
||||
<li>En cas d'échec, Variables incrémente : `retryCount = <variable.retryCount> + 1`</li>
|
||||
<li>La condition vérifie si `<variable.retryCount>` \< 3 pour réessayer ou échouer</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Configuration dynamique
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scénario : stocker le contexte utilisateur pour le workflow</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Initialisation dans le workflow : `userId = ""`, `userTier = ""`</li>
|
||||
<li>L'API récupère le profil utilisateur</li>
|
||||
<li>Les variables stockent : `userId = <api.id>`, `userTier = <api.tier>`</li>
|
||||
<li>L'agent personnalise la réponse en utilisant `<variable.userTier>`</li>
|
||||
<li>L'API utilise `<variable.userId>` pour la journalisation</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Sorties
|
||||
|
||||
- **`<variables.assignments>`** : objet JSON avec toutes les affectations de variables de ce bloc
|
||||
|
||||
## Bonnes pratiques
|
||||
|
||||
- **Initialiser dans les paramètres du workflow** : toujours créer des variables dans la section Variables du workflow avant de les utiliser
|
||||
- **Mettre à jour dynamiquement** : utiliser les blocs Variables pour mettre à jour les valeurs en fonction des sorties de blocs ou des calculs
|
||||
- **Utiliser dans les boucles** : parfait pour suivre l'état à travers les itérations
|
||||
- **Nommer de façon descriptive** : utiliser des noms clairs comme `currentIndex`, `totalProcessed`, ou `lastError`
|
||||
99
apps/docs/content/docs/fr/blocks/wait.mdx
Normal file
99
apps/docs/content/docs/fr/blocks/wait.mdx
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: Attente
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
Le bloc Attente met en pause votre flux de travail pendant une durée spécifiée avant de continuer vers le bloc suivant. Utilisez-le pour ajouter des délais entre les actions, respecter les limites de taux des API ou espacer les opérations.
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/wait.png"
|
||||
alt="Bloc d'attente"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
## Aperçu
|
||||
|
||||
Le bloc Attente vous permet de :
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>Ajouter des délais</strong> : mettre en pause l'exécution entre les étapes du flux de travail
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Respecter les limites de taux</strong> : espacer les appels API pour rester dans les limites
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>Planifier des séquences</strong> : créer des flux de travail chronométrés avec des délais entre les actions
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## Configuration
|
||||
|
||||
### Durée d'attente
|
||||
|
||||
Saisissez la durée de mise en pause de l'exécution :
|
||||
- **Entrée** : nombre positif
|
||||
- **Maximum** : 600 secondes (10 minutes) ou 10 minutes
|
||||
|
||||
### Unité
|
||||
|
||||
Choisissez l'unité de temps :
|
||||
- **Secondes** : pour des délais courts et précis
|
||||
- **Minutes** : pour des pauses plus longues
|
||||
|
||||
<Callout type="info">
|
||||
Les blocs d'attente peuvent être annulés en arrêtant le flux de travail. La durée d'attente maximale est de 10 minutes.
|
||||
</Callout>
|
||||
|
||||
## Sorties
|
||||
|
||||
- **`<wait.waitDuration>`** : la durée d'attente en millisecondes
|
||||
- **`<wait.status>`** : statut de l'attente ('waiting', 'completed', ou 'cancelled')
|
||||
|
||||
## Exemples de cas d'utilisation
|
||||
|
||||
### Limitation du taux d'API
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scénario : rester dans les limites de taux d'API</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Le bloc API effectue la première requête</li>
|
||||
<li>Le bloc Attente fait une pause de 2 secondes</li>
|
||||
<li>Le bloc API effectue la deuxième requête</li>
|
||||
<li>Le processus continue sans atteindre les limites de taux</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Notifications chronométrées
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scénario : envoyer des messages de suivi</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>La fonction envoie l'email initial</li>
|
||||
<li>Le bloc Attente fait une pause de 5 minutes</li>
|
||||
<li>La fonction envoie l'email de suivi</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Retards de traitement
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">Scénario : Attente d'un système externe</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>Le bloc API déclenche une tâche dans un système externe</li>
|
||||
<li>Le bloc d'attente fait une pause de 30 secondes</li>
|
||||
<li>Le bloc API vérifie l'état d'achèvement de la tâche</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## Bonnes pratiques
|
||||
|
||||
- **Gardez des attentes raisonnables** : utilisez l'attente pour des délais jusqu'à 10 minutes. Pour des délais plus longs, envisagez des workflows programmés
|
||||
- **Surveillez le temps d'exécution** : n'oubliez pas que les attentes prolongent la durée totale du workflow
|
||||
@@ -211,14 +211,14 @@ Remplir Clay avec des données provenant d'un fichier JSON. Permet une communica
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `webhookURL` | string | Oui | L'URL du webhook à remplir |
|
||||
| `data` | json | Oui | Les données à remplir |
|
||||
| `authToken` | string | Oui | Jeton d'authentification pour l'authentification du webhook Clay |
|
||||
| `authToken` | string | Non | Jeton d'authentification optionnel pour l'authentification du webhook Clay \(la plupart des webhooks ne nécessitent pas cela\) |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Statut de réussite de l'opération |
|
||||
| `output` | json | Résultats de l'opération de remplissage Clay incluant les données de réponse du webhook Clay |
|
||||
| `data` | json | Données de réponse du webhook Clay |
|
||||
| `metadata` | object | Métadonnées de réponse du webhook |
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="discord"
|
||||
color="#E0E0E0"
|
||||
color="#5865F2"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
@@ -72,6 +72,7 @@ Envoyer un message à un canal Discord
|
||||
| `channelId` | chaîne | Oui | L'ID du canal Discord où envoyer le message |
|
||||
| `content` | chaîne | Non | Le contenu textuel du message |
|
||||
| `serverId` | chaîne | Oui | L'ID du serveur Discord \(ID de guilde\) |
|
||||
| `files` | fichier[] | Non | Fichiers à joindre au message |
|
||||
|
||||
#### Sortie
|
||||
|
||||
|
||||
@@ -84,11 +84,12 @@ Téléverser un fichier vers Google Drive
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `fileName` | chaîne | Oui | Le nom du fichier à téléverser |
|
||||
| `content` | chaîne | Oui | Le contenu du fichier à téléverser |
|
||||
| `mimeType` | chaîne | Non | Le type MIME du fichier à téléverser |
|
||||
| `folderSelector` | chaîne | Non | Sélectionnez le dossier où téléverser le fichier |
|
||||
| `folderId` | chaîne | Non | L'ID du dossier où téléverser le fichier \(usage interne\) |
|
||||
| `fileName` | string | Oui | Le nom du fichier à télécharger |
|
||||
| `file` | file | Non | Fichier binaire à télécharger \(objet UserFile\) |
|
||||
| `content` | string | Non | Contenu textuel à télécharger \(utilisez ceci OU fichier, pas les deux\) |
|
||||
| `mimeType` | string | Non | Le type MIME du fichier à télécharger \(détecté automatiquement à partir du fichier si non fourni\) |
|
||||
| `folderSelector` | string | Non | Sélectionnez le dossier dans lequel télécharger le fichier |
|
||||
| `folderId` | string | Non | L'ID du dossier dans lequel télécharger le fichier \(usage interne\) |
|
||||
|
||||
#### Sortie
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ Lire le contenu d'un chat Microsoft Teams
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `chatId` | chaîne | Oui | L'ID de la conversation dans laquelle écrire |
|
||||
| `content` | chaîne | Oui | Le contenu à écrire dans le message |
|
||||
| `files` | fichier[] | Non | Fichiers à joindre au message |
|
||||
|
||||
#### Sortie
|
||||
|
||||
@@ -180,10 +181,11 @@ Lire le contenu d'un canal Microsoft Teams
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `teamId` | chaîne | Oui | L'ID de l'équipe à laquelle écrire |
|
||||
| `channelId` | chaîne | Oui | L'ID du canal auquel écrire |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `teamId` | chaîne | Oui | L'ID de l'équipe dans laquelle écrire |
|
||||
| `channelId` | chaîne | Oui | L'ID du canal dans lequel écrire |
|
||||
| `content` | chaîne | Oui | Le contenu à écrire dans le canal |
|
||||
| `files` | fichier[] | Non | Fichiers à joindre au message |
|
||||
|
||||
#### Sortie
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ Dans Sim, l'intégration OneDrive permet à vos agents d'interagir directement a
|
||||
|
||||
## Instructions d'utilisation
|
||||
|
||||
Intégrez OneDrive dans le flux de travail. Permet de créer, téléverser et lister des fichiers. Nécessite OAuth.
|
||||
Intégrer OneDrive dans le flux de travail. Peut créer des fichiers texte et Excel, télécharger des fichiers et lister des fichiers.
|
||||
|
||||
## Outils
|
||||
|
||||
@@ -61,11 +61,13 @@ Télécharger un fichier vers OneDrive
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `fileName` | chaîne | Oui | Le nom du fichier à télécharger |
|
||||
| `content` | chaîne | Oui | Le contenu du fichier à télécharger |
|
||||
| `folderSelector` | chaîne | Non | Sélectionnez le dossier où télécharger le fichier |
|
||||
| `manualFolderId` | chaîne | Non | ID du dossier saisi manuellement \(mode avancé\) |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `fileName` | string | Oui | Le nom du fichier à télécharger |
|
||||
| `file` | file | Non | Le fichier à télécharger \(binaire\) |
|
||||
| `content` | string | Non | Le contenu textuel à télécharger \(si aucun fichier n'est fourni\) |
|
||||
| `mimeType` | string | Non | Le type MIME du fichier à créer \(par exemple, text/plain pour .txt, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet pour .xlsx\) |
|
||||
| `folderSelector` | string | Non | Sélectionner le dossier où télécharger le fichier |
|
||||
| `manualFolderId` | string | Non | ID de dossier saisi manuellement \(mode avancé\) |
|
||||
|
||||
#### Sortie
|
||||
|
||||
|
||||
@@ -150,14 +150,15 @@ Envoyer des e-mails avec Outlook
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `to` | chaîne | Oui | Adresse e-mail du destinataire |
|
||||
| `subject` | chaîne | Oui | Objet de l'e-mail |
|
||||
| `body` | chaîne | Oui | Contenu du corps de l'e-mail |
|
||||
| `replyToMessageId` | chaîne | Non | ID du message auquel répondre \(pour le fil de discussion\) |
|
||||
| `conversationId` | chaîne | Non | ID de conversation pour le fil de discussion |
|
||||
| `cc` | chaîne | Non | Destinataires en CC \(séparés par des virgules\) |
|
||||
| `bcc` | chaîne | Non | Destinataires en BCC \(séparés par des virgules\) |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `to` | string | Oui | Adresse e-mail du destinataire |
|
||||
| `subject` | string | Oui | Objet de l'e-mail |
|
||||
| `body` | string | Oui | Contenu du corps de l'e-mail |
|
||||
| `replyToMessageId` | string | Non | ID du message auquel répondre \(pour le fil de discussion\) |
|
||||
| `conversationId` | string | Non | ID de conversation pour le fil de discussion |
|
||||
| `cc` | string | Non | Destinataires en CC \(séparés par des virgules\) |
|
||||
| `bcc` | string | Non | Destinataires en BCC \(séparés par des virgules\) |
|
||||
| `attachments` | file[] | Non | Fichiers à joindre à l'e-mail |
|
||||
|
||||
#### Sortie
|
||||
|
||||
@@ -175,12 +176,13 @@ Rédiger des e-mails avec Outlook
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `to` | string | Oui | Adresse e-mail du destinataire |
|
||||
| `subject` | string | Oui | Objet de l'e-mail |
|
||||
| `body` | string | Oui | Contenu du corps de l'e-mail |
|
||||
| `cc` | string | Non | Destinataires en CC \(séparés par des virgules\) |
|
||||
| `bcc` | string | Non | Destinataires en BCC \(séparés par des virgules\) |
|
||||
| `attachments` | file[] | Non | Fichiers à joindre au brouillon d'e-mail |
|
||||
|
||||
#### Sortie
|
||||
|
||||
|
||||
@@ -133,13 +133,14 @@ Rechercher des vecteurs similaires dans une collection Qdrant
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `url` | chaîne | Oui | URL de base Qdrant |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `url` | chaîne | Oui | URL de base de Qdrant |
|
||||
| `apiKey` | chaîne | Non | Clé API Qdrant \(facultative\) |
|
||||
| `collection` | chaîne | Oui | Nom de la collection |
|
||||
| `vector` | tableau | Oui | Vecteur à rechercher |
|
||||
| `limit` | nombre | Non | Nombre de résultats à retourner |
|
||||
| `filter` | objet | Non | Filtre à appliquer à la recherche |
|
||||
| `search_return_data` | chaîne | Non | Données à retourner de la recherche |
|
||||
| `with_payload` | booléen | Non | Inclure la charge utile dans la réponse |
|
||||
| `with_vector` | booléen | Non | Inclure le vecteur dans la réponse |
|
||||
|
||||
@@ -157,11 +158,12 @@ Récupérer des points par ID depuis une collection Qdrant
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `url` | chaîne | Oui | URL de base Qdrant |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `url` | chaîne | Oui | URL de base de Qdrant |
|
||||
| `apiKey` | chaîne | Non | Clé API Qdrant \(facultative\) |
|
||||
| `collection` | chaîne | Oui | Nom de la collection |
|
||||
| `ids` | tableau | Oui | Tableau d'identifiants de points à récupérer |
|
||||
| `fetch_return_data` | chaîne | Non | Données à retourner de la récupération |
|
||||
| `with_payload` | booléen | Non | Inclure la charge utile dans la réponse |
|
||||
| `with_vector` | booléen | Non | Inclure le vecteur dans la réponse |
|
||||
|
||||
|
||||
@@ -199,6 +199,26 @@ Ajouter un nouvel élément à une liste SharePoint
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | object | Élément de liste SharePoint créé |
|
||||
|
||||
### `sharepoint_upload_file`
|
||||
|
||||
Télécharger des fichiers vers une bibliothèque de documents SharePoint
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `siteId` | chaîne | Non | L'ID du site SharePoint |
|
||||
| `driveId` | chaîne | Non | L'ID de la bibliothèque de documents \(lecteur\). Si non fourni, utilise le lecteur par défaut. |
|
||||
| `folderPath` | chaîne | Non | Chemin de dossier optionnel dans la bibliothèque de documents \(par exemple, /Documents/Sousdossier\) |
|
||||
| `fileName` | chaîne | Non | Optionnel : remplacer le nom du fichier téléchargé |
|
||||
| `files` | fichier[] | Non | Fichiers à télécharger vers SharePoint |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `uploadedFiles` | tableau | Tableau d'objets de fichiers téléchargés |
|
||||
|
||||
## Remarques
|
||||
|
||||
- Catégorie : `tools`
|
||||
|
||||
@@ -75,11 +75,12 @@ Envoyez des messages aux canaux ou utilisateurs Slack via l'API Slack. Prend en
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `authMethod` | chaîne | Non | Méthode d'authentification : oauth ou bot_token |
|
||||
| `botToken` | chaîne | Non | Jeton du bot pour le Bot personnalisé |
|
||||
| `channel` | chaîne | Oui | Canal Slack cible (par ex., #general) |
|
||||
| `text` | chaîne | Oui | Texte du message à envoyer (prend en charge le formatage mrkdwn de Slack) |
|
||||
| `botToken` | chaîne | Non | Jeton du bot pour Bot personnalisé |
|
||||
| `channel` | chaîne | Oui | Canal Slack cible \(par ex., #general\) |
|
||||
| `text` | chaîne | Oui | Texte du message à envoyer \(prend en charge le formatage mrkdwn de Slack\) |
|
||||
| `files` | fichier[] | Non | Fichiers à joindre au message |
|
||||
|
||||
#### Sortie
|
||||
|
||||
|
||||
@@ -202,6 +202,28 @@ Insérer ou mettre à jour des données dans une table Supabase (opération upse
|
||||
| `message` | string | Message d'état de l'opération |
|
||||
| `results` | array | Tableau des enregistrements insérés ou mis à jour |
|
||||
|
||||
### `supabase_vector_search`
|
||||
|
||||
Effectuer une recherche de similarité en utilisant pgvector dans une table Supabase
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `projectId` | chaîne | Oui | L'ID de votre projet Supabase (ex. : jdrkgepadsdopsntdlom) |
|
||||
| `functionName` | chaîne | Oui | Le nom de la fonction PostgreSQL qui effectue la recherche vectorielle (ex. : match_documents) |
|
||||
| `queryEmbedding` | tableau | Oui | Le vecteur/embedding de requête pour rechercher des éléments similaires |
|
||||
| `matchThreshold` | nombre | Non | Seuil minimum de similarité (0-1), généralement 0,7-0,9 |
|
||||
| `matchCount` | nombre | Non | Nombre maximum de résultats à retourner (par défaut : 10) |
|
||||
| `apiKey` | chaîne | Oui | Votre clé secrète de rôle de service Supabase |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | chaîne | Message d'état de l'opération |
|
||||
| `results` | tableau | Tableau d'enregistrements avec scores de similarité issus de la recherche vectorielle. Chaque enregistrement inclut un champ de similarité (0-1) indiquant son degré de similarité avec le vecteur de requête. |
|
||||
|
||||
## Notes
|
||||
|
||||
- Catégorie : `tools`
|
||||
|
||||
@@ -190,6 +190,26 @@ Envoyez des animations (GIF) aux canaux ou utilisateurs Telegram via l'API Bot T
|
||||
| `message` | chaîne | Message de succès ou d'erreur |
|
||||
| `data` | objet | Données du message Telegram incluant les médias optionnels |
|
||||
|
||||
### `telegram_send_document`
|
||||
|
||||
Envoyez des documents (PDF, ZIP, DOC, etc.) aux canaux ou utilisateurs Telegram via l'API Bot Telegram.
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ----------- | ----------- |
|
||||
| `botToken` | chaîne | Oui | Votre jeton d'API Bot Telegram |
|
||||
| `chatId` | chaîne | Oui | ID du chat Telegram cible |
|
||||
| `files` | fichier[] | Non | Fichier document à envoyer \(PDF, ZIP, DOC, etc.\). Taille max : 50 Mo |
|
||||
| `caption` | chaîne | Non | Légende du document \(facultatif\) |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | chaîne | Message de succès ou d'erreur |
|
||||
| `data` | objet | Données du message Telegram incluant le document |
|
||||
|
||||
## Notes
|
||||
|
||||
- Catégorie : `tools`
|
||||
|
||||
@@ -58,10 +58,11 @@ Traitez et analysez des images en utilisant des modèles de vision avancés. Cap
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `apiKey` | chaîne | Oui | Clé API pour le fournisseur de modèle sélectionné |
|
||||
| `imageUrl` | chaîne | Oui | URL d'image accessible publiquement |
|
||||
| `model` | chaîne | Non | Modèle de vision à utiliser \(gpt-4o, claude-3-opus-20240229, etc\) |
|
||||
| `prompt` | chaîne | Non | Prompt personnalisé pour l'analyse d'image |
|
||||
| `apiKey` | string | Oui | Clé API pour le fournisseur de modèle sélectionné |
|
||||
| `imageUrl` | string | Non | URL d'image accessible publiquement |
|
||||
| `imageFile` | file | Non | Fichier image à analyser |
|
||||
| `model` | string | Non | Modèle de vision à utiliser \(gpt-4o, claude-3-opus-20240229, etc\) |
|
||||
| `prompt` | string | Non | Invite personnalisée pour l'analyse d'image |
|
||||
|
||||
#### Sortie
|
||||
|
||||
|
||||
145
apps/docs/content/docs/fr/tools/webflow.mdx
Normal file
145
apps/docs/content/docs/fr/tools/webflow.mdx
Normal file
@@ -0,0 +1,145 @@
|
||||
---
|
||||
title: Webflow
|
||||
description: Gérer les collections CMS de Webflow
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="webflow"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 1080 674'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
fillRule='evenodd'
|
||||
clipRule='evenodd'
|
||||
d='M1080 0L735.386 673.684H411.695L555.916 394.481H549.445C430.464 548.934 252.942 650.61 -0.000488281 673.684V398.344C-0.000488281 398.344 161.813 388.787 256.938 288.776H-0.000488281V0.0053214H288.771V237.515L295.252 237.489L413.254 0.0053214H631.644V236.009L638.126 235.999L760.555 0H1080Z'
|
||||
fill='#146EF5'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Webflow](https://webflow.com/) est une plateforme puissante de conception web visuelle qui vous permet de créer des sites web responsifs sans écrire de code. Elle combine une interface de conception visuelle avec un CMS (système de gestion de contenu) robuste qui vous permet de créer, gérer et publier du contenu dynamique pour vos sites web.
|
||||
|
||||
Avec Webflow, vous pouvez :
|
||||
|
||||
- **Concevoir visuellement** : créer des sites web personnalisés avec un éditeur visuel qui génère du code HTML/CSS propre et sémantique
|
||||
- **Gérer du contenu dynamiquement** : utiliser le CMS pour créer des collections de contenu structuré comme des articles de blog, des produits, des membres d'équipe ou toute donnée personnalisée
|
||||
- **Publier instantanément** : déployer vos sites sur l'hébergement de Webflow ou exporter le code pour un hébergement personnalisé
|
||||
- **Créer des designs responsifs** : construire des sites qui fonctionnent parfaitement sur ordinateur, tablette et appareils mobiles
|
||||
- **Personnaliser les collections** : définir des champs personnalisés et des structures de données pour vos types de contenu
|
||||
- **Automatiser les mises à jour de contenu** : gérer programmatiquement votre contenu CMS via des API
|
||||
|
||||
Dans Sim, l'intégration Webflow permet à vos agents d'interagir de manière transparente avec vos collections CMS Webflow grâce à l'authentification API. Cela permet des scénarios d'automatisation puissants tels que la création automatique d'articles de blog à partir de contenu généré par IA, la mise à jour d'informations sur les produits, la gestion des profils des membres de l'équipe et la récupération d'éléments CMS pour la génération de contenu dynamique. Vos agents peuvent lister les éléments existants pour parcourir votre contenu, récupérer des éléments spécifiques par ID, créer de nouvelles entrées pour ajouter du contenu frais, mettre à jour des éléments existants pour maintenir les informations à jour et supprimer du contenu obsolète. Cette intégration comble le fossé entre vos flux de travail IA et votre CMS Webflow, permettant une gestion automatisée du contenu, des mises à jour dynamiques de sites web et des flux de travail de contenu rationalisés qui maintiennent vos sites frais et à jour sans intervention manuelle.
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## Instructions d'utilisation
|
||||
|
||||
Intègre le CMS Webflow dans le flux de travail. Peut créer, obtenir, lister, mettre à jour ou supprimer des éléments dans les collections CMS Webflow. Gérez votre contenu Webflow par programmation. Peut être utilisé en mode déclencheur pour lancer des flux de travail lorsque les éléments de collection changent ou lorsque des formulaires sont soumis.
|
||||
|
||||
## Outils
|
||||
|
||||
### `webflow_list_items`
|
||||
|
||||
Lister tous les éléments d'une collection CMS Webflow
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Oui | ID de la collection |
|
||||
| `offset` | number | Non | Décalage pour la pagination \(facultatif\) |
|
||||
| `limit` | number | Non | Nombre maximum d'éléments à retourner \(facultatif, par défaut : 100\) |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | json | Tableau des éléments de la collection |
|
||||
| `metadata` | json | Métadonnées sur la requête |
|
||||
|
||||
### `webflow_get_item`
|
||||
|
||||
Obtenir un seul élément d'une collection CMS Webflow
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | Oui | ID de la collection |
|
||||
| `itemId` | string | Oui | ID de l'élément à récupérer |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | L'objet de l'élément récupéré |
|
||||
| `metadata` | json | Métadonnées sur l'élément récupéré |
|
||||
|
||||
### `webflow_create_item`
|
||||
|
||||
Créer un nouvel élément dans une collection CMS Webflow
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `collectionId` | string | Oui | ID de la collection |
|
||||
| `fieldData` | json | Oui | Données de champ pour le nouvel élément sous forme d'objet JSON. Les clés doivent correspondre aux noms des champs de la collection. |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | L'objet de l'élément créé |
|
||||
| `metadata` | json | Métadonnées concernant l'élément créé |
|
||||
|
||||
### `webflow_update_item`
|
||||
|
||||
Mettre à jour un élément existant dans une collection CMS Webflow
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `collectionId` | string | Oui | ID de la collection |
|
||||
| `itemId` | string | Oui | ID de l'élément à mettre à jour |
|
||||
| `fieldData` | json | Oui | Données de champ à mettre à jour sous forme d'objet JSON. N'incluez que les champs que vous souhaitez modifier. |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | L'objet de l'élément mis à jour |
|
||||
| `metadata` | json | Métadonnées concernant l'élément mis à jour |
|
||||
|
||||
### `webflow_delete_item`
|
||||
|
||||
Supprimer un élément d'une collection CMS Webflow
|
||||
|
||||
#### Entrée
|
||||
|
||||
| Paramètre | Type | Obligatoire | Description |
|
||||
| --------- | ---- | ---------- | ----------- |
|
||||
| `collectionId` | string | Oui | ID de la collection |
|
||||
| `itemId` | string | Oui | ID de l'élément à supprimer |
|
||||
|
||||
#### Sortie
|
||||
|
||||
| Paramètre | Type | Description |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Indique si la suppression a réussi |
|
||||
| `metadata` | json | Métadonnées concernant la suppression |
|
||||
|
||||
## Notes
|
||||
|
||||
- Catégorie : `tools`
|
||||
- Type : `webflow`
|
||||
@@ -16,7 +16,7 @@ import { Video } from '@/components/ui/video'
|
||||
|
||||
## 主要ブロックタイプ
|
||||
|
||||
Simは、AIワークフローの基本機能を処理する7つの主要ブロックタイプを提供しています:
|
||||
Simは、AIワークフローの中核機能を処理する必須のブロックタイプを提供します:
|
||||
|
||||
### 処理ブロック
|
||||
- **[エージェント](/blocks/agent)** - AIモデル(OpenAI、Anthropic、Google、ローカルモデル)とチャット
|
||||
@@ -28,6 +28,10 @@ Simは、AIワークフローの基本機能を処理する7つの主要ブロ
|
||||
- **[ルーター](/blocks/router)** - AIを使用してリクエストを異なるパスにインテリジェントにルーティング
|
||||
- **[評価者](/blocks/evaluator)** - AIを使用してコンテンツの品質を評価・採点
|
||||
|
||||
### 制御フローブロック
|
||||
- **[変数](/blocks/variables)** - ワークフロースコープの変数を設定・管理
|
||||
- **[待機](/blocks/wait)** - 指定した時間だけワークフロー実行を一時停止
|
||||
|
||||
### 出力ブロック
|
||||
- **[レスポンス](/blocks/response)** - ワークフローからの最終結果をフォーマットして返す
|
||||
|
||||
@@ -35,9 +39,9 @@ Simは、AIワークフローの基本機能を処理する7つの主要ブロ
|
||||
|
||||
各ブロックには3つの主要コンポーネントがあります:
|
||||
|
||||
**入力**:他のブロックまたはユーザー入力からブロックに入ってくるデータ
|
||||
**入力**:他のブロックやユーザー入力からブロックに入ってくるデータ
|
||||
**設定**:ブロックの動作を制御する設定
|
||||
**出力**:他のブロックが使用するためにブロックが生成するデータ
|
||||
**出力**:ブロックが生成し、他のブロックが使用するデータ
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
@@ -47,17 +51,17 @@ Simは、AIワークフローの基本機能を処理する7つの主要ブロ
|
||||
<strong>処理</strong>:ブロックは設定に従って入力を処理します
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>結果を出力</strong>:ブロックはワークフロー内の次のブロックのために出力データを生成します
|
||||
<strong>結果を出力</strong>:ブロックはワークフロー内の次のブロックのための出力データを生成します
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## ブロックの接続
|
||||
|
||||
ブロックを接続することでワークフローを作成します。あるブロックの出力は、別のブロックの入力になります:
|
||||
ブロックを接続してワークフローを作成します。あるブロックの出力は、別のブロックの入力になります:
|
||||
|
||||
- **ドラッグして接続**: 出力ポートから入力ポートへドラッグします
|
||||
- **複数の接続**: 一つの出力を複数の入力に接続できます
|
||||
- **分岐パス**: 一部のブロックは条件に基づいて異なるパスにルーティングできます
|
||||
- **ドラッグして接続**:出力ポートから入力ポートにドラッグ
|
||||
- **複数の接続**:1つの出力を複数の入力に接続可能
|
||||
- **分岐パス**:一部のブロックは条件に基づいて異なるパスにルーティング可能
|
||||
|
||||
<div className="w-full max-w-2xl mx-auto overflow-hidden rounded-lg">
|
||||
<Video src="connections.mp4" width={700} height={450} />
|
||||
@@ -73,7 +77,7 @@ User Input → Agent → Function → Response
|
||||
```
|
||||
|
||||
### 条件分岐
|
||||
条件ブロックやルーターブロックを使用して異なるパスを作成します:
|
||||
条件またはルーターブロックを使用して異なるパスを作成します:
|
||||
|
||||
```
|
||||
User Input → Router → Agent A (for questions)
|
||||
@@ -88,19 +92,19 @@ Agent → Evaluator → Condition → Response (if good)
|
||||
→ Agent (retry if bad)
|
||||
```
|
||||
|
||||
## ブロックの設定
|
||||
## ブロック設定
|
||||
|
||||
各ブロックタイプには特定の設定オプションがあります:
|
||||
|
||||
**すべてのブロック**:
|
||||
- 入力/出力の接続
|
||||
- 入出力接続
|
||||
- エラー処理の動作
|
||||
- 実行タイムアウト設定
|
||||
|
||||
**AIブロック** (エージェント、ルーター、評価者):
|
||||
- モデル選択(OpenAI、Anthropic、Google、ローカル)
|
||||
- APIキーと認証
|
||||
- 温度などのモデルパラメータ
|
||||
- 温度やその他のモデルパラメータ
|
||||
- システムプロンプトと指示
|
||||
|
||||
**ロジックブロック** (条件、関数):
|
||||
@@ -109,21 +113,27 @@ Agent → Evaluator → Condition → Response (if good)
|
||||
- 実行環境設定
|
||||
|
||||
**統合ブロック** (API、レスポンス):
|
||||
- エンドポイント設定
|
||||
- エンドポイント構成
|
||||
- ヘッダーと認証
|
||||
- リクエスト/レスポンスのフォーマット
|
||||
|
||||
<Cards>
|
||||
<Card title="エージェントブロック" href="/blocks/agent">
|
||||
AIモデルに接続し、インテリジェントな応答を作成する
|
||||
AIモデルに接続し、インテリジェントな応答を作成
|
||||
</Card>
|
||||
<Card title="関数ブロック" href="/blocks/function">
|
||||
カスタムコードを実行してデータを処理および変換する
|
||||
カスタムコードを実行してデータを処理・変換
|
||||
</Card>
|
||||
<Card title="APIブロック" href="/blocks/api">
|
||||
外部サービスやAPIと統合する
|
||||
外部サービスやAPIと統合
|
||||
</Card>
|
||||
<Card title="条件ブロック" href="/blocks/condition">
|
||||
データ評価に基づいた分岐ロジックを作成する
|
||||
データ評価に基づく分岐ロジックを作成
|
||||
</Card>
|
||||
<Card title="変数ブロック" href="/blocks/variables">
|
||||
ワークフロースコープの変数を設定・管理
|
||||
</Card>
|
||||
<Card title="待機ブロック" href="/blocks/wait">
|
||||
指定した時間だけワークフロー実行を一時停止
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
ループブロックはSimの中のコンテナブロックで、ブロックのグループを繰り返し実行することで反復的なワークフローを作成できます。ループを使用することで、ワークフロー内で反復処理が可能になります。
|
||||
|
||||
ループブロックは2種類の反復をサポートしています:
|
||||
ループブロックは4種類の反復処理をサポートしています:
|
||||
|
||||
<Callout type="info">
|
||||
ループブロックは他のブロックを内部に保持できるコンテナノードです。ループ内のブロックは設定に基づいて複数回実行されます。
|
||||
@@ -21,13 +21,13 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>コレクションの反復処理</strong>:配列やオブジェクトを一項目ずつ処理する
|
||||
<strong>コレクションの反復処理</strong>:配列やオブジェクトを1アイテムずつ処理する
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>操作の繰り返し</strong>:ブロックを固定回数実行する
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>順次処理</strong>:順序付けられた反復でデータ変換を処理する
|
||||
<strong>条件付きループ</strong>:条件が満たされている間、または満たされるまで実行を継続する
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>結果の集約</strong>:すべてのループ反復からの出力を収集する
|
||||
@@ -47,16 +47,16 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
### ループタイプ
|
||||
|
||||
2種類のループから選択できます:
|
||||
4種類のループから選択できます:
|
||||
|
||||
<Tabs items={['For Loop', 'ForEach Loop']}>
|
||||
<Tabs items={['For ループ', 'ForEach ループ', 'While ループ', 'Do-While ループ']}>
|
||||
<Tab>
|
||||
**Forループ(反復回数)** - 固定回数実行する数値ループ:
|
||||
**For ループ(反復回数)** - 固定回数実行する数値ループ:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-1.png"
|
||||
alt="反復回数を指定するForループ"
|
||||
alt="反復回数を使用したFor ループ"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
@@ -100,6 +100,58 @@ import { Image } from '@/components/ui/image'
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
**While ループ(条件ベース)** - 条件がtrueと評価される間、実行を継続します:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="条件付きWhile ループ"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
特定の条件が満たされるまでループする必要がある場合に使用します。条件は各反復の**前に**チェックされます。
|
||||
|
||||
|
||||
```
|
||||
Example: While <variable.i> < 10
|
||||
- Check condition → Execute if true
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Execute if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
**Do-While ループ(条件ベース)** - 少なくとも1回実行し、その後条件がtrueの間継続します:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="条件付きDo-While ループ"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
少なくとも1回実行し、その後条件が満たされるまでループする必要がある場合に使用します。条件は各反復の**後に**チェックされます。
|
||||
|
||||
|
||||
```
|
||||
Example: Do-while <variable.i> < 10
|
||||
- Execute blocks
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Continue if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## ループの使い方
|
||||
@@ -107,13 +159,13 @@ import { Image } from '@/components/ui/image'
|
||||
### ループの作成
|
||||
|
||||
1. ツールバーからループブロックをキャンバスにドラッグします
|
||||
2. ループタイプとパラメータを設定します
|
||||
3. ループコンテナ内に他のブロックをドラッグします
|
||||
2. ループの種類とパラメータを設定します
|
||||
3. 他のブロックをループコンテナ内にドラッグします
|
||||
4. 必要に応じてブロックを接続します
|
||||
|
||||
### 結果へのアクセス
|
||||
|
||||
ループが完了すると、集計された結果にアクセスできます:
|
||||
ループが完了した後、集計された結果にアクセスできます:
|
||||
|
||||
- **`<loop.results>`**: すべてのループ反復からの結果の配列
|
||||
|
||||
@@ -143,12 +195,25 @@ import { Image } from '@/components/ui/image'
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### Whileループによるカウンター
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">シナリオ:カウンターベースのループでアイテムを処理する</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>ワークフロー変数を初期化:`i = 0`</li>
|
||||
<li>条件付きWhileループ:`<variable.i>` \< 10</li>
|
||||
<li>ループ内:エージェントがインデックス `<variable.i>` のアイテムを処理</li>
|
||||
<li>ループ内:変数がインクリメント `i = <variable.i> + 1`</li>
|
||||
<li>iが10未満である限りループは継続</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## 高度な機能
|
||||
|
||||
### 制限事項
|
||||
|
||||
<Callout type="warning">
|
||||
コンテナブロック(ループと並列処理)は互いに入れ子にすることができません。つまり:
|
||||
コンテナブロック(ループと並列)は互いに入れ子にすることができません。つまり:
|
||||
- ループブロック内に別のループブロックを配置できません
|
||||
- ループブロック内に並列ブロックを配置できません
|
||||
- どのコンテナブロック内にも別のコンテナブロックを配置できません
|
||||
@@ -157,16 +222,16 @@ import { Image } from '@/components/ui/image'
|
||||
</Callout>
|
||||
|
||||
<Callout type="info">
|
||||
ループは並列ではなく、順次実行されます。並行実行が必要な場合は、代わりにParallelブロックを使用してください。
|
||||
ループは並列ではなく、順次実行されます。同時実行が必要な場合は、代わりに並列ブロックを使用してください。
|
||||
</Callout>
|
||||
|
||||
## 入力と出力
|
||||
|
||||
<Tabs items={['設定', '変数', '結果']}>
|
||||
<Tabs items={['Configuration', 'Variables', 'Results']}>
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>ループタイプ</strong>: 'for'または'forEach'から選択
|
||||
<strong>ループタイプ</strong>: 'for'、'forEach'、'while'、または'doWhile'から選択
|
||||
</li>
|
||||
<li>
|
||||
<strong>繰り返し回数</strong>: 実行する回数(forループ)
|
||||
@@ -174,6 +239,9 @@ import { Image } from '@/components/ui/image'
|
||||
<li>
|
||||
<strong>コレクション</strong>: 反復処理する配列またはオブジェクト(forEachループ)
|
||||
</li>
|
||||
<li>
|
||||
<strong>条件</strong>: 評価するブール式(while/do-whileループ)
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
@@ -206,6 +274,6 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
## ベストプラクティス
|
||||
|
||||
- **適切な制限を設定する**: 実行時間が長くならないよう、繰り返し回数を適切に保つ
|
||||
- **コレクションにはForEachを使用する**: 配列やオブジェクトを処理する場合は、Forループの代わりにForEachを使用する
|
||||
- **適切な制限を設定する**: 長い実行時間を避けるため、繰り返し回数を適切に保つ
|
||||
- **コレクションにはForEachを使用する**: 配列やオブジェクトを処理する場合、Forループの代わりにForEachを使用する
|
||||
- **エラーを適切に処理する**: 堅牢なワークフローのために、ループ内にエラー処理を追加することを検討する
|
||||
|
||||
123
apps/docs/content/docs/ja/blocks/variables.mdx
Normal file
123
apps/docs/content/docs/ja/blocks/variables.mdx
Normal file
@@ -0,0 +1,123 @@
|
||||
---
|
||||
title: 変数
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
変数ブロックは実行中にワークフロー変数を更新します。変数はまずワークフローの変数セクションで初期化する必要があり、その後このブロックを使用してワークフロー実行中に値を更新できます。
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/variables.png"
|
||||
alt="変数ブロック"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Callout>
|
||||
ワークフロー内のどこからでも `<variable.variableName>` 構文を使用して変数にアクセスできます。
|
||||
</Callout>
|
||||
|
||||
## 概要
|
||||
|
||||
変数ブロックでは以下のことが可能です:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>ワークフロー変数の更新</strong>:実行中に変数値を変更する
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>動的データの保存</strong>:ブロック出力を変数に取り込む
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>状態の維持</strong>:カウンター、フラグ、中間結果を追跡する
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## 変数の使用方法
|
||||
|
||||
### 1. ワークフロー変数での初期化
|
||||
|
||||
まず、ワークフローの変数セクション(ワークフロー設定からアクセス可能)で変数を作成します:
|
||||
|
||||
```
|
||||
customerEmail = ""
|
||||
retryCount = 0
|
||||
currentStatus = "pending"
|
||||
```
|
||||
|
||||
### 2. 変数ブロックでの更新
|
||||
|
||||
変数ブロックを使用して実行中にこれらの値を更新します:
|
||||
|
||||
```
|
||||
customerEmail = <api.email>
|
||||
retryCount = <variable.retryCount> + 1
|
||||
currentStatus = "processing"
|
||||
```
|
||||
|
||||
### 3. どこからでもアクセス
|
||||
|
||||
任意のブロックで変数を参照します:
|
||||
|
||||
```
|
||||
Agent prompt: "Send email to <variable.customerEmail>"
|
||||
Condition: <variable.retryCount> < 5
|
||||
API body: {"status": "<variable.currentStatus>"}
|
||||
```
|
||||
|
||||
## 使用例
|
||||
|
||||
### ループカウンターと状態
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">シナリオ:ループ反復の進行状況を追跡する</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>ワークフローで初期化:`itemsProcessed = 0`、`lastResult = ""`</li>
|
||||
<li>ループがアイテムを反復処理</li>
|
||||
<li>ループ内:エージェントが現在のアイテムを処理</li>
|
||||
<li>ループ内:変数が `itemsProcessed = <variable.itemsProcessed> + 1` を更新</li>
|
||||
<li>ループ内:変数が `lastResult = <agent.content>` を更新</li>
|
||||
<li>次の反復:`<variable.lastResult>` にアクセスして現在の結果と比較</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### リトライロジック
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">シナリオ:APIリトライ試行を追跡する</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>ワークフローで初期化:`retryCount = 0`</li>
|
||||
<li>APIブロックがリクエストを試行</li>
|
||||
<li>失敗した場合、変数がインクリメント:---INLINE-CODE-PLACEHOLDER-e289a5ca49f66a6001d9263f3b890a8d---</li>
|
||||
<li>条件が `<variable.retryCount>` \< 3 をチェックしてリトライするか失敗するか</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### 動的設定
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">シナリオ:ワークフロー用のユーザーコンテキストを保存する</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>ワークフローで初期化:`userId = ""`, `userTier = ""`</li>
|
||||
<li>APIがユーザープロファイルを取得</li>
|
||||
<li>変数が保存:`userId = <api.id>`, `userTier = <api.tier>`</li>
|
||||
<li>エージェントが`<variable.userTier>`を使用してレスポンスをパーソナライズ</li>
|
||||
<li>APIがログ記録に`<variable.userId>`を使用</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## 出力
|
||||
|
||||
- **`<variables.assignments>`**:このブロックからのすべての変数割り当てを含むJSONオブジェクト
|
||||
|
||||
## ベストプラクティス
|
||||
|
||||
- **ワークフロー設定で初期化**:使用する前に必ずワークフローの変数セクションで変数を作成する
|
||||
- **動的に更新**:ブロック出力や計算に基づいて値を更新するために変数ブロックを使用する
|
||||
- **ループで使用**:反復処理間で状態を追跡するのに最適
|
||||
- **わかりやすい名前を付ける**:`currentIndex`、`totalProcessed`、または`lastError`のような明確な名前を使用する
|
||||
99
apps/docs/content/docs/ja/blocks/wait.mdx
Normal file
99
apps/docs/content/docs/ja/blocks/wait.mdx
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: 待機
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
待機ブロックは、次のブロックに進む前に指定された時間だけワークフローを一時停止します。アクション間に遅延を追加したり、APIレート制限を尊重したり、操作の間隔を空けたりするために使用します。
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/wait.png"
|
||||
alt="待機ブロック"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
## 概要
|
||||
|
||||
待機ブロックでは以下のことが可能です:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>時間遅延の追加</strong>:ワークフローステップ間で実行を一時停止する
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>レート制限の尊重</strong>:制限内に収まるようにAPI呼び出しの間隔を空ける
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>シーケンスのスケジュール</strong>:アクション間に遅延を持つタイムドワークフローを作成する
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## 設定
|
||||
|
||||
### 待機時間
|
||||
|
||||
実行を一時停止する時間を入力します:
|
||||
- **入力**:正の数値
|
||||
- **最大値**:600秒(10分)または10分
|
||||
|
||||
### 単位
|
||||
|
||||
時間単位を選択します:
|
||||
- **秒**:短く正確な遅延のため
|
||||
- **分**:より長い一時停止のため
|
||||
|
||||
<Callout type="info">
|
||||
待機ブロックはワークフローを停止することでキャンセルできます。最大待機時間は10分です。
|
||||
</Callout>
|
||||
|
||||
## 出力
|
||||
|
||||
- **`<wait.waitDuration>`**: ミリ秒単位の待機時間
|
||||
- **`<wait.status>`**: 待機のステータス('waiting'、'completed'、または'cancelled')
|
||||
|
||||
## 使用例
|
||||
|
||||
### APIレート制限
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">シナリオ:APIレート制限内に収める</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>APIブロックが最初のリクエストを行う</li>
|
||||
<li>待機ブロックが2秒間一時停止する</li>
|
||||
<li>APIブロックが2番目のリクエストを行う</li>
|
||||
<li>レート制限に達することなくプロセスが続行される</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### タイムド通知
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">シナリオ:フォローアップメッセージを送信する</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>関数が初期メールを送信する</li>
|
||||
<li>待機ブロックが5分間一時停止する</li>
|
||||
<li>関数がフォローアップメールを送信する</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### 処理の遅延
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">シナリオ:外部システムを待機</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>APIブロックが外部システムでジョブをトリガー</li>
|
||||
<li>待機ブロックが30秒間一時停止</li>
|
||||
<li>APIブロックがジョブの完了状態を確認</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## ベストプラクティス
|
||||
|
||||
- **待機時間を適切に保つ**:最大10分までの遅延には待機を使用。より長い遅延にはスケジュールされたワークフローを検討
|
||||
- **実行時間を監視する**:待機によってワークフローの合計所要時間が延長されることに注意
|
||||
@@ -207,18 +207,18 @@ Populate Clay with data from a JSON file. Enables direct communication and notif
|
||||
|
||||
#### Input
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `webhookURL` | string | Yes | The webhook URL to populate |
|
||||
| `data` | json | Yes | The data to populate |
|
||||
| `authToken` | string | Yes | Auth token for Clay webhook authentication |
|
||||
| `webhookURL` | string | はい | 設定するウェブフックURL |
|
||||
| `data` | json | はい | 設定するデータ |
|
||||
| `authToken` | string | いいえ | Clayウェブフック認証用のオプション認証トークン(ほとんどのウェブフックではこれは不要です) |
|
||||
|
||||
#### Output
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | Operation success status |
|
||||
| `output` | json | Clay populate operation results including response data from Clay webhook |
|
||||
| `data` | json | Clayウェブフックからのレスポンスデータ |
|
||||
| `metadata` | object | ウェブフックレスポンスのメタデータ |
|
||||
|
||||
## Notes
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="discord"
|
||||
color="#E0E0E0"
|
||||
color="#5865F2"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
@@ -72,6 +72,7 @@ Discordチャンネルにメッセージを送信する
|
||||
| `channelId` | string | はい | メッセージを送信するDiscordチャンネルID |
|
||||
| `content` | string | いいえ | メッセージのテキスト内容 |
|
||||
| `serverId` | string | はい | DiscordサーバーID(ギルドID) |
|
||||
| `files` | file[] | いいえ | メッセージに添付するファイル |
|
||||
|
||||
#### 出力
|
||||
|
||||
|
||||
@@ -85,8 +85,9 @@ Google Driveをワークフローに統合します。ファイルの作成、
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `fileName` | string | はい | アップロードするファイルの名前 |
|
||||
| `content` | string | はい | アップロードするファイルの内容 |
|
||||
| `mimeType` | string | いいえ | アップロードするファイルのMIMEタイプ |
|
||||
| `file` | file | いいえ | アップロードするバイナリファイル(UserFileオブジェクト) |
|
||||
| `content` | string | いいえ | アップロードするテキストコンテンツ(fileかこちらのどちらか一方を使用、両方は不可) |
|
||||
| `mimeType` | string | いいえ | アップロードするファイルのMIMEタイプ(指定がない場合はファイルから自動検出) |
|
||||
| `folderSelector` | string | いいえ | ファイルをアップロードするフォルダを選択 |
|
||||
| `folderId` | string | いいえ | ファイルをアップロードするフォルダのID(内部使用) |
|
||||
|
||||
|
||||
@@ -134,7 +134,8 @@ Microsoft Teams チャットでコンテンツを作成または更新する
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `chatId` | string | はい | 書き込み先のチャットID |
|
||||
| `content` | string | はい | メッセージに書き込むコンテンツ |
|
||||
| `content` | string | はい | メッセージに書き込む内容 |
|
||||
| `files` | file[] | いいえ | メッセージに添付するファイル |
|
||||
|
||||
#### 出力
|
||||
|
||||
@@ -179,11 +180,12 @@ Microsoft Teamsチャネルにメッセージを書き込むまたは送信す
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 種類 | 必須 | 説明 |
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `teamId` | string | はい | 書き込み先のチームID |
|
||||
| `channelId` | string | はい | 書き込み先のチャネルID |
|
||||
| `content` | string | はい | チャネルに書き込む内容 |
|
||||
| `files` | file[] | いいえ | メッセージに添付するファイル |
|
||||
|
||||
#### 出力
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ Simでは、OneDrive統合によりエージェントがクラウドストレー
|
||||
|
||||
## 使用方法
|
||||
|
||||
OneDriveをワークフローに統合します。ファイルの作成、アップロード、一覧表示が可能です。OAuthが必要です。
|
||||
OneDriveをワークフローに統合します。テキストファイルやExcelファイルの作成、ファイルのアップロード、ファイルの一覧表示が可能です。
|
||||
|
||||
## ツール
|
||||
|
||||
@@ -60,10 +60,12 @@ OneDriveにファイルをアップロードする
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| パラメータ | 種類 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `fileName` | string | はい | アップロードするファイルの名前 |
|
||||
| `content` | string | はい | アップロードするファイルの内容 |
|
||||
| `file` | file | いいえ | アップロードするファイル(バイナリ) |
|
||||
| `content` | string | いいえ | アップロードするテキスト内容(ファイルが提供されていない場合) |
|
||||
| `mimeType` | string | いいえ | 作成するファイルのMIMEタイプ(例:.txtの場合はtext/plain、.xlsxの場合はapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet) |
|
||||
| `folderSelector` | string | いいえ | ファイルをアップロードするフォルダを選択 |
|
||||
| `manualFolderId` | string | いいえ | 手動で入力したフォルダID(高度なモード) |
|
||||
|
||||
|
||||
@@ -158,6 +158,7 @@ Outlookを使用してメールを送信する
|
||||
| `conversationId` | string | いいえ | スレッド用の会話ID |
|
||||
| `cc` | string | いいえ | CCの受信者(カンマ区切り) |
|
||||
| `bcc` | string | いいえ | BCCの受信者(カンマ区切り) |
|
||||
| `attachments` | file[] | いいえ | メールに添付するファイル |
|
||||
|
||||
#### 出力
|
||||
|
||||
@@ -181,6 +182,7 @@ Outlookを使用してメールを下書きする
|
||||
| `body` | string | はい | メール本文の内容 |
|
||||
| `cc` | string | いいえ | CCの受信者(カンマ区切り) |
|
||||
| `bcc` | string | いいえ | BCCの受信者(カンマ区切り) |
|
||||
| `attachments` | file[] | いいえ | メールの下書きに添付するファイル |
|
||||
|
||||
#### 出力
|
||||
|
||||
|
||||
@@ -140,6 +140,7 @@ Qdrantコレクション内で類似ベクトルを検索する
|
||||
| `vector` | array | はい | 検索対象のベクトル |
|
||||
| `limit` | number | いいえ | 返す結果の数 |
|
||||
| `filter` | object | いいえ | 検索に適用するフィルター |
|
||||
| `search_return_data` | string | いいえ | 検索から返すデータ |
|
||||
| `with_payload` | boolean | いいえ | レスポンスにペイロードを含める |
|
||||
| `with_vector` | boolean | いいえ | レスポンスにベクトルを含める |
|
||||
|
||||
@@ -162,6 +163,7 @@ QdrantコレクションからIDによってポイントを取得する
|
||||
| `apiKey` | string | いいえ | Qdrant APIキー(オプション) |
|
||||
| `collection` | string | はい | コレクション名 |
|
||||
| `ids` | array | はい | 取得するポイントIDの配列 |
|
||||
| `fetch_return_data` | string | いいえ | 取得から返すデータ |
|
||||
| `with_payload` | boolean | いいえ | レスポンスにペイロードを含める |
|
||||
| `with_vector` | boolean | いいえ | レスポンスにベクトルを含める |
|
||||
|
||||
|
||||
@@ -199,7 +199,27 @@ SharePointリストに新しいアイテムを追加する
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | object | 作成されたSharePointリストアイテム |
|
||||
|
||||
### `sharepoint_upload_file`
|
||||
|
||||
SharePointドキュメントライブラリにファイルをアップロードする
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `siteId` | string | いいえ | SharePointサイトのID |
|
||||
| `driveId` | string | いいえ | ドキュメントライブラリ(ドライブ)のID。提供されない場合、デフォルトドライブを使用します。 |
|
||||
| `folderPath` | string | いいえ | ドキュメントライブラリ内のオプションのフォルダパス(例:/Documents/Subfolder) |
|
||||
| `fileName` | string | いいえ | オプション:アップロードされるファイル名を上書きする |
|
||||
| `files` | file[] | いいえ | SharePointにアップロードするファイル |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `uploadedFiles` | array | アップロードされたファイルオブジェクトの配列 |
|
||||
|
||||
## 注意事項
|
||||
|
||||
- カテゴリー: `tools`
|
||||
- カテゴリ: `tools`
|
||||
- タイプ: `sharepoint`
|
||||
|
||||
@@ -78,7 +78,8 @@ Slack APIを通じてSlackチャンネルまたはユーザーにメッセージ
|
||||
| `authMethod` | string | いいえ | 認証方法:oauth または bot_token |
|
||||
| `botToken` | string | いいえ | カスタムボット用のボットトークン |
|
||||
| `channel` | string | はい | 対象のSlackチャンネル(例:#general) |
|
||||
| `text` | string | はい | 送信するメッセージテキスト(Slack mrkdwnフォーマットをサポート) |
|
||||
| `text` | string | はい | 送信するメッセージテキスト(Slack mrkdwn形式をサポート) |
|
||||
| `files` | file[] | いいえ | メッセージに添付するファイル |
|
||||
|
||||
#### 出力
|
||||
|
||||
|
||||
@@ -202,7 +202,29 @@ Supabaseテーブルにデータを挿入または更新する(アップサー
|
||||
| `message` | string | 操作ステータスメッセージ |
|
||||
| `results` | array | アップサートされたレコードの配列 |
|
||||
|
||||
### `supabase_vector_search`
|
||||
|
||||
Supabaseテーブルでpgvectorを使用して類似性検索を実行する
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | はい | あなたのSupabaseプロジェクトID(例:jdrkgepadsdopsntdlom) |
|
||||
| `functionName` | string | はい | ベクトル検索を実行するPostgreSQL関数の名前(例:match_documents) |
|
||||
| `queryEmbedding` | array | はい | 類似アイテムを検索するためのクエリベクトル/埋め込み |
|
||||
| `matchThreshold` | number | いいえ | 最小類似度しきい値(0-1)、通常は0.7-0.9 |
|
||||
| `matchCount` | number | いいえ | 返す結果の最大数(デフォルト:10) |
|
||||
| `apiKey` | string | はい | あなたのSupabaseサービスロールシークレットキー |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | 操作ステータスメッセージ |
|
||||
| `results` | array | ベクトル検索からの類似度スコア付きレコードの配列。各レコードには、クエリベクトルとの類似度を示す類似度フィールド(0-1)が含まれます。 |
|
||||
|
||||
## 注意事項
|
||||
|
||||
- カテゴリー: `tools`
|
||||
- カテゴリ: `tools`
|
||||
- タイプ: `supabase`
|
||||
|
||||
@@ -189,6 +189,26 @@ Telegram Bot APIを通じてTelegramチャンネルまたはユーザーにア
|
||||
| `message` | string | 成功またはエラーメッセージ |
|
||||
| `data` | object | オプションのメディアを含むTelegramメッセージデータ |
|
||||
|
||||
### `telegram_send_document`
|
||||
|
||||
Telegram Bot APIを通じて、Telegramチャンネルやユーザーにドキュメント(PDF、ZIP、DOCなど)を送信します。
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | はい | あなたのTelegram Bot APIトークン |
|
||||
| `chatId` | string | はい | 対象のTelegramチャットID |
|
||||
| `files` | file[] | いいえ | 送信するドキュメントファイル(PDF、ZIP、DOCなど)。最大サイズ:50MB |
|
||||
| `caption` | string | いいえ | ドキュメントのキャプション(任意) |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | 成功またはエラーメッセージ |
|
||||
| `data` | object | ドキュメントを含むTelegramメッセージデータ |
|
||||
|
||||
## 注意事項
|
||||
|
||||
- カテゴリー: `tools`
|
||||
|
||||
@@ -59,8 +59,9 @@ Visionをワークフローに統合します。ビジョンモデルで画像
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `apiKey` | string | はい | 選択したモデルプロバイダーのAPIキー |
|
||||
| `imageUrl` | string | はい | 公開アクセス可能な画像URL |
|
||||
| `model` | string | いいえ | 使用するビジョンモデル \(gpt-4o, claude-3-opus-20240229, など\) |
|
||||
| `imageUrl` | string | いいえ | 公開アクセス可能な画像URL |
|
||||
| `imageFile` | file | いいえ | 分析する画像ファイル |
|
||||
| `model` | string | いいえ | 使用するビジョンモデル(gpt-4o、claude-3-opus-20240229など) |
|
||||
| `prompt` | string | いいえ | 画像分析用のカスタムプロンプト |
|
||||
|
||||
#### 出力
|
||||
|
||||
145
apps/docs/content/docs/ja/tools/webflow.mdx
Normal file
145
apps/docs/content/docs/ja/tools/webflow.mdx
Normal file
@@ -0,0 +1,145 @@
|
||||
---
|
||||
title: Webflow
|
||||
description: Webflow CMSコレクションを管理する
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="webflow"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 1080 674'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
fillRule='evenodd'
|
||||
clipRule='evenodd'
|
||||
d='M1080 0L735.386 673.684H411.695L555.916 394.481H549.445C430.464 548.934 252.942 650.61 -0.000488281 673.684V398.344C-0.000488281 398.344 161.813 388.787 256.938 288.776H-0.000488281V0.0053214H288.771V237.515L295.252 237.489L413.254 0.0053214H631.644V236.009L638.126 235.999L760.555 0H1080Z'
|
||||
fill='#146EF5'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Webflow](https://webflow.com/)は、コードを書かずに応答性の高いウェブサイトを構築できる強力なビジュアルウェブデザインプラットフォームです。視覚的なデザインインターフェースと堅牢なCMS(コンテンツ管理システム)を組み合わせており、ウェブサイト用の動的コンテンツを作成、管理、公開することができます。
|
||||
|
||||
Webflowでは以下のことが可能です:
|
||||
|
||||
- **視覚的にデザインする**:クリーンでセマンティックなHTML/CSSコードを生成する視覚エディタで、カスタムウェブサイトを作成
|
||||
- **動的にコンテンツを管理する**:CMSを使用してブログ投稿、製品、チームメンバー、またはカスタムデータなどの構造化されたコンテンツのコレクションを作成
|
||||
- **即時に公開する**:サイトをWebflowのホスティングにデプロイするか、カスタムホスティング用にコードをエクスポート
|
||||
- **レスポンシブデザインを作成する**:デスクトップ、タブレット、モバイルデバイスでシームレスに動作するサイトを構築
|
||||
- **コレクションをカスタマイズする**:コンテンツタイプのカスタムフィールドとデータ構造を定義
|
||||
- **コンテンツ更新を自動化する**:APIを通じてCMSコンテンツをプログラムで管理
|
||||
|
||||
Simでは、Webflow統合によりエージェントがAPI認証を通じてWebflow CMSコレクションとシームレスに連携できます。これにより、AIが生成したコンテンツからブログ投稿を自動作成したり、製品情報を更新したり、チームメンバープロフィールを管理したり、動的コンテンツ生成のためにCMSアイテムを取得したりするなど、強力な自動化シナリオが可能になります。エージェントは既存のアイテムをリストしてコンテンツを閲覧したり、IDで特定のアイテムを取得したり、新しいエントリを作成して新鮮なコンテンツを追加したり、既存のアイテムを更新して情報を最新の状態に保ったり、古いコンテンツを削除したりできます。この統合により、AIワークフローとWebflow CMSの間のギャップが埋まり、自動化されたコンテンツ管理、動的なウェブサイト更新、合理化されたコンテンツワークフローが可能になり、手動介入なしにサイトを常に新鮮で最新の状態に保つことができます。
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## 使用方法
|
||||
|
||||
Webflow CMSをワークフローに統合します。Webflow CMSコレクションのアイテムを作成、取得、一覧表示、更新、または削除できます。Webflowのコンテンツをプログラムで管理します。トリガーモードでは、コレクションアイテムが変更されたり、フォームが送信されたりしたときにワークフローをトリガーするために使用できます。
|
||||
|
||||
## ツール
|
||||
|
||||
### `webflow_list_items`
|
||||
|
||||
Webflow CMSコレクションからすべてのアイテムを一覧表示する
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | はい | コレクションのID |
|
||||
| `offset` | number | いいえ | ページネーション用のオフセット(オプション) |
|
||||
| `limit` | number | いいえ | 返すアイテムの最大数(オプション、デフォルト:100) |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | json | コレクションアイテムの配列 |
|
||||
| `metadata` | json | クエリに関するメタデータ |
|
||||
|
||||
### `webflow_get_item`
|
||||
|
||||
Webflow CMSコレクションから単一のアイテムを取得する
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | はい | コレクションのID |
|
||||
| `itemId` | string | はい | 取得するアイテムのID |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | 取得したアイテムオブジェクト |
|
||||
| `metadata` | json | 取得したアイテムに関するメタデータ |
|
||||
|
||||
### `webflow_create_item`
|
||||
|
||||
Webflow CMSコレクションに新しいアイテムを作成する
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | はい | コレクションのID |
|
||||
| `fieldData` | json | はい | 新しいアイテムのフィールドデータ(JSONオブジェクト形式)。キーはコレクションのフィールド名と一致する必要があります。 |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | 作成されたアイテムオブジェクト |
|
||||
| `metadata` | json | 作成されたアイテムに関するメタデータ |
|
||||
|
||||
### `webflow_update_item`
|
||||
|
||||
Webflow CMSコレクション内の既存アイテムを更新する
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | はい | コレクションのID |
|
||||
| `itemId` | string | はい | 更新するアイテムのID |
|
||||
| `fieldData` | json | はい | 更新するフィールドデータ(JSONオブジェクト形式)。変更したいフィールドのみを含めてください。 |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | 更新されたアイテムオブジェクト |
|
||||
| `metadata` | json | 更新されたアイテムに関するメタデータ |
|
||||
|
||||
### `webflow_delete_item`
|
||||
|
||||
Webflow CMSコレクションからアイテムを削除する
|
||||
|
||||
#### 入力
|
||||
|
||||
| パラメータ | 型 | 必須 | 説明 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | はい | コレクションのID |
|
||||
| `itemId` | string | はい | 削除するアイテムのID |
|
||||
|
||||
#### 出力
|
||||
|
||||
| パラメータ | 型 | 説明 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | 削除が成功したかどうか |
|
||||
| `metadata` | json | 削除に関するメタデータ |
|
||||
|
||||
## 注意事項
|
||||
|
||||
- カテゴリー: `tools`
|
||||
- タイプ: `webflow`
|
||||
@@ -16,7 +16,7 @@ import { Video } from '@/components/ui/video'
|
||||
|
||||
## 核心模块类型
|
||||
|
||||
Sim 提供了七种核心模块类型,用于处理 AI 工作流的基本功能:
|
||||
Sim 提供了处理 AI 工作流核心功能的基本模块类型:
|
||||
|
||||
### 处理模块
|
||||
- **[Agent](/blocks/agent)** - 与 AI 模型(OpenAI、Anthropic、Google、本地模型)聊天
|
||||
@@ -28,16 +28,20 @@ Sim 提供了七种核心模块类型,用于处理 AI 工作流的基本功能
|
||||
- **[Router](/blocks/router)** - 使用 AI 智能路由请求到不同路径
|
||||
- **[Evaluator](/blocks/evaluator)** - 使用 AI 评分并评估内容质量
|
||||
|
||||
### 输出模块
|
||||
- **[Response](/blocks/response)** - 格式化并返回工作流的最终结果
|
||||
### 控制流模块
|
||||
- **[变量](/blocks/variables)** - 设置和管理工作流范围内的变量
|
||||
- **[等待](/blocks/wait)** - 暂停工作流执行指定的时间延迟
|
||||
|
||||
## 模块如何工作
|
||||
### 输出模块
|
||||
- **[响应](/blocks/response)** - 格式化并返回工作流的最终结果
|
||||
|
||||
## 模块的工作原理
|
||||
|
||||
每个模块有三个主要组成部分:
|
||||
|
||||
**输入**:从其他模块或用户输入接收的数据
|
||||
**配置**:控制模块行为的设置
|
||||
**输出**:模块为其他模块使用而生成的数据
|
||||
**输出**:模块为其他模块生成的数据
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
@@ -66,14 +70,14 @@ Sim 提供了七种核心模块类型,用于处理 AI 工作流的基本功能
|
||||
## 常见模式
|
||||
|
||||
### 顺序处理
|
||||
将模块按链式连接,每个模块处理前一个模块的输出:
|
||||
将模块连接成链,每个模块处理前一个模块的输出:
|
||||
|
||||
```
|
||||
User Input → Agent → Function → Response
|
||||
```
|
||||
|
||||
### 条件分支
|
||||
使用条件模块或路由模块创建不同的路径:
|
||||
使用条件或路由模块创建不同的路径:
|
||||
|
||||
```
|
||||
User Input → Router → Agent A (for questions)
|
||||
@@ -81,7 +85,7 @@ User Input → Router → Agent A (for questions)
|
||||
```
|
||||
|
||||
### 质量控制
|
||||
使用评估模块评估和过滤输出:
|
||||
使用评估模块评估和筛选输出:
|
||||
|
||||
```
|
||||
Agent → Evaluator → Condition → Response (if good)
|
||||
@@ -97,33 +101,39 @@ Agent → Evaluator → Condition → Response (if good)
|
||||
- 错误处理行为
|
||||
- 执行超时设置
|
||||
|
||||
**AI 模块**(代理、路由、评估):
|
||||
**AI 模块**(Agent、Router、Evaluator):
|
||||
- 模型选择(OpenAI、Anthropic、Google、本地)
|
||||
- API 密钥和认证
|
||||
- API 密钥和身份验证
|
||||
- 温度及其他模型参数
|
||||
- 系统提示和指令
|
||||
|
||||
**逻辑模块**(条件、函数):
|
||||
**逻辑模块**(Condition、Function):
|
||||
- 自定义表达式或代码
|
||||
- 变量引用
|
||||
- 执行环境设置
|
||||
|
||||
**集成模块**(API、响应):
|
||||
**集成模块**(API、Response):
|
||||
- 端点配置
|
||||
- 请求头和认证
|
||||
- 请求头和身份验证
|
||||
- 请求/响应格式化
|
||||
|
||||
<Cards>
|
||||
<Card title="代理模块" href="/blocks/agent">
|
||||
<Card title="Agent 模块" href="/blocks/agent">
|
||||
连接 AI 模型并创建智能响应
|
||||
</Card>
|
||||
<Card title="函数模块" href="/blocks/function">
|
||||
<Card title="Function 模块" href="/blocks/function">
|
||||
运行自定义代码以处理和转换数据
|
||||
</Card>
|
||||
<Card title="API 模块" href="/blocks/api">
|
||||
与外部服务和 API 集成
|
||||
</Card>
|
||||
<Card title="条件模块" href="/blocks/condition">
|
||||
<Card title="Condition 模块" href="/blocks/condition">
|
||||
基于数据评估创建分支逻辑
|
||||
</Card>
|
||||
<Card title="Variables 模块" href="/blocks/variables">
|
||||
设置和管理工作流范围的变量
|
||||
</Card>
|
||||
<Card title="Wait 模块" href="/blocks/wait">
|
||||
暂停工作流执行指定的时间延迟
|
||||
</Card>
|
||||
</Cards>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
循环块是 Sim 中的一个容器块,它允许您通过重复执行一组块来创建迭代工作流。循环使您的工作流能够进行迭代处理。
|
||||
|
||||
循环块支持两种类型的迭代:
|
||||
循环块支持四种类型的迭代:
|
||||
|
||||
<Callout type="info">
|
||||
循环块是容器节点,可以在其中包含其他块。根据您的配置,循环中的块将多次执行。
|
||||
@@ -21,13 +21,13 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>迭代集合</strong>:逐项处理数组或对象
|
||||
<strong>遍历集合</strong>:逐一处理数组或对象中的项目
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>重复操作</strong>:执行固定次数的块
|
||||
<strong>重复操作</strong>:执行块固定次数
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>顺序处理</strong>:按顺序迭代处理数据转换
|
||||
<strong>基于条件循环</strong>:在满足或直到满足条件时继续执行
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>汇总结果</strong>:收集所有循环迭代的输出
|
||||
@@ -47,23 +47,23 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
### 循环类型
|
||||
|
||||
选择两种循环类型之一:
|
||||
选择四种循环类型之一:
|
||||
|
||||
<Tabs items={['For 循环', 'ForEach 循环']}>
|
||||
<Tabs items={['For Loop', 'ForEach Loop', 'While Loop', 'Do-While Loop']}>
|
||||
<Tab>
|
||||
**For 循环(迭代次数)** - 一种执行固定次数的数字循环:
|
||||
**For 循环(迭代)** - 一个执行固定次数的数字循环:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-1.png"
|
||||
alt="具有迭代次数的 For 循环"
|
||||
alt="带有迭代的 For 循环"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
当您需要重复操作特定次数时使用此选项。
|
||||
当需要重复操作特定次数时使用此方法。
|
||||
|
||||
|
||||
```
|
||||
@@ -100,11 +100,63 @@ import { Image } from '@/components/ui/image'
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
**While 循环(基于条件)** - 当条件为真时继续执行:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="带有条件的 While 循环"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
当需要循环直到满足特定条件时使用此方法。条件在每次迭代**之前**检查。
|
||||
|
||||
|
||||
```
|
||||
Example: While <variable.i> < 10
|
||||
- Check condition → Execute if true
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Execute if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
**Do-While 循环(基于条件)** - 至少执行一次,然后在条件为真时继续:
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/loop-3.png"
|
||||
alt="带有条件的 Do-While 循环"
|
||||
width={500}
|
||||
height={400}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
当需要至少执行一次,然后循环直到满足条件时使用此方法。条件在每次迭代**之后**检查。
|
||||
|
||||
|
||||
```
|
||||
Example: Do-while <variable.i> < 10
|
||||
- Execute blocks
|
||||
- Inside loop: Increment <variable.i>
|
||||
- Inside loop: Variables assigns i = <variable.i> + 1
|
||||
- Check condition → Continue if true
|
||||
- Check condition → Exit if false
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
## 如何使用循环
|
||||
|
||||
### 创建循环
|
||||
### 创建一个循环
|
||||
|
||||
1. 从工具栏中拖动一个循环块到画布上
|
||||
2. 配置循环类型和参数
|
||||
@@ -113,9 +165,9 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
### 访问结果
|
||||
|
||||
循环完成后,您可以访问聚合结果:
|
||||
循环完成后,您可以访问汇总结果:
|
||||
|
||||
- **`<loop.results>`**:来自所有循环迭代的结果数组
|
||||
- **`<loop.results>`**:所有循环迭代的结果数组
|
||||
|
||||
## 示例用例
|
||||
|
||||
@@ -143,21 +195,34 @@ import { Image } from '@/components/ui/image'
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### 使用 While 循环的计数器
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">场景:使用基于计数器的循环处理项目</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>初始化工作流变量:`i = 0`</li>
|
||||
<li>While 循环条件:`<variable.i>` \< 10</li>
|
||||
<li>循环内:代理处理索引为 `<variable.i>` 的项目</li>
|
||||
<li>循环内:变量递增 `i = <variable.i> + 1`</li>
|
||||
<li>循环在 i 小于 10 时继续</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## 高级功能
|
||||
|
||||
### 限制
|
||||
|
||||
<Callout type="warning">
|
||||
容器块(循环和并行)不能嵌套在彼此内部。这意味着:
|
||||
- 您不能将一个循环块放入另一个循环块中
|
||||
- 您不能将一个并行块放入循环块中
|
||||
- 您不能将循环块放入另一个循环块中
|
||||
- 您不能将并行块放入循环块中
|
||||
- 您不能将任何容器块放入另一个容器块中
|
||||
|
||||
如果需要多维迭代,请考虑重构您的工作流程以使用顺序循环或分阶段处理数据。
|
||||
如果您需要多维迭代,请考虑重构您的工作流以使用顺序循环或分阶段处理数据。
|
||||
</Callout>
|
||||
|
||||
<Callout type="info">
|
||||
循环是按顺序执行的,而不是并行执行。如果需要并发执行,请改用 Parallel 块。
|
||||
循环是按顺序执行的,而不是并行执行。如果您需要并发执行,请改用并行块。
|
||||
</Callout>
|
||||
|
||||
## 输入和输出
|
||||
@@ -166,7 +231,7 @@ import { Image } from '@/components/ui/image'
|
||||
<Tab>
|
||||
<ul className="list-disc space-y-2 pl-6">
|
||||
<li>
|
||||
<strong>循环类型</strong>:选择 'for' 或 'forEach'
|
||||
<strong>循环类型</strong>:选择 'for'、'forEach'、'while' 或 'doWhile'
|
||||
</li>
|
||||
<li>
|
||||
<strong>迭代次数</strong>:执行的次数(适用于 for 循环)
|
||||
@@ -174,6 +239,9 @@ import { Image } from '@/components/ui/image'
|
||||
<li>
|
||||
<strong>集合</strong>:要迭代的数组或对象(适用于 forEach 循环)
|
||||
</li>
|
||||
<li>
|
||||
<strong>条件</strong>:要评估的布尔表达式(适用于 while/do-while 循环)
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
<Tab>
|
||||
@@ -198,7 +266,7 @@ import { Image } from '@/components/ui/image'
|
||||
<strong>结构</strong>:结果保持迭代顺序
|
||||
</li>
|
||||
<li>
|
||||
<strong>访问</strong>:可在循环后的块中使用
|
||||
<strong>访问</strong>:在循环后的块中可用
|
||||
</li>
|
||||
</ul>
|
||||
</Tab>
|
||||
@@ -206,6 +274,6 @@ import { Image } from '@/components/ui/image'
|
||||
|
||||
## 最佳实践
|
||||
|
||||
- **设置合理的限制**:保持迭代次数在合理范围内,以避免长时间执行
|
||||
- **设置合理的限制**:保持迭代次数在合理范围内,以避免长时间的执行
|
||||
- **对集合使用 ForEach**:在处理数组或对象时,使用 ForEach 而不是 For 循环
|
||||
- **优雅地处理错误**:考虑在循环中添加错误处理,以实现更健壮的工作流
|
||||
|
||||
123
apps/docs/content/docs/zh/blocks/variables.mdx
Normal file
123
apps/docs/content/docs/zh/blocks/variables.mdx
Normal file
@@ -0,0 +1,123 @@
|
||||
---
|
||||
title: 变量
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
变量模块在执行过程中更新工作流变量。变量必须首先在工作流的变量部分中初始化,然后您可以使用此模块在工作流运行时更新其值。
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/variables.png"
|
||||
alt="变量模块"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Callout>
|
||||
在工作流中的任何地方使用 `<variable.variableName>` 语法访问变量。
|
||||
</Callout>
|
||||
|
||||
## 概述
|
||||
|
||||
变量模块使您能够:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>更新工作流变量</strong>:在执行过程中更改变量值
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>存储动态数据</strong>:将模块输出捕获到变量中
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>维护状态</strong>:跟踪计数器、标志和中间结果
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## 如何使用变量
|
||||
|
||||
### 1. 在工作流变量中初始化
|
||||
|
||||
首先,在工作流的变量部分(可通过工作流设置访问)中创建您的变量:
|
||||
|
||||
```
|
||||
customerEmail = ""
|
||||
retryCount = 0
|
||||
currentStatus = "pending"
|
||||
```
|
||||
|
||||
### 2. 使用变量模块更新
|
||||
|
||||
使用变量模块在执行过程中更新这些值:
|
||||
|
||||
```
|
||||
customerEmail = <api.email>
|
||||
retryCount = <variable.retryCount> + 1
|
||||
currentStatus = "processing"
|
||||
```
|
||||
|
||||
### 3. 随处访问
|
||||
|
||||
在任何模块中引用变量:
|
||||
|
||||
```
|
||||
Agent prompt: "Send email to <variable.customerEmail>"
|
||||
Condition: <variable.retryCount> < 5
|
||||
API body: {"status": "<variable.currentStatus>"}
|
||||
```
|
||||
|
||||
## 示例用例
|
||||
|
||||
### 循环计数器和状态
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">场景:跟踪循环迭代的进度</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>在工作流中初始化:`itemsProcessed = 0`, `lastResult = ""`</li>
|
||||
<li>循环迭代项目</li>
|
||||
<li>在循环内:代理处理当前项目</li>
|
||||
<li>在循环内:变量模块更新 `itemsProcessed = <variable.itemsProcessed> + 1`</li>
|
||||
<li>在循环内:变量模块更新 `lastResult = <agent.content>`</li>
|
||||
<li>下一次迭代:访问 `<variable.lastResult>` 与当前结果进行比较</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### 重试逻辑
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">场景:跟踪 API 重试尝试</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>在工作流中初始化:`retryCount = 0`</li>
|
||||
<li>API 模块尝试请求</li>
|
||||
<li>如果失败,变量递增:`retryCount = <variable.retryCount> + 1`</li>
|
||||
<li>条件检查 `<variable.retryCount>` \< 3 以重试或失败</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### 动态配置
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">场景:为工作流存储用户上下文</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>在工作流中初始化:`userId = ""`,`userTier = ""`</li>
|
||||
<li>API 获取用户资料</li>
|
||||
<li>变量存储:`userId = <api.id>`,`userTier = <api.tier>`</li>
|
||||
<li>代理使用 `<variable.userTier>` 个性化响应</li>
|
||||
<li>API 使用 `<variable.userId>` 进行日志记录</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## 输出
|
||||
|
||||
- **`<variables.assignments>`**:包含此块中所有变量分配的 JSON 对象
|
||||
|
||||
## 最佳实践
|
||||
|
||||
- **在工作流设置中初始化**:在使用变量之前,始终在工作流的变量部分创建它们
|
||||
- **动态更新**:使用变量块根据块输出或计算结果更新值
|
||||
- **在循环中使用**:非常适合在迭代中跟踪状态
|
||||
- **命名清晰**:使用明确的名称,例如 `currentIndex`,`totalProcessed`,或 `lastError`
|
||||
99
apps/docs/content/docs/zh/blocks/wait.mdx
Normal file
99
apps/docs/content/docs/zh/blocks/wait.mdx
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
title: 等待
|
||||
---
|
||||
|
||||
import { Callout } from 'fumadocs-ui/components/callout'
|
||||
import { Step, Steps } from 'fumadocs-ui/components/steps'
|
||||
import { Image } from '@/components/ui/image'
|
||||
|
||||
等待模块会在继续执行下一个模块之前暂停您的工作流一段指定的时间。使用它可以在操作之间添加延迟、遵守 API 速率限制或间隔操作。
|
||||
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
src="/static/blocks/wait.png"
|
||||
alt="等待模块"
|
||||
width={500}
|
||||
height={350}
|
||||
className="my-6"
|
||||
/>
|
||||
</div>
|
||||
|
||||
## 概述
|
||||
|
||||
等待模块可以让您:
|
||||
|
||||
<Steps>
|
||||
<Step>
|
||||
<strong>添加时间延迟</strong>:在工作流步骤之间暂停执行
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>遵守速率限制</strong>:间隔 API 调用以保持在限制范围内
|
||||
</Step>
|
||||
<Step>
|
||||
<strong>安排序列</strong>:创建带有操作间延迟的定时工作流
|
||||
</Step>
|
||||
</Steps>
|
||||
|
||||
## 配置
|
||||
|
||||
### 等待时间
|
||||
|
||||
输入暂停执行的时长:
|
||||
- **输入**:正数
|
||||
- **最大值**:600 秒(10 分钟)或 10 分钟
|
||||
|
||||
### 单位
|
||||
|
||||
选择时间单位:
|
||||
- **秒**:用于短时间、精确的延迟
|
||||
- **分钟**:用于较长时间的暂停
|
||||
|
||||
<Callout type="info">
|
||||
等待模块可以通过停止工作流来取消。最大等待时间为 10 分钟。
|
||||
</Callout>
|
||||
|
||||
## 输出
|
||||
|
||||
- **`<wait.waitDuration>`**:等待时长(以毫秒为单位)
|
||||
- **`<wait.status>`**:等待状态(“等待中”、“已完成”或“已取消”)
|
||||
|
||||
## 示例用例
|
||||
|
||||
### API 速率限制
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">场景:保持在 API 速率限制范围内</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>API 模块发出第一个请求</li>
|
||||
<li>等待模块暂停 2 秒</li>
|
||||
<li>API 模块发出第二个请求</li>
|
||||
<li>流程继续而不会触发速率限制</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### 定时通知
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">场景:发送后续消息</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>函数发送初始电子邮件</li>
|
||||
<li>等待模块暂停 5 分钟</li>
|
||||
<li>函数发送后续电子邮件</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
### 处理延迟
|
||||
|
||||
<div className="mb-4 rounded-md border p-4">
|
||||
<h4 className="font-medium">场景:等待外部系统</h4>
|
||||
<ol className="list-decimal pl-5 text-sm">
|
||||
<li>API 块触发外部系统中的作业</li>
|
||||
<li>等待块暂停 30 秒</li>
|
||||
<li>API 块检查作业完成状态</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
## 最佳实践
|
||||
|
||||
- **保持合理的等待时间**:使用等待块处理最长 10 分钟的延迟。对于更长的延迟,请考虑使用计划的工作流
|
||||
- **监控执行时间**:请记住,等待会延长工作流的总持续时间
|
||||
@@ -209,16 +209,16 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `webhookURL` | string | 是 | 用于填充的 webhook URL |
|
||||
| `webhookURL` | string | 是 | 要填充的 webhook URL |
|
||||
| `data` | json | 是 | 要填充的数据 |
|
||||
| `authToken` | string | 是 | 用于 Clay webhook 认证的授权令牌 |
|
||||
| `authToken` | string | 否 | 用于 Clay webhook 认证的可选身份验证令牌(大多数 webhook 不需要此令牌) |
|
||||
|
||||
#### 输出
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | 操作成功状态 |
|
||||
| `output` | json | Clay 填充操作结果,包括来自 Clay webhook 的响应数据 |
|
||||
| `data` | json | 来自 Clay webhook 的响应数据 |
|
||||
| `metadata` | object | webhook 响应元数据 |
|
||||
|
||||
## 注意事项
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="discord"
|
||||
color="#E0E0E0"
|
||||
color="#5865F2"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
@@ -71,7 +71,8 @@ Sim 中的 Discord 组件使用高效的延迟加载,仅在需要时获取数
|
||||
| `botToken` | string | 是 | 用于身份验证的机器人令牌 |
|
||||
| `channelId` | string | 是 | 要发送消息的 Discord 频道 ID |
|
||||
| `content` | string | 否 | 消息的文本内容 |
|
||||
| `serverId` | string | 是 | Discord 服务器 ID(guild ID) |
|
||||
| `serverId` | string | 是 | Discord 服务器 ID \(公会 ID\) |
|
||||
| `files` | file[] | 否 | 要附加到消息的文件 |
|
||||
|
||||
#### 输出
|
||||
|
||||
|
||||
@@ -84,11 +84,12 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `fileName` | string | 是 | 要上传的文件名称 |
|
||||
| `content` | string | 是 | 要上传的文件内容 |
|
||||
| `mimeType` | string | 否 | 要上传文件的 MIME 类型 |
|
||||
| `folderSelector` | string | 否 | 选择上传文件的文件夹 |
|
||||
| `folderId` | string | 否 | 要上传文件的文件夹 ID(内部使用) |
|
||||
| `fileName` | string | 是 | 要上传文件的名称 |
|
||||
| `file` | file | 否 | 要上传的二进制文件 \(UserFile 对象\) |
|
||||
| `content` | string | 否 | 要上传的文本内容 \(使用此项或 file,不可同时使用\) |
|
||||
| `mimeType` | string | 否 | 要上传文件的 MIME 类型 \(如果未提供,将从文件中自动检测\) |
|
||||
| `folderSelector` | string | 否 | 选择要上传文件的文件夹 |
|
||||
| `folderId` | string | 否 | 要上传文件的文件夹 ID \(内部使用\) |
|
||||
|
||||
#### 输出
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `chatId` | string | 是 | 要写入的聊天 ID |
|
||||
| `content` | string | 是 | 要写入消息的内容 |
|
||||
| `files` | file[] | 否 | 要附加到消息的文件 |
|
||||
|
||||
#### 输出
|
||||
|
||||
@@ -184,6 +185,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
| `teamId` | string | 是 | 要写入的团队 ID |
|
||||
| `channelId` | string | 是 | 要写入的频道 ID |
|
||||
| `content` | string | 是 | 要写入频道的内容 |
|
||||
| `files` | file[] | 否 | 要附加到消息的文件 |
|
||||
|
||||
#### 输出
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
## 使用说明
|
||||
|
||||
将 OneDrive 集成到工作流程中。可以创建、上传和列出文件。需要 OAuth。
|
||||
将 OneDrive 集成到工作流程中。可以创建文本和 Excel 文件、上传文件以及列出文件。
|
||||
|
||||
## 工具
|
||||
|
||||
@@ -62,10 +62,12 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `fileName` | string | 是 | 要上传的文件名 |
|
||||
| `content` | string | 是 | 要上传的文件内容 |
|
||||
| `folderSelector` | string | 否 | 选择要上传文件的文件夹 |
|
||||
| `manualFolderId` | string | 否 | 手动输入的文件夹 ID(高级模式) |
|
||||
| `fileName` | string | 是 | 要上传的文件名称 |
|
||||
| `file` | file | 否 | 要上传的文件 \(二进制\) |
|
||||
| `content` | string | 否 | 要上传的文本内容 \(如果未提供文件\) |
|
||||
| `mimeType` | string | 否 | 要创建文件的 MIME 类型 \(例如,.txt 的 text/plain,.xlsx 的 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\) |
|
||||
| `folderSelector` | string | 否 | 选择上传文件的文件夹 |
|
||||
| `manualFolderId` | string | 否 | 手动输入的文件夹 ID \(高级模式\) |
|
||||
|
||||
#### 输出
|
||||
|
||||
|
||||
@@ -152,12 +152,13 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `to` | string | 是 | 收件人电子邮件地址 |
|
||||
| `subject` | string | 是 | 电子邮件主题 |
|
||||
| `body` | string | 是 | 电子邮件正文内容 |
|
||||
| `subject` | string | 是 | 邮件主题 |
|
||||
| `body` | string | 是 | 邮件正文内容 |
|
||||
| `replyToMessageId` | string | 否 | 要回复的消息 ID(用于线程化) |
|
||||
| `conversationId` | string | 否 | 用于线程化的会话 ID |
|
||||
| `cc` | string | 否 | 抄送收件人(逗号分隔) |
|
||||
| `bcc` | string | 否 | 密送收件人(逗号分隔) |
|
||||
| `cc` | string | 否 | 抄送收件人(以逗号分隔) |
|
||||
| `bcc` | string | 否 | 密送收件人(以逗号分隔) |
|
||||
| `attachments` | file[] | 否 | 要附加到邮件的文件 |
|
||||
|
||||
#### 输出
|
||||
|
||||
@@ -176,11 +177,12 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `to` | string | 是 | 收件人邮箱地址 |
|
||||
| `to` | string | 是 | 收件人电子邮件地址 |
|
||||
| `subject` | string | 是 | 邮件主题 |
|
||||
| `body` | string | 是 | 邮件正文内容 |
|
||||
| `cc` | string | 否 | 抄送收件人(逗号分隔) |
|
||||
| `bcc` | string | 否 | 密送收件人(逗号分隔) |
|
||||
| `cc` | string | 否 | 抄送收件人(以逗号分隔) |
|
||||
| `bcc` | string | 否 | 密送收件人(以逗号分隔) |
|
||||
| `attachments` | file[] | 否 | 要附加到邮件草稿的文件 |
|
||||
|
||||
#### 输出
|
||||
|
||||
|
||||
@@ -138,8 +138,9 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
| `apiKey` | string | 否 | Qdrant API 密钥(可选)|
|
||||
| `collection` | string | 是 | 集合名称 |
|
||||
| `vector` | array | 是 | 要搜索的向量 |
|
||||
| `limit` | number | 否 | 返回结果的数量 |
|
||||
| `filter` | object | 否 | 应用于搜索的过滤器 |
|
||||
| `limit` | number | 否 | 要返回的结果数量 |
|
||||
| `filter` | object | 否 | 要应用于搜索的过滤器 |
|
||||
| `search_return_data` | string | 否 | 搜索中要返回的数据 |
|
||||
| `with_payload` | boolean | 否 | 在响应中包含有效负载 |
|
||||
| `with_vector` | boolean | 否 | 在响应中包含向量 |
|
||||
|
||||
@@ -162,6 +163,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
| `apiKey` | string | 否 | Qdrant API 密钥(可选)|
|
||||
| `collection` | string | 是 | 集合名称 |
|
||||
| `ids` | array | 是 | 要获取的点 ID 数组 |
|
||||
| `fetch_return_data` | string | 否 | 获取中要返回的数据 |
|
||||
| `with_payload` | boolean | 否 | 在响应中包含有效负载 |
|
||||
| `with_vector` | boolean | 否 | 在响应中包含向量 |
|
||||
|
||||
|
||||
@@ -199,6 +199,26 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | object | 创建的 SharePoint 列表项 |
|
||||
|
||||
### `sharepoint_upload_file`
|
||||
|
||||
将文件上传到 SharePoint 文档库
|
||||
|
||||
#### 输入
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `siteId` | string | 否 | SharePoint 站点的 ID |
|
||||
| `driveId` | string | 否 | 文档库(驱动器)的 ID。如果未提供,则使用默认驱动器。 |
|
||||
| `folderPath` | string | 否 | 文档库中的可选文件夹路径(例如,/Documents/Subfolder) |
|
||||
| `fileName` | string | 否 | 可选:覆盖上传文件的名称 |
|
||||
| `files` | file[] | 否 | 要上传到 SharePoint 的文件 |
|
||||
|
||||
#### 输出
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `uploadedFiles` | array | 上传文件对象的数组 |
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 类别:`tools`
|
||||
|
||||
@@ -78,6 +78,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
| `botToken` | string | 否 | 自定义 Bot 的令牌 |
|
||||
| `channel` | string | 是 | 目标 Slack 频道(例如,#general) |
|
||||
| `text` | string | 是 | 要发送的消息文本(支持 Slack mrkdwn 格式) |
|
||||
| `files` | file[] | 否 | 要附加到消息的文件 |
|
||||
|
||||
#### 输出
|
||||
|
||||
|
||||
@@ -202,6 +202,28 @@ Sim 的 Supabase 集成使您能够轻松地将代理工作流连接到您的 Su
|
||||
| `message` | string | 操作状态消息 |
|
||||
| `results` | array | 已 upsert 的记录数组 |
|
||||
|
||||
### `supabase_vector_search`
|
||||
|
||||
在 Supabase 表中使用 pgvector 执行相似性搜索
|
||||
|
||||
#### 输入
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `projectId` | string | 是 | 您的 Supabase 项目 ID \(例如:jdrkgepadsdopsntdlom\) |
|
||||
| `functionName` | string | 是 | 执行向量搜索的 PostgreSQL 函数名称 \(例如:match_documents\) |
|
||||
| `queryEmbedding` | array | 是 | 要搜索相似项的查询向量/嵌入 |
|
||||
| `matchThreshold` | number | 否 | 最小相似度阈值 \(0-1\),通常为 0.7-0.9 |
|
||||
| `matchCount` | number | 否 | 返回结果的最大数量 \(默认值:10\) |
|
||||
| `apiKey` | string | 是 | 您的 Supabase 服务角色密钥 |
|
||||
|
||||
#### 输出
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | 操作状态消息 |
|
||||
| `results` | array | 包含向量搜索相似度分数的记录数组。每条记录包括一个相似度字段 \(0-1\),表示与查询向量的相似程度。 |
|
||||
|
||||
## 注意事项
|
||||
|
||||
- 类别:`tools`
|
||||
|
||||
@@ -189,6 +189,26 @@ Telegram 的主要功能包括:
|
||||
| `message` | 字符串 | 成功或错误消息 |
|
||||
| `data` | 对象 | 包含可选媒体的 Telegram 消息数据 |
|
||||
|
||||
### `telegram_send_document`
|
||||
|
||||
通过 Telegram Bot API 将文档(PDF、ZIP、DOC 等)发送到 Telegram 频道或用户。
|
||||
|
||||
#### 输入
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `botToken` | string | 是 | 您的 Telegram Bot API 令牌 |
|
||||
| `chatId` | string | 是 | 目标 Telegram 聊天 ID |
|
||||
| `files` | file[] | 否 | 要发送的文档文件(PDF、ZIP、DOC 等)。最大大小:50MB |
|
||||
| `caption` | string | 否 | 文档标题(可选) |
|
||||
|
||||
#### 输出
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `message` | string | 成功或错误消息 |
|
||||
| `data` | object | 包含文档的 Telegram 消息数据 |
|
||||
|
||||
## 注意
|
||||
|
||||
- 类别:`tools`
|
||||
|
||||
@@ -59,9 +59,10 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `apiKey` | string | 是 | 所选模型提供商的 API 密钥 |
|
||||
| `imageUrl` | string | 是 | 可公开访问的图像 URL |
|
||||
| `model` | string | 否 | 要使用的视觉模型(gpt-4o、claude-3-opus-20240229 等) |
|
||||
| `prompt` | string | 否 | 图像分析的自定义提示 |
|
||||
| `imageUrl` | string | 否 | 可公开访问的图片 URL |
|
||||
| `imageFile` | file | 否 | 要分析的图片文件 |
|
||||
| `model` | string | 否 | 要使用的视觉模型 \(gpt-4o, claude-3-opus-20240229 等\) |
|
||||
| `prompt` | string | 否 | 用于图像分析的自定义提示 |
|
||||
|
||||
#### 输出
|
||||
|
||||
|
||||
144
apps/docs/content/docs/zh/tools/webflow.mdx
Normal file
144
apps/docs/content/docs/zh/tools/webflow.mdx
Normal file
@@ -0,0 +1,144 @@
|
||||
---
|
||||
title: Webflow
|
||||
description: 管理 Webflow CMS 集合
|
||||
---
|
||||
|
||||
import { BlockInfoCard } from "@/components/ui/block-info-card"
|
||||
|
||||
<BlockInfoCard
|
||||
type="webflow"
|
||||
color="#E0E0E0"
|
||||
icon={true}
|
||||
iconSvg={`<svg className="block-icon"
|
||||
|
||||
|
||||
|
||||
viewBox='0 0 1080 674'
|
||||
fill='none'
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
fillRule='evenodd'
|
||||
clipRule='evenodd'
|
||||
d='M1080 0L735.386 673.684H411.695L555.916 394.481H549.445C430.464 548.934 252.942 650.61 -0.000488281 673.684V398.344C-0.000488281 398.344 161.813 388.787 256.938 288.776H-0.000488281V0.0053214H288.771V237.515L295.252 237.489L413.254 0.0053214H631.644V236.009L638.126 235.999L760.555 0H1080Z'
|
||||
fill='#146EF5'
|
||||
/>
|
||||
</svg>`}
|
||||
/>
|
||||
|
||||
{/* MANUAL-CONTENT-START:intro */}
|
||||
[Webflow](https://webflow.com/) 是一个强大的可视化网页设计平台,能够让您无需编写代码即可构建响应式网站。它结合了可视化设计界面和强大的 CMS(内容管理系统),使您能够为网站创建、管理和发布动态内容。
|
||||
|
||||
使用 Webflow,您可以:
|
||||
|
||||
- **可视化设计**:使用可视化编辑器创建自定义网站,该编辑器会生成干净、语义化的 HTML/CSS 代码
|
||||
- **动态管理内容**:使用 CMS 创建结构化内容集合,例如博客文章、产品、团队成员或任何自定义数据
|
||||
- **即时发布**:将您的网站部署到 Webflow 的托管服务,或导出代码以进行自定义托管
|
||||
- **创建响应式设计**:构建在桌面、平板电脑和移动设备上无缝运行的网站
|
||||
- **自定义集合**:为您的内容类型定义自定义字段和数据结构
|
||||
- **自动更新内容**:通过 API 编程方式管理您的 CMS 内容
|
||||
|
||||
在 Sim 中,Webflow 集成使您的代理能够通过 API 身份验证无缝与 Webflow CMS 集合交互。这支持强大的自动化场景,例如从 AI 生成的内容中自动创建博客文章、更新产品信息、管理团队成员资料以及检索 CMS 项目以生成动态内容。您的代理可以列出现有项目以浏览内容,通过 ID 检索特定项目,创建新条目以添加新内容,更新现有项目以保持信息最新,以及删除过时内容。此集成弥合了您的 AI 工作流与 Webflow CMS 之间的差距,实现了自动化内容管理、动态网站更新和简化的内容工作流,使您的网站无需人工干预即可保持新鲜和最新。{/* MANUAL-CONTENT-END */}
|
||||
|
||||
## 使用说明
|
||||
|
||||
将 Webflow CMS 集成到工作流程中。可以创建、获取、列出、更新或删除 Webflow CMS 集合中的项目。以编程方式管理您的 Webflow 内容。可以在触发模式下使用,当集合项目发生变化或提交表单时触发工作流程。
|
||||
|
||||
## 工具
|
||||
|
||||
### `webflow_list_items`
|
||||
|
||||
列出 Webflow CMS 集合中的所有项目
|
||||
|
||||
#### 输入
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | 是 | 集合的 ID |
|
||||
| `offset` | number | 否 | 分页偏移量(可选) |
|
||||
| `limit` | number | 否 | 返回的最大项目数(可选,默认值:100) |
|
||||
|
||||
#### 输出
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `items` | json | 集合项目的数组 |
|
||||
| `metadata` | json | 查询的元数据 |
|
||||
|
||||
### `webflow_get_item`
|
||||
|
||||
从 Webflow CMS 集合中获取单个项目
|
||||
|
||||
#### 输入
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | 是 | 集合的 ID |
|
||||
| `itemId` | string | 是 | 要检索的项目 ID |
|
||||
|
||||
#### 输出
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | 检索到的项目对象 |
|
||||
| `metadata` | json | 检索到的项目的元数据 |
|
||||
|
||||
### `webflow_create_item`
|
||||
|
||||
在 Webflow CMS 集合中创建一个新项目
|
||||
|
||||
#### 输入
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | 是 | 集合的 ID |
|
||||
| `fieldData` | json | 是 | 新项目的字段数据,格式为 JSON 对象。键名应与集合字段名称匹配。 |
|
||||
|
||||
#### 输出
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | 创建的项目对象 |
|
||||
| `metadata` | json | 关于创建项目的元数据 |
|
||||
|
||||
### `webflow_update_item`
|
||||
|
||||
更新 Webflow CMS 集合中的现有项目
|
||||
|
||||
#### 输入
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | 是 | 集合的 ID |
|
||||
| `itemId` | string | 是 | 要更新项目的 ID |
|
||||
| `fieldData` | json | 是 | 要更新的字段数据,格式为 JSON 对象。仅包含您想更改的字段。 |
|
||||
|
||||
#### 输出
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `item` | json | 更新的项目对象 |
|
||||
| `metadata` | json | 关于更新项目的元数据 |
|
||||
|
||||
### `webflow_delete_item`
|
||||
|
||||
从 Webflow CMS 集合中删除项目
|
||||
|
||||
#### 输入
|
||||
|
||||
| 参数 | 类型 | 必需 | 描述 |
|
||||
| --------- | ---- | -------- | ----------- |
|
||||
| `collectionId` | string | 是 | 集合的 ID |
|
||||
| `itemId` | string | 是 | 要删除项目的 ID |
|
||||
|
||||
#### 输出
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
| --------- | ---- | ----------- |
|
||||
| `success` | boolean | 是否删除成功 |
|
||||
| `metadata` | json | 有关删除的元数据 |
|
||||
|
||||
## 注意
|
||||
|
||||
- 类别:`tools`
|
||||
- 类型:`webflow`
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user