You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: motoko/llm_chatbot/README.md
+14-10Lines changed: 14 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -3,23 +3,15 @@
3
3
The LLM Chatbot example demonstrates how an ICP smart contract can be used to interact with a large language model (LLM) to generate text. The user can input a prompt, and the smart contract will use the LLM to generate a response.
4
4
The response is then returned to the user, and the user can submit some follow-up prompts to continue the conversation.
5
5
6
-
This application's logic is written in [Motoko](https://internetcomputer.org/docs/motoko/main/getting-started/motoko-introduction), a programming language designed specifically for developing canisters on ICP.
7
-
8
6
## Deploying from ICP Ninja
9
7
10
8
When viewing this project in ICP Ninja, you can deploy it directly to the mainnet for free by clicking "Deploy" in the upper right corner. Open this project in ICP Ninja:
The `/backend` folder contains the Motoko canister, `app.mo`. The `/frontend` folder contains web assets for the application's user interface. The user interface is written using the React framework. Edit the `mops.toml` file to add [Motoko dependencies](https://mops.one/) to the project.
17
-
18
12
## Build and deploy from the command-line
19
13
20
-
To migrate your ICP Ninja project off of the web browser and develop it locally, follow these steps. These steps are necessary if you want to deploy this project for long-term, production use on the mainnet.
21
-
22
-
### 1. Download your project from ICP Ninja using the 'Download files' button on the upper left corner under the pink ninja star icon.
14
+
### 1. [Download and install the IC SDK.](https://internetcomputer.org/docs/building-apps/getting-started/install)
23
15
24
16
### 2. Setting up Ollama
25
17
@@ -39,4 +31,16 @@ ollama run llama3.1:8b
39
31
40
32
The above command will download an 8B parameter model, which is around 4GiB. Once the command executes and the model is loaded, you can terminate it. You won't need to do this step again.
41
33
42
-
### 3. Open the `BUILD.md` file for further instructions.
34
+
### 3. Download your project from ICP Ninja using the 'Download files' button on the upper left corner, or [clone the GitHub examples repository.](https://github.com/dfinity/examples/)
35
+
36
+
### 4. Navigate into the project's directory.
37
+
38
+
### 5. Deploy the project to your local environment:
39
+
40
+
```
41
+
dfx start --background --clean && dfx deploy
42
+
```
43
+
44
+
## Security considerations and best practices
45
+
46
+
If you base your application on this example, it is recommended that you familiarize yourself with and adhere to the [security best practices](https://internetcomputer.org/docs/building-apps/security/overview) for developing on ICP. This example may not implement all the best practices.
0 commit comments