An Oraichain Javascript CLI used to interact with the Oraichain network
npm install oraicliNode version should be >= 12.0.0
``bash`
yarn
Assume that the oraiwasm (smart contract repo) dir has the same parent dir as this one.
`bash`
./deploy_ai_services.sh nl008 nl008_testcase nl008_oscript '' '' '' 1 ../oraiwasm/smart-contracts/package/nlp
command for running an AI request:
`bash
yarn oraicli airequest set-aireq
Eg:
yarn oraicli airequest set-aireq nl008_oscript 5 --input '{"paragraph":"my name is duc"}' --expected-output "english"
`
`bash`
curl http://
This is a aggregated way to deploy data sources, test cases and oracle scripts with one command. Type:
`bash
./deploy_ai_services.sh
Eg:
./deploy_ai_services.sh classification,cv009 classification_testcase classification_oscript '' '' '' 7 ../oraiwasm/smart-contracts/package/cv
`
If the scripts have been deployed and you run the above command again, it will deploy new smart contracts, and check if the data sources, test cases, and oracle scripts exist or not. If not => create new, if yes then edit accordingly.
Afterwards, you can move on to the interaction section
Deploy data source / test case
`bash
./deploy_ds_tc.sh
Eg:
./deploy_ds_tc.sh datasource classification '' 17 ../oraiwasm/smart-contracts/package/cv
./deploy_ds_tc.sh testcase classification_testcase '' 17 ../oraiwasm/smart-contracts/package/cv
`
Normally, the initial inputs for data source and test case are uneccessary => can leave them empty.
`bash
./deploy_oscript.sh
./deploy_oscript.sh classification,cv009 classification_testcase classification_oscript '' 17 ../oraiwasm/smart-contracts/package/cv
`
Initial input for the oracle script shoud contain information about the data sources and test cases, but the deploy_oscript.sh has taken care of it already, so it should be left empty
#### 1. CLI
Interact directly with data source, test case and data source smart contracts through:
`bash
yarn oraicli wasm query
Eg:
Note that the image url when passed needs to be encoded beforehand
#### 2. GUI