Skip to content

Commit

Permalink
fix: fix README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Oct 18, 2024
1 parent 3df28d9 commit 6e0edad
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
6 changes: 3 additions & 3 deletions examples/ai_canister/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ dfx canister call ai_canister admin_set_managers "(vec {principal \"$MYID\"; pri
dfx canister call ai_canister set_max_file_size "(10737418240)" # 10GB
dfx canister call ai_canister admin_set_visibility "(1)" # public

ic-oss-cli -i debug/uploader.pem upload -b aovwi-4maaa-aaaaa-qaagq-cai --file Qwen1.5-0.5B-Chat/config.json
ic-oss-cli -i debug/uploader.pem put -b aovwi-4maaa-aaaaa-qaagq-cai --path Qwen1.5-0.5B-Chat/config.json
# ... file id: 1 ...
ic-oss-cli -i debug/uploader.pem upload -b aovwi-4maaa-aaaaa-qaagq-cai --file Qwen1.5-0.5B-Chat/tokenizer.json
ic-oss-cli -i debug/uploader.pem put -b aovwi-4maaa-aaaaa-qaagq-cai --path Qwen1.5-0.5B-Chat/tokenizer.json
# ... file id: 2 ...
ic-oss-cli -i debug/uploader.pem upload -b aovwi-4maaa-aaaaa-qaagq-cai --file Qwen1.5-0.5B-Chat/model.safetensors
ic-oss-cli -i debug/uploader.pem put -b aovwi-4maaa-aaaaa-qaagq-cai --path Qwen1.5-0.5B-Chat/model.safetensors
# ... file id: 3 ...

dfx canister call ai_canister admin_load_model '(record {config_id=1;tokenizer_id=2;model_id=3})'
Expand Down
6 changes: 3 additions & 3 deletions examples/upload_js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ dfx canister call ai_canister admin_set_managers "(vec {principal \"$MYID\"; pri
dfx canister call ai_canister set_max_file_size "(10737418240)" # 10GB
dfx canister call ai_canister admin_set_visibility "(1)" # public

ic-oss-cli -i debug/uploader.pem upload -b aovwi-4maaa-aaaaa-qaagq-cai --file Qwen1.5-0.5B-Chat/config.json
ic-oss-cli -i debug/uploader.pem put -b aovwi-4maaa-aaaaa-qaagq-cai --path Qwen1.5-0.5B-Chat/config.json
# ... file id: 1 ...
ic-oss-cli -i debug/uploader.pem upload -b aovwi-4maaa-aaaaa-qaagq-cai --file Qwen1.5-0.5B-Chat/tokenizer.json
ic-oss-cli -i debug/uploader.pem put -b aovwi-4maaa-aaaaa-qaagq-cai --path Qwen1.5-0.5B-Chat/tokenizer.json
# ... file id: 2 ...
ic-oss-cli -i debug/uploader.pem upload -b aovwi-4maaa-aaaaa-qaagq-cai --file Qwen1.5-0.5B-Chat/model.safetensors
ic-oss-cli -i debug/uploader.pem put -b aovwi-4maaa-aaaaa-qaagq-cai --path Qwen1.5-0.5B-Chat/model.safetensors
# ... file id: 3 ...

dfx canister call ai_canister admin_load_model '(record {config_id=1;tokenizer_id=2;model_id=3})'
Expand Down
13 changes: 12 additions & 1 deletion src/ic_oss_bucket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Get the file `0` in browser:
## Candid API

```shell
admin_add_auditors : (vec principal) -> (Result);
admin_add_managers : (vec principal) -> (Result);
admin_remove_auditors : (vec principal) -> (Result);
admin_remove_managers : (vec principal) -> (Result);
admin_set_auditors : (vec principal) -> (Result);
admin_set_managers : (vec principal) -> (Result);
admin_update_bucket : (UpdateBucketInput) -> (Result);
Expand All @@ -46,6 +50,13 @@ move_folder : (MoveInput, opt blob) -> (Result_12);
update_file_chunk : (UpdateFileChunkInput, opt blob) -> (Result_13);
update_file_info : (UpdateFileInput, opt blob) -> (Result_12);
update_folder_info : (UpdateFolderInput, opt blob) -> (Result_12);
validate2_admin_set_auditors : (vec principal) -> (Result_14);
validate2_admin_set_managers : (vec principal) -> (Result_14);
validate2_admin_update_bucket : (UpdateBucketInput) -> (Result_14);
validate_admin_add_auditors : (vec principal) -> (Result_14);
validate_admin_add_managers : (vec principal) -> (Result_14);
validate_admin_remove_auditors : (vec principal) -> (Result_14);
validate_admin_remove_managers : (vec principal) -> (Result_14);
validate_admin_set_auditors : (vec principal) -> (Result);
validate_admin_set_managers : (vec principal) -> (Result);
validate_admin_update_bucket : (UpdateBucketInput) -> (Result);
Expand Down Expand Up @@ -103,7 +114,7 @@ dfx canister call ic_oss_bucket list_files '(2, null, null, opt blob "\84\44\a1\
dfx canister call ic_oss_bucket list_folders '(0, null, null, null)'

# upload a file to the bucket
ic-oss-cli -i debug/uploader.pem upload -b mmrxu-fqaaa-aaaap-ahhna-cai --file README.md
ic-oss-cli -i debug/uploader.pem put -b mmrxu-fqaaa-aaaap-ahhna-cai --path README.md

# read the file info
dfx canister call ic_oss_bucket get_file_info '(1, null)'
Expand Down
4 changes: 2 additions & 2 deletions src/ic_oss_cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ target/release/ic-oss-cli --help

Upload a file to the local canister:
```sh
ic-oss-cli -i myid.pem upload -b mmrxu-fqaaa-aaaap-ahhna-cai --file test.tar.gz
ic-oss-cli -i myid.pem put -b mmrxu-fqaaa-aaaap-ahhna-cai --path test.tar.gz
```

Upload a file to the mainnet canister:
```sh
ic-oss-cli -i myid.pem upload -b mmrxu-fqaaa-aaaap-ahhna-cai --file test.tar.gz --ic
ic-oss-cli -i myid.pem put -b mmrxu-fqaaa-aaaap-ahhna-cai --path test.tar.gz --ic
```

Add a wasm file to the cluster:
Expand Down
4 changes: 4 additions & 0 deletions src/ic_oss_cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@

```shell
access_token : (principal) -> (Result);
admin_add_managers : (vec principal) -> (Result_1);
admin_add_wasm : (AddWasmInput, opt blob) -> (Result_1);
admin_attach_policies : (Token) -> (Result_1);
admin_batch_call_buckets : (vec principal, text, opt blob) -> (Result_2);
admin_deploy_bucket : (DeployWasmInput, opt blob) -> (Result_1);
admin_detach_policies : (Token) -> (Result_1);
admin_ed25519_access_token : (Token) -> (Result);
admin_remove_managers : (vec principal) -> (Result_1);
admin_set_managers : (vec principal) -> (Result_1);
admin_sign_access_token : (Token) -> (Result);
admin_topup_all_buckets : () -> (Result_3);
Expand All @@ -43,11 +45,13 @@ validate2_admin_batch_call_buckets : (vec principal, text, opt blob) -> (
validate2_admin_deploy_bucket : (DeployWasmInput, opt blob) -> (Result_9);
validate2_admin_set_managers : (vec principal) -> (Result_9);
validate2_admin_upgrade_all_buckets : (opt blob) -> (Result_9);
validate_admin_add_managers : (vec principal) -> (Result_9);
validate_admin_add_wasm : (AddWasmInput, opt blob) -> (Result_1);
validate_admin_batch_call_buckets : (vec principal, text, opt blob) -> (
Result_2,
);
validate_admin_deploy_bucket : (DeployWasmInput, opt blob) -> (Result_1);
validate_admin_remove_managers : (vec principal) -> (Result_9);
validate_admin_set_managers : (vec principal) -> (Result_1);
validate_admin_upgrade_all_buckets : (opt blob) -> (Result_1);
```
Expand Down

0 comments on commit 6e0edad

Please sign in to comment.