Skip to content

Commit

Permalink
Merge pull request #157 from ainize-team/feat/woojae/readme
Browse files Browse the repository at this point in the history
refactor: readme deploy
  • Loading branch information
akaster99 authored Dec 18, 2024
2 parents 147ffe2 + 45e2a21 commit e2b0259
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ yarn add @ainize-team/ainize-js
```

Then import the libraries in your code:

```typescript
// ES6
import Ainize from '@ainize-team/ainize-js';
Expand All @@ -25,7 +26,6 @@ import Ainize from '@ainize-team/ainize-js';
const Ainize = require('@ainize-team/ainize-js').default;
```


## Usage

### Create account
Expand All @@ -45,6 +45,7 @@ console.log(wallet);
```

### Login

```typescript
import Ainize from '@ainize-team/ainize-js';
const ainize = new Ainize(1);// 0 for testnet, 1 for mainnet. You can earn testnet AIN at https://faucet.ainetwork.ai/.
Expand All @@ -59,7 +60,6 @@ const ainize = new Ainize(1);
ainize.loginWithSigner();
```


This feature is supported from AIN Wallet version 2.0.5 or later.

### Using model
Expand Down Expand Up @@ -91,23 +91,26 @@ main();
```

### Currently supported models

| Model | MODEL_NAME | Insight Link |
| -------- | ------- | ------- |
| LLaMA 3.1 8B | meta-llama/Llama-3.1-8B-instruct | [Link](https://insight.ainetwork.ai/database/values/apps/meta_llama_llama_3_1_8b_instruct/) |

<!--
### Deploy

You can deploy your AI model to ainize. Anyone can use your AI model with AIN token.
You can deploy your AI model to ainize. Anyone can use your AI model with AIN token. **You need AIN tokens for deploying models.**

CONFIGURATION(JSON)

- modelName: The name you want to deploying model.
- modelUrl: Inference URL wrapped with ainize-wrapper-server.
<!--
- billingConfig: Billing configuration required for model usage.
- depositAddress: The address for receiving AIN deposits.
- costPerToken: Cost per token for model usage.
- minCost: Minimum cost.
- maxCost: Maximum cost. (optional)
-->

```typescript
import { Ainize } from '@ainize-team/ainize-js';
Expand All @@ -118,19 +121,20 @@ const main = async () => {
const ainize = new Ainize(1);
await ainize.login(ainPrivateKey);
const deployConfig = {
modelName: 'YOUR_MODEL_NAME',// e.g. meta-llama/Llama-3.1-8B-instruct
modelUrl: 'YOUR_MODEL_INFERENCE_URL' // e.g. https://ainize-free-inference.ainetwork.xyz
modelName: 'YOUR_MODEL_NAME', // e.g. meta-llama/Llama-3.1-8B-instruct
modelUrl: 'https://ainize-free-inference.ainetwork.xyz' // This URL is for tutorial.
}
const model = await ainize.deploy(deployConfig);
console.log(model.modelName);
ainize.logout();
}catch(e) {
} catch(e) {
console.log(e);
}
}
main();
```

<!--
You can stop or run your model container. Only model deployer can use this.
```typescript
Expand Down

0 comments on commit e2b0259

Please sign in to comment.