mirror of
https://github.com/run-llama/workflows-ts.git
synced 2026-07-21 14:15:24 -04:00
remove remaining llamaflow mentions (#118)
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
---
|
||||
"@llamaindex/workflow-docs": patch
|
||||
"@llamaindex/workflow-core": patch
|
||||
"@llamaindex/workflow-http": patch
|
||||
---
|
||||
|
||||
chore: bump version
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
- name: Checkout Repo
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: llamaflow
|
||||
path: workflows-ts
|
||||
repository: "${{ github.repository }}"
|
||||
fetch-depth: "1"
|
||||
- name: Checkout LITS
|
||||
@@ -57,31 +57,31 @@ jobs:
|
||||
fetch-depth: "1"
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
package_json_file: "llamaflow/package.json"
|
||||
package_json_file: "workflows-ts/package.json"
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
package_json_file: "llamaindex/package.json"
|
||||
- name: Setup Node.js for Llamaflow
|
||||
- name: Setup Node.js for workflows-ts
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: "llamaflow/pnpm-lock.yaml"
|
||||
cache-dependency-path: "workflows-ts/pnpm-lock.yaml"
|
||||
- name: Setup Node.js for LlamaIndex
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: "llamaindex/pnpm-lock.yaml"
|
||||
- name: Install dependencies for llamaflow
|
||||
- name: Install dependencies for workflows-ts
|
||||
run: pnpm install
|
||||
working-directory: llamaflow
|
||||
working-directory: workflows-ts
|
||||
- name: Install dependencies for llamaindex
|
||||
run: pnpm install
|
||||
working-directory: llamaindex
|
||||
- name: Link Llamaflow docs to LlamaIndex
|
||||
- name: Link workflows-ts docs to LlamaIndex
|
||||
run: |
|
||||
pnpm link ${{github.workspace}}/llamaflow/docs
|
||||
pnpm link ${{github.workspace}}/workflows/docs
|
||||
working-directory: llamaindex/apps/next
|
||||
- name: Install Vercel CLI
|
||||
run: npm install --global vercel@latest
|
||||
|
||||
@@ -26,7 +26,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
||||
|
||||
## Architecture
|
||||
|
||||
llama-flow is an **event-driven workflow engine** with these core concepts:
|
||||
`@llamaindex/workflow-core` is an **event-driven workflow engine** with these core concepts:
|
||||
|
||||
### Core Components
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
🌊 is a simple, lightweight workflow engine, in TypeScript.
|
||||
|
||||
[](https://stackblitz.com/github/run-llama/llama-flow/tree/main/demo/browser?file=src%2FApp.tsx)
|
||||
[](https://github.com/run-llama/llama-flow/actions/workflows/test.yml?query=branch%3Amain)
|
||||
[](https://stackblitz.com/github/run-llama/workflows-ts/tree/main/demo/browser?file=src%2FApp.tsx)
|
||||
[](https://github.com/run-llama/workflows-ts/actions/workflows/test.yml?query=branch%3Amain)
|
||||
[](https://bundlephobia.com/result?p=@llamaindex/workflow-core)
|
||||
|
||||
- Minimal core API (<=2kb)
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "@llamaindex/workflow-docs",
|
||||
"version": "0.0.9",
|
||||
"version": "0.1.0",
|
||||
"files": [
|
||||
"llamaflow"
|
||||
"workflows"
|
||||
],
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -3,14 +3,14 @@ title: LlamaIndex Workflows
|
||||
description: LlamaIndex Workflows is a simple and lightweight engine for JavaScript and TypeScript apps.
|
||||
---
|
||||
|
||||
LlamaIndex Workflow (LlamaFlow) is a library for streaming event-driven programming in JavaScript and TypeScript.
|
||||
LlamaIndex Workflows are a library for event-driven programming in JavaScript and TypeScript.
|
||||
It provides a simple and lightweight orchestration solution for building complex workflows with minimal boilerplate.
|
||||
|
||||
It combines [event-driven](#) programming, [async context](#) and [streaming](#) to create a flexible and efficient way to handle data processing tasks.
|
||||
|
||||
The essential concepts of LlamaFlow are:
|
||||
The essential concepts of Workflows are:
|
||||
|
||||
- **Events**: are the core building blocks of LlamaFlow. They represent data that flows through the system.
|
||||
- **Events**: are the core building blocks of Workflows. They represent data that flows through the system.
|
||||
- **Handlers**: are functions that process events and can produce new events.
|
||||
- **Context**: is the environment in which events are processed. It provides access to the event stream and allows sending new events.
|
||||
- **Workflow**: is the collection of events, handlers, and context that define the processing logic.
|
||||
@@ -60,16 +60,16 @@ workflow.handle([stopEvent], (event) => {
|
||||
});
|
||||
|
||||
const { sendEvent } = workflow.createContext();
|
||||
sendEvent(startEvent.with("Hello, LlamaFlow!"));
|
||||
sendEvent(startEvent.with("Hello, Workflows!"));
|
||||
```
|
||||
|
||||
## Parallel processing with async handlers
|
||||
|
||||
Tool calls are a common pattern in LLM applications, where the model generates a call to an external function or API.
|
||||
|
||||
### With LlamaFlow
|
||||
### With Workflows
|
||||
|
||||
LlamaFlow provides [abort signals](#) and [parallel processing](#) out of the box.
|
||||
Workflows provide [abort signals](#) and [parallel processing](#) out of the box.
|
||||
|
||||
```ts
|
||||
workflow.handle([toolCallEvent], ({ data: { id, name, args } }) => {
|
||||
@@ -129,7 +129,7 @@ sendEvent(
|
||||
startEvent.with([
|
||||
{
|
||||
role: "user",
|
||||
content: "Hello, LlamaFlow!",
|
||||
content: "Hello, Workflows!",
|
||||
},
|
||||
]),
|
||||
);
|
||||
+3
-3
@@ -172,7 +172,7 @@ async function createRagTool(): Promise<QueryEngineTool> {
|
||||
// Load or define documents for the RAG tool
|
||||
const ragDocs = [
|
||||
new Document({
|
||||
text: "The LlamaFlow workflow engine orchestrates complex tasks.",
|
||||
text: "The workflow engine orchestrates complex tasks.",
|
||||
}),
|
||||
new Document({
|
||||
text: "LlamaIndex agents can use tools to interact with external systems.",
|
||||
@@ -192,7 +192,7 @@ async function createRagTool(): Promise<QueryEngineTool> {
|
||||
metadata: {
|
||||
name: "llama_info_tool",
|
||||
description:
|
||||
"Provides information about LlamaFlow, LlamaIndex Agents, and sometimes specific facts like SF budget figures.",
|
||||
"Provides information about Workflows, LlamaIndex Agents, and sometimes specific facts like SF budget figures.",
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -253,7 +253,7 @@ async function runAgentWorkflow() {
|
||||
await initializeAgent(); // Ensure agent is ready
|
||||
|
||||
const { stream, sendEvent } = agentWorkflow.createContext();
|
||||
const query = "What is LlamaFlow and what is 15 + 27?";
|
||||
const query = "What are workflows and what is 15 + 27?";
|
||||
console.log(`Sending query to agent workflow: ${query}`);
|
||||
sendEvent(agentQueryEvent.with(query));
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/run-llama/llama-flow.git"
|
||||
"url": "https://github.com/run-llama/workflows-ts.git"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/run-llama/llama-flow.git"
|
||||
"url": "https://github.com/run-llama/workflows-ts.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "bunchee",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# llama-flow-cjs-test
|
||||
# workflows-ts-cjs-test
|
||||
|
||||
## 1.0.2
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "llama-flow-cjs-test",
|
||||
"name": "workflows-ts-cjs-test",
|
||||
"version": "1.0.2",
|
||||
"private": true,
|
||||
"description": "CommonJS test for llama-flow workflow functionality",
|
||||
"description": "CommonJS test for workflows-ts functionality",
|
||||
"type": "commonjs",
|
||||
"scripts": {
|
||||
"test": "vitest run",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import type { WorkflowEvent, Workflow } from "@llamaindex/workflow-core";
|
||||
|
||||
// Type the require imports properly for TypeScript
|
||||
const llamaFlow = require("@llamaindex/workflow-core") as {
|
||||
const workflows = require("@llamaindex/workflow-core") as {
|
||||
createWorkflow: () => Workflow;
|
||||
workflowEvent: <T = any>() => WorkflowEvent<T>;
|
||||
};
|
||||
@@ -13,7 +13,7 @@ const stateLlama = require("@llamaindex/workflow-core/middleware/state") as {
|
||||
};
|
||||
|
||||
const { createStatefulMiddleware } = stateLlama;
|
||||
const { createWorkflow, workflowEvent } = llamaFlow;
|
||||
const { createWorkflow, workflowEvent } = workflows;
|
||||
|
||||
interface JokeResult {
|
||||
joke: string;
|
||||
|
||||
Reference in New Issue
Block a user