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
Copy file name to clipboardExpand all lines: content/en/docs/eino/FAQ.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
2
Description: ""
3
-
date: "2026-01-20"
3
+
date: "2026-01-30"
4
4
lastmod: ""
5
5
tags: []
6
6
title: FAQ
7
-
weight: 6
7
+
weight: 7
8
8
---
9
9
10
10
# Q: cannot use openapi3.TypeObject (untyped string constant "object") as *openapi3.Types value in struct literal,cannot use types (variable of type string) as *openapi3.Types value in struct literal
Copy file name to clipboardExpand all lines: content/en/docs/eino/core_modules/chain_and_graph_orchestration/callback_manual.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
Description: ""
3
-
date: "2026-01-20"
3
+
date: "2026-01-30"
4
4
lastmod: ""
5
5
tags: []
6
6
title: 'Eino: Callback Manual'
@@ -155,7 +155,7 @@ Inject Handlers at graph runtime through `compose.WithCallbacks`, these Handlers
155
155
156
156
Inject Handlers to a specific Node of the top-level Graph through `compose.WithCallbacks(...).DesignateNode(...)`. When this Node itself is a nested Graph, it will be injected into this nested Graph itself and its internal Nodes.
157
157
158
-
Inject Handlers to a specific Node of an internally nested Graph through `compose.WithCallbacks(...).DesignateNodeForPath(...)`.
158
+
Inject Handlers to a specific Node of an internally nested Graph through `compose.WithCallbacks(...).DesignateNodeWithPath(...)`.
Copy file name to clipboardExpand all lines: content/en/docs/eino/core_modules/components/tools_node_guide/how_to_create_a_tool.md
+22-24Lines changed: 22 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
Description: ""
3
-
date: "2026-01-20"
3
+
date: "2026-01-30"
4
4
lastmod: ""
5
5
tags: []
6
6
title: How to Create a Tool
@@ -41,7 +41,7 @@ type StreamableTool interface {
41
41
42
42
## ToolInfo Representations
43
43
44
-
In LLM function-call flows, the model must understand whether generated parameters satisfy constraints. Eino supports two representations: `params map[string]*ParameterInfo` and `*openapi3.Schema`.
44
+
In LLM function-call flows, the model must understand whether generated parameters satisfy constraints. Based on developer habits and domain standards, Eino provides two representations: `params map[string]*ParameterInfo` and `JSON Schema`.
JSON Schema’s constraint system is rich. In practice, you usually generate it from struct tags or helper functions.
82
+
Another common way to represent parameter constraints is `JSON Schema`: [https://json-schema.org/draft/2020-12](https://json-schema.org/draft/2020-12).
83
83
84
-
#### `GoStruct2ParamsOneOf`
84
+
The JSON Schema standard provides very rich ways to constrain parameters. In practice, developers generally don't construct this structure themselves, but use methods to generate it.
85
85
86
-
Describe constraints via Go tags on a struct and generate `ParamsOneOf`:
86
+
#### Using GoStruct2ParamsOneOf
87
+
88
+
Eino provides a way to describe parameter constraints through go tags in structs, and provides the GoStruct2ParamsOneOf method to generate parameter constraints for a struct:
The tags used to extract parameter field names and descriptions from T are as follows:
93
95
94
-
-`jsonschema_description:"xxx"`[recommended] or `jsonschema:"description=xxx"`
95
-
- Note: descriptions often include commas; tag commas separate fields and cannot be escaped. Prefer `jsonschema_description`.
96
-
-`jsonschema:"enum=xxx,enum=yyy,enum=zzz"`
97
-
-`jsonschema:"required"`
98
-
-`json:"xxx,omitempty"` → `omitempty` implies not required
99
-
- Customize via `utils.WithSchemaModifier`
96
+
- jsonschema_description:"xxx" [recommended] or jsonschema:"description=xxx"
97
+
- Descriptions often contain commas, and commas in tags are separators for different fields and cannot be escaped. It's strongly recommended to use the separate jsonschema_description tag.
98
+
- jsonschema:"enum=xxx,enum=yyy,enum=zzz"
99
+
- Fields are required by default; json:"xxx,omitempty" => use json tag's omitempty to indicate not required
100
+
- Use utils.WithSchemaModifier to implement custom parsing methods
100
101
101
102
Example:
102
103
@@ -109,7 +110,7 @@ import (
109
110
)
110
111
111
112
typeUserstruct {
112
-
Namestring`json:"name" jsonschema_description=the name of the user jsonschema:"required"`
113
+
Namestring`json:"name,omitempty" jsonschema_description=the name of the user`
113
114
Ageint`json:"age" jsonschema_description:"the age of the user"`
You usually won't call this directly; prefer `utils.GoStruct2ToolInfo()` or `utils.InferTool()`.
123
+
This method is generally not called by developers directly; instead, use `utils.GoStruct2ToolInfo()`to build ToolInfo, or use `utils.InferTool()` directly to build a tool. See the "Converting local functions to tools" section below for details.
123
124
124
125
## Ways to Implement a Tool
125
126
@@ -238,9 +239,9 @@ import (
238
239
)
239
240
240
241
typeUserstruct {
241
-
Namestring`json:"name" jsonschema:"required,description=the name of the user"`
242
-
Ageint`json:"age" jsonschema:"description=the age of the user"`
Eino’s Option mechanism passes dynamic runtime parameters. Details: `Eino: CallOption capabilities and conventions` at `/docs/eino/core_modules/chain_and_graph_orchestration/call_option_capabilities`. The same mechanism applies to custom tools.
262
+
The Option mechanism is a mechanism provided by Eino for passing dynamic parameters at runtime. For details, see [Eino: CallOption Capabilities and Conventions](/docs/eino/core_modules/chain_and_graph_orchestration/call_option_capabilities). This mechanism also applies to custom tools.
262
263
263
264
When you need custom option parameters, use `InferOptionableTool`:
264
265
@@ -310,10 +311,7 @@ func useInInvoke() {
310
311
311
312
### Approach 3 — Use tools from eino-ext
312
313
313
-
Beyond custom tools, the `eino-ext` project provides many ready-to-use implementations: `Googlesearch`, `DuckDuckGoSearch`, `wikipedia`, `httprequest`, etc. See implementations at https://github.com/cloudwego/eino-ext/tree/main/components/tool and docs:
Beyond custom tools that need to be implemented yourself, the eino-ext project has many general-purpose tool implementations that can be used out of the box, such as [Tool - Googlesearch](/docs/eino/ecosystem_integration/tool/tool_googlesearch), [Tool - DuckDuckGoSearch](/docs/eino/ecosystem_integration/tool/tool_duckduckgo_search), wikipedia, httprequest, etc. See various implementations at [https://github.com/cloudwego/eino-ext/tree/main/components/tool](https://github.com/cloudwego/eino-ext/tree/main/components/tool).
0 commit comments