You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eino abstracts commonly used components in LLM applications, such as `ChatModel`, `Embedding`, `Retriever`, etc. These are the building blocks for constructing an LLM application, forming the foundation of application capabilities and serving as atomic objects for complex logic orchestration.
Using multiple components in combination to implement the chain of business logic, Eino provides orchestration methods through Chains/Graphs, encapsulating the complexity of linking business logic within Eino itself. It offers easy-to-understand business logic orchestration interfaces and provides a unified cross-sectional governance capability.
Eino packages the most commonly used LLM application modes into simple and easy-to-use tools, ultra-simplifying the development of LLM applications for generic scenarios. Currently, it provides `ReAct Agent` and `Host Multi Agent`.
23
23
24
-
-**EinoDev Development Assistant Tool**: [EinoDev: Devops tools](/en/docs/eino/core_modules/devops)
24
+
-**EinoDev Development Assistant Tool**: [EinoDev: Devops tools](/docs/eino/core_modules/devops)
25
25
26
26
Eino is dedicated to making the development of large-scale model applications with full-code very simple, and EinoDev provides a `visual` and `interactive` development and debugging solution for Eino orchestration, which allows developers to see the results immediately, releasing their energy from the `debugging hell` and focusing on the scene logic.
-`ToolsNode` provides the capability to execute external tools
16
16
17
-
> For detailed information on components, refer to: [Eino: Components](/en/docs/eino/core_modules/components)
17
+
> For detailed information on components, refer to: [Eino: Components](/docs/eino/core_modules/components)
18
18
19
19
An LLM application, in addition to needing these atomic capabilities, also needs to **combine and sequence** these atomic capabilities based on contextual business logic. This is called **Orchestration**.
20
20
@@ -39,16 +39,16 @@ Therefore, Eino provides a solution for "orchestration based on the Graph model
39
39
Specifically, the following features are implemented:
40
40
41
41
- Everything is centered around "components," standardizing the encapsulation of business functionalities, making **division of responsibilities clear** and **reuse** natural.
42
-
- For more details, refer to: [Eino: Components](/en/docs/eino/core_modules/components)
42
+
- For more details, refer to: [Eino: Components](/docs/eino/core_modules/components)
43
43
- The complexity of business logic is encapsulated within the components, giving the orchestration layer a more global perspective, making **logic layers very clear**.
44
44
- Provides aspect capabilities and a callback mechanism that supports node-based **unified governance capabilities**.
45
-
- For more details, refer to: [Eino: Callback Manual](/en/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual)
45
+
- For more details, refer to: [Eino: Callback Manual](/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual)
46
46
- Provides a call option mechanism, **extensibility** is the most fundamental requirement of the system in rapid iterations.
47
-
- For more details, refer to: [Eino: CallOption capabilities and specification](/en/docs/eino/core_modules/chain_and_graph_orchestration/call_option_capabilities)
47
+
- For more details, refer to: [Eino: CallOption capabilities and specification](/docs/eino/core_modules/chain_and_graph_orchestration/call_option_capabilities)
48
48
- Provides an enhanced "type alignment" development method, reducing the mental burden on developers and leveraging Golang's **type safety** features.
49
-
- For more details, refer to: [Eino: The design concept of orchestration](/en/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles)
49
+
- For more details, refer to: [Eino: The design concept of orchestration](/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles)
50
50
- Provides an **"automated stream conversion"** capability, removing "stream" from the "source of complexity ranking" in the orchestration system.
51
-
- For more details, refer to: [Eino Points of Streaming Orchestration](/en/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials)
51
+
- For more details, refer to: [Eino Points of Streaming Orchestration](/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials)
52
52
53
53
Graph itself is powerful and semantically complete, capable of rendering almost any "data flow network," such as "branching," "parallel," and "loop."
Copy file name to clipboardExpand all lines: content/en/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ The core concepts interconnected within Eino include entities such as Components
21
21
22
22
### **Trigger Entities**
23
23
24
-
Component (including types defined officially and Lambda), Graph Node (as well as Chain Node), and the Graph itself (including Chain). These three types of entities require cross-cutting functionality injection and intermediate state exposure, thus they all trigger callbacks. See the section on “[Trigger Methods](/en/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual)” below for details.
24
+
Component (including types defined officially and Lambda), Graph Node (as well as Chain Node), and the Graph itself (including Chain). These three types of entities require cross-cutting functionality injection and intermediate state exposure, thus they all trigger callbacks. See the section on “[Trigger Methods](/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual)” below for details.
25
25
26
26
### **Trigger Timings**
27
27
@@ -38,7 +38,7 @@ const (
38
38
)
39
39
```
40
40
41
-
Different trigger entities, in various scenarios, determine whether to trigger OnStart or OnStartWithStreamInput (similarly, OnEnd/OnEndWithStreamOutput). Specific rules are detailed in the section on “[Trigger Methods](/en/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual)” below.
41
+
Different trigger entities, in various scenarios, determine whether to trigger OnStart or OnStartWithStreamInput (similarly, OnEnd/OnEndWithStreamOutput). Specific rules are detailed in the section on “[Trigger Methods](/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual)” below.
42
42
43
43
### **Callback Handler**
44
44
@@ -62,7 +62,7 @@ A Handler is a struct that implements the 5 methods above (corresponding to the
62
62
63
63
Each method also returns a new context: used for **passing information between different trigger timings** of the same Handler.
64
64
65
-
If a Handler does not want to focus on all 5 trigger timings but only a subset, for example, just OnStart, it is recommended to use `NewHandlerBuilder().OnStartFn(...).Build()`. If it only wants to focus on specific components, such as ChatModel, it is recommended to use `NewHandlerHelper().ChatModel(...).Handler()`, which receives callbacks from only ChatModel and obtains a specific type of CallbackInput/CallbackOutput. See the section on “[Handler Implementation Methods](/en/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual)” for details.
65
+
If a Handler does not want to focus on all 5 trigger timings but only a subset, for example, just OnStart, it is recommended to use `NewHandlerBuilder().OnStartFn(...).Build()`. If it only wants to focus on specific components, such as ChatModel, it is recommended to use `NewHandlerHelper().ChatModel(...).Handler()`, which receives callbacks from only ChatModel and obtains a specific type of CallbackInput/CallbackOutput. See the section on “[Handler Implementation Methods](/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual)” for details.
66
66
67
67
The order of triggering between different Handlers is **not** guaranteed.
68
68
@@ -287,11 +287,11 @@ When the Graph is running, each component will operate in either Invoke or Trans
287
287
288
288
**Which specific trigger points a Graph Node executes (OnStart or OnStartWithStreamInput) depends on the component's business streaming paradigm and the Graph running mode.**
289
289
290
-
For a detailed introduction to Eino's streaming programming, refer to [Eino Points of Streaming Orchestration](/en/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials).
290
+
For a detailed introduction to Eino's streaming programming, refer to [Eino Points of Streaming Orchestration](/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials).
291
291
292
292
### **Graph Self Trigger (Graph Callback)**
293
293
294
-
The Graph triggers the Callback Handler at its own start, end, and error moments. If the Graph is called in Invoke form, it triggers OnStart/OnEnd/OnError. If called in Stream/Collect/Transform form, it triggers OnStartWithStreamInput/OnEndWithStreamOutput/OnError. This is because **the Graph will always execute internally in Invoke or Transform**. See [Eino Points of Streaming Orchestration](/en/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials)
294
+
The Graph triggers the Callback Handler at its own start, end, and error moments. If the Graph is called in Invoke form, it triggers OnStart/OnEnd/OnError. If called in Stream/Collect/Transform form, it triggers OnStartWithStreamInput/OnEndWithStreamOutput/OnError. This is because **the Graph will always execute internally in Invoke or Transform**. See [Eino Points of Streaming Orchestration](/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials)
295
295
296
296
It is worth noting that a graph is also a kind of component, so a graph callback is also a special form of component callback. According to the definition of Node Callback, when the component inside the Node implements the perception and processing of the trigger moments, the Node will directly reuse the Component's implementation and will not implement the Node Callback again. This means when a graph is added to another Graph as a Node through the AddGraphNode method, this Node will reuse the internal graph's graph callback.
Copy file name to clipboardExpand all lines: content/en/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ The green part in the figure represents the ordinary edge connection, which requ
50
50
51
51
② The downstream accepts an interface, and the upstream implements that interface: For example, the upstream structure implements the Format() interface, and the downstream accepts an interface{ Format() }. A special situation is when the downstream is any (empty interface), the upstream definitely implements any, so they can certainly connect.
52
52
53
-
③ The upstream is an interface, and the downstream is a specific type: When the downstream specific type implements the upstream's interface type, it may or may not work, which cannot be determined at compile time, only at runtime when the explicit type of upstream is determined. For detailed description, see: [Eino: The design concept of orchestration](/en/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles)
53
+
③ The upstream is an interface, and the downstream is a specific type: When the downstream specific type implements the upstream's interface type, it may or may not work, which cannot be determined at compile time, only at runtime when the explicit type of upstream is determined. For detailed description, see: [Eino: The design concept of orchestration](/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles)
54
54
55
55
The yellow part in the figure represents another type conversion mechanism provided by eino, that is: if downstream receives a type `map[string]any`, but the upstream output type is not map[string]any, you can use `graph.AddXXXNode(node_key, xxx, compose.WithOutputKey("outkey")` to convert the upstream output type to map[string]any, where the key of the map is the OutputKey specified in the option. This mechanism is generally convenient to use when multiple edges converge to a single node.
56
56
@@ -174,7 +174,7 @@ In Eino, the result of orchestration is either a graph or a chain. To execute it
174
174
175
175
One important function of Runnable is to provide four calling methods: "Invoke", "Stream", "Collect", and "Transform".
176
176
177
-
> You can check the introduction of the above calling methods and detailed runnable introduction in: [Eino: Overview](/en/docs/eino/overview)
177
+
> You can check the introduction of the above calling methods and detailed runnable introduction in: [Eino: Overview](/docs/eino/overview)
178
178
179
179
Suppose we have a `Graph[[]*schema.Message, []*schema.Message]`, which contains a ChatModel node and a Lambda node. After compiling, it becomes a `Runnable[[]*schema.Message, []*schema.Message]`.
180
180
@@ -272,7 +272,7 @@ func Init() {
272
272
273
273
### **Runtime Type Alignment Check Scenarios**
274
274
275
-
Eino's Graph type alignment check will verify if the types of the two nodes match during `err = graph.AddEdge("node1", "node2")`. This allows for type mismatch errors to be identified either during the `graph construction process` or the `Compile process`, adhering to rules ①②③ as listed in [Eino: The design concept of orchestration](/en/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles).
275
+
Eino's Graph type alignment check will verify if the types of the two nodes match during `err = graph.AddEdge("node1", "node2")`. This allows for type mismatch errors to be identified either during the `graph construction process` or the `Compile process`, adhering to rules ①②③ as listed in [Eino: The design concept of orchestration](/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles).
276
276
277
277
When the upstream node's output is an `interface`, and the downstream node type implements that `interface`, it is likely that upstream can be converted to downstream type (type assertion). However, whether the conversion succeeds can only be determined during the `runtime process`, so type checks in this scenario are deferred to runtime.
278
278
@@ -315,7 +315,7 @@ When running a Graph via Invoke, all internal nodes operate in Invoke mode. When
315
315
316
316
Finally, Eino requires all orchestration elements to be aware of and capable of handling streams. This includes branches, state handlers, callback handlers, passthroughs, lambdas, etc.
317
317
318
-
For more details on Eino's streaming capabilities, refer to [Eino Points of Streaming Orchestration](/en/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials).
318
+
For more details on Eino's streaming capabilities, refer to [Eino Points of Streaming Orchestration](/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials).
319
319
320
320
### **Global State**
321
321
@@ -345,7 +345,7 @@ In either case, RunInfo will be automatically inferred.
345
345
346
346
Additionally, for the Graph as a whole, Callback aspects will always be injected, with RunInfo being the Graph itself.
347
347
348
-
For a complete explanation of Eino's Callback capabilities, see [Eino: Callback Manual](/en/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual).
348
+
For a complete explanation of Eino's Callback capabilities, see [Eino: Callback Manual](/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual).
349
349
350
350
### **Option Allocation**
351
351
@@ -356,7 +356,7 @@ Eino supports various dimensions of Call Option allocation methods:
356
356
- Any specific nodes can be designated using `DesignateNode(key ...string)`.
357
357
- Any depth of nested graphs, or any specific nodes within them, can be designated using `DesignateNodeWithPath(path ...*NodePath)`.
358
358
359
-
For a complete explanation of Eino's Call Option capabilities, see [Eino: CallOption capabilities and specification](/en/docs/eino/core_modules/chain_and_graph_orchestration/call_option_capabilities).
359
+
For a complete explanation of Eino's Call Option capabilities, see [Eino: CallOption capabilities and specification](/docs/eino/core_modules/chain_and_graph_orchestration/call_option_capabilities).
Copy file name to clipboardExpand all lines: content/en/docs/eino/core_modules/chain_and_graph_orchestration/stream_programming_essentials.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ weight: 0
8
8
---
9
9
10
10
> 💡
11
-
> It is recommended to read: [Eino: Overview](/en/docs/eino/overview)[Eino: The design concept of orchestration](/en/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles)
11
+
> It is recommended to read: [Eino: Overview](/docs/eino/overview)[Eino: The design concept of orchestration](/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles)
In the official Eino components, except for the Chat Model and Tool that additionally support the stream, all other components only support Invoke. For specific component introductions, refer to: [Eino: Components](/en/docs/eino/core_modules/components)
81
+
In the official Eino components, except for the Chat Model and Tool that additionally support the stream, all other components only support Invoke. For specific component introductions, refer to: [Eino: Components](/docs/eino/core_modules/components)
82
82
83
83
The streaming paradigms Collect and Transform are currently only used in orchestration scenarios.
84
84
@@ -101,7 +101,7 @@ In the diagram above, if the Tool is a StreamableTool, i.e., the output is Strea
101
101
The Concat message stream above is a capability automatically provided by the Eino framework. Even if it's not a message and is arbitrary T, as long as certain conditions are met, the Eino framework will automatically convert StreamReader[T] to T. These conditions are: **In orchestration, when the upstream output of a component is StreamReader[T], but the component only provides T as the input business interface, the framework will automatically concatenate StreamReader[T] into T before inputting it to this component.**
102
102
103
103
> 💡
104
-
> The process of concatenating StreamReader[T] into T by the framework may require the user to provide a Concat function. Refer to the chapter on "**Fan-In and Merging**" in [Eino: The design concept of orchestration](/en/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles).
104
+
> The process of concatenating StreamReader[T] into T by the framework may require the user to provide a Concat function. Refer to the chapter on "**Fan-In and Merging**" in [Eino: The design concept of orchestration](/docs/eino/core_modules/chain_and_graph_orchestration/orchestration_design_principles).
105
105
106
106
On the other hand, consider an opposite example. Again, let's look at a more complete orchestration diagram of the React Agent:
0 commit comments