Skip to content

Commit 672ffb7

Browse files
committed
small fixes on cli args
1 parent e918be5 commit 672ffb7

File tree

2 files changed

+44
-6
lines changed

2 files changed

+44
-6
lines changed

README.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,44 @@ We launch our node using the `serve` command, followed by models of our choice a
107107
If we provide no oracle types, it will default to the ones that we are registered to.
108108

109109
```sh
110-
dria-oracle serve -m=gpt-4o-mini -m=llama3.1:latest
110+
# run as generator
111+
dria-oracle serve -m=gpt-4o-mini -m=llama3.1:latest generator
112+
113+
# run as validator
114+
dria-oracle serve -m=gpt-4o validator
115+
116+
# run as kinds that you are registered to
117+
dria-oracle serve -m=gpt-4o
118+
```
119+
120+
We can start handling tasks from previous blocks until now, and then continue listening for more events:
121+
122+
```sh
123+
# start from 100th block until now, and subscribe to new events
124+
dria-oracle serve -m=gpt-4o --from=100
125+
```
126+
127+
> [!TIP]
128+
>
129+
> You can terminate the application from the terminal as usual (e.g. CTRL+C) to quit the node.
130+
131+
Or, we can handle tasks between specific blocks only, the application will exit upon finishing blocks unlike before:
132+
133+
```sh
134+
# handle tasks between blocks 100 and 500
135+
dria-oracle serve -m=gpt-4o --from=100 --to=500
111136
```
112137

113-
You can terminate the application from the terminal as usual (e.g. CTRL+C) to quit the node.
138+
Finally, we can handle an existing task specifically as well (if its unhandled for some reason):
139+
140+
```sh
141+
# note that if task id is given, `from` and `to` will be ignored
142+
dria-oracle serve -m=gpt-4o --task-id <task>
143+
```
144+
145+
> [!WARNING]
146+
>
147+
> Validators must use `gpt-4o` model.
114148
115149
#### Using Arweave
116150

@@ -123,7 +157,7 @@ Following the same logic, the Oracle node can read task inputs from Arweave as w
123157
You can `view` the details of a task by its task id:
124158

125159
```sh
126-
dria-oracle view <task-id>
160+
dria-oracle view --task-id <task>
127161
```
128162

129163
You can also view the task status updates between blocks with the same command, by providing `from` and `to` blocks,

core/src/cli/commands/mod.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub enum Commands {
3232
Claim,
3333
/// Serve the oracle node.
3434
Serve {
35-
#[arg(short, long = "kind", help = "The oracle kinds to handle tasks as, if omitted will default to all registered kinds.", value_parser = parse_oracle_kind)]
35+
#[arg(help = "The oracle kinds to handle tasks as, if omitted will default to all registered kinds.", value_parser = parse_oracle_kind)]
3636
kinds: Vec<OracleKind>,
3737
#[arg(short, long = "model", help = "The models to serve.", required = true, value_parser = parse_model)]
3838
models: Vec<Model>,
@@ -48,7 +48,11 @@ pub enum Commands {
4848
value_parser = parse_block_number_or_tag
4949
)]
5050
to: Option<BlockNumberOrTag>,
51-
#[arg(help = "Optional task id to serve specifically.", required = false)]
51+
#[arg(
52+
long,
53+
help = "Optional task id to serve specifically.",
54+
required = false
55+
)]
5256
task_id: Option<U256>,
5357
},
5458
/// View tasks. fsdkhfk fsdkjfdks
@@ -57,7 +61,7 @@ pub enum Commands {
5761
from: Option<BlockNumberOrTag>,
5862
#[arg(long, help = "Ending block number, defaults to 'latest'.", value_parser = parse_block_number_or_tag)]
5963
to: Option<BlockNumberOrTag>,
60-
#[arg(help = "Task id to view.")]
64+
#[arg(long, help = "Task id to view.")]
6165
task_id: Option<U256>,
6266
},
6367
/// Request a task.

0 commit comments

Comments
 (0)