From 7a0a43687324efb0ac9f268e95ba2937d607e853 Mon Sep 17 00:00:00 2001 From: akaster99 Date: Wed, 18 Dec 2024 16:52:31 +0900 Subject: [PATCH] feat: deploy --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8607fbb..337cc45 100644 --- a/README.md +++ b/README.md @@ -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'; @@ -25,7 +26,6 @@ import Ainize from '@ainize-team/ainize-js'; const Ainize = require('@ainize-team/ainize-js').default; ``` - ## Usage ### Create account @@ -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/. @@ -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 @@ -91,11 +91,11 @@ 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/) | - ```typescript import { Ainize } from '@ainize-team/ainize-js'; @@ -119,7 +122,7 @@ const main = async () => { 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 + modelUrl: 'https://ainize-free-inference.ainetwork.xyz' // This URL is for tutorial. } const model = await ainize.deploy(deployConfig); console.log(model.modelName); @@ -131,6 +134,7 @@ const main = async () => { main(); ``` +