Update README.md
Browse files
README.md
CHANGED
|
@@ -142,23 +142,93 @@ python -m src.generate_benchmark --output ./data/benchmark_dataset.json
|
|
| 142 |
|
| 143 |
Note: `data/prepared_dataset.json` is a **generated artifact** (optional) and is intentionally **not committed**.
|
| 144 |
|
| 145 |
-
## Tool
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
```
|
| 155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
```
|
| 157 |
|
| 158 |
-
|
|
|
|
|
|
|
|
|
|
| 159 |
```
|
| 160 |
-
|
| 161 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 162 |
```
|
| 163 |
|
| 164 |
|
|
|
|
| 142 |
|
| 143 |
Note: `data/prepared_dataset.json` is a **generated artifact** (optional) and is intentionally **not committed**.
|
| 144 |
|
| 145 |
+
## Tool Definitions & Schemas
|
| 146 |
+
|
| 147 |
+
To ensure interoperability, DMind-3-nano uses strict JSON schemas for tool definitions. Below are the standard definitions used during training and inference.
|
| 148 |
+
|
| 149 |
+
**1. SEARCH_TOKEN**
|
| 150 |
+
Used to find token metadata or address on a specific chain.
|
| 151 |
+
|
| 152 |
+
```json
|
| 153 |
+
{
|
| 154 |
+
"name": "SEARCH_TOKEN",
|
| 155 |
+
"description": "Search for a cryptocurrency token on-chain to retrieve its metadata or address.",
|
| 156 |
+
"parameters": {
|
| 157 |
+
"type": "object",
|
| 158 |
+
"properties": {
|
| 159 |
+
"symbol": {
|
| 160 |
+
"type": "string",
|
| 161 |
+
"description": "The ticker symbol of the token (e.g., 'SOL', 'USDC')."
|
| 162 |
+
},
|
| 163 |
+
"address": {
|
| 164 |
+
"type": "string",
|
| 165 |
+
"description": "The specific contract address (CA) of the token, if known."
|
| 166 |
+
},
|
| 167 |
+
"chain": {
|
| 168 |
+
"type": "string",
|
| 169 |
+
"enum": ["solana", "ethereum", "bsc", "base"],
|
| 170 |
+
"description": "The target blockchain network."
|
| 171 |
+
},
|
| 172 |
+
"keyword": {
|
| 173 |
+
"type": "string",
|
| 174 |
+
"description": "General search keywords (e.g., project name) if symbol/address are unclear."
|
| 175 |
+
}
|
| 176 |
+
},
|
| 177 |
+
"required": []
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
```
|
| 181 |
+
|
| 182 |
+
**2. EXECUTE_SWAP**
|
| 183 |
+
Used to construct a swap transaction intent between two assets.
|
| 184 |
+
```json
|
| 185 |
+
{
|
| 186 |
+
"name": "EXECUTE_SWAP",
|
| 187 |
+
"description": "Propose a token swap transaction.",
|
| 188 |
+
"parameters": {
|
| 189 |
+
"type": "object",
|
| 190 |
+
"properties": {
|
| 191 |
+
"inputTokenSymbol": {
|
| 192 |
+
"type": "string",
|
| 193 |
+
"description": "Symbol of the token being sold (e.g., 'SOL')."
|
| 194 |
+
},
|
| 195 |
+
"inputTokenCA": {
|
| 196 |
+
"type": "string",
|
| 197 |
+
"description": "Contract address of the token being sold."
|
| 198 |
+
},
|
| 199 |
+
"outputTokenCA": {
|
| 200 |
+
"type": "string",
|
| 201 |
+
"description": "Contract address of the token being bought."
|
| 202 |
+
},
|
| 203 |
+
"inputTokenAmount": {
|
| 204 |
+
"type": "number",
|
| 205 |
+
"description": "Absolute amount of input token to swap."
|
| 206 |
+
},
|
| 207 |
+
"inputTokenPercentage": {
|
| 208 |
+
"type": "number",
|
| 209 |
+
"description": "Percentage of balance to swap (0.0 to 1.0), used if exact amount is not specified."
|
| 210 |
+
},
|
| 211 |
+
"outputTokenAmount": {
|
| 212 |
+
"type": "number",
|
| 213 |
+
"description": "Minimum amount of output token expected (optional/slippage related)."
|
| 214 |
+
}
|
| 215 |
+
},
|
| 216 |
+
"required": ["inputTokenSymbol"]
|
| 217 |
+
}
|
| 218 |
+
}
|
| 219 |
```
|
| 220 |
|
| 221 |
+
**Output Format**
|
| 222 |
+
The model outputs the function call wrapped in special tokens (standard FunctionGemma format):
|
| 223 |
+
```plaintext
|
| 224 |
+
<start_function_call>call:FUNCTION_NAME{key1:val1, key2:val2}<end_function_call>
|
| 225 |
```
|
| 226 |
+
|
| 227 |
+
**Example:**
|
| 228 |
+
|
| 229 |
+
User: "查一下 Solana 上的 SOL" Model:
|
| 230 |
+
```plaintext
|
| 231 |
+
<start_function_call>call:SEARCH_TOKEN{symbol:"SOL", chain:"solana"}<end_function_call>
|
| 232 |
```
|
| 233 |
|
| 234 |
|