Jeff Tang před 1 rokem
rodič
revize
54ff88e9a6
3 změnil soubory, kde provedl 19 přidání a 13 odebrání
  1. 2 1
      README.md
  2. 5 1
      demo_apps/README.md
  3. 12 11
      demo_apps/whatsapp_llama2.md

+ 2 - 1
README.md

@@ -1,6 +1,6 @@
 # Llama 2 Fine-tuning / Inference Recipes, Examples and Demo Apps
 
-**[Update Nov. 3, 2023] We recently released a series of Llama 2 demo apps [here](./demo_apps). These apps show how to run Llama 2 locally, in the cloud, and on-prem, and how to ask Llama 2 questions in general and about custom data (PDF, DB, or live).**
+**[Update Nov. 7, 2023] We recently released a series of Llama 2 demo apps [here](./demo_apps). These apps show how to run Llama 2 locally, in the cloud, on-prem or with WhatsApp, and how to ask Llama 2 questions in general and about custom data (PDF, DB, or live).**
 
 The 'llama-recipes' repository is a companion to the [Llama 2 model](https://github.com/facebookresearch/llama). The goal of this repository is to provide examples to quickly get started with fine-tuning for domain adaptation and how to run inference for the fine-tuned models. For ease of use, the examples use Hugging Face converted versions of the models. See steps for conversion of the model [here](#model-conversion-to-hugging-face).
 
@@ -189,6 +189,7 @@ This folder contains a series of Llama2-powered apps:
 1. Ask Llama to summarize a video content
 2. Ask Llama questions about structured data in a DB
 3. Ask Llama questions about live data on the web
+4. Build a Llama-enabled WhatsApp chatbot
 
 # Repository Organization
 This repository is organized in the following way:

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 5 - 1
demo_apps/README.md


+ 12 - 11
demo_apps/whatsapp_llama2.md

@@ -1,6 +1,6 @@
-# Building Llama-enabled WhatsApp Chatbot
+# Building a Llama-enabled WhatsApp Chatbot
 
-This note summarizes how to build a Llama-enabled WhatsApp chatbot demo app. A demo video of using the iOS WhatsApp to send a question to a test phone number and receive the Llama 2 generated answer is [here](https://drive.google.com/file/d/1fZDaOsvyE1yrNGETV-e0SvL14BYeAI6R/view).
+This step-by-step tutorial shows the complete process of building a Llama-enabled WhatsApp chatbot. A demo video of using the iOS WhatsApp to send a question to a test phone number and receive the Llama 2 generated answer is [here](https://drive.google.com/file/d/1fZDaOsvyE1yrNGETV-e0SvL14BYeAI6R/view).
 
 ## Overview
 
@@ -118,15 +118,16 @@ console.log(req.body["entry"][0]["changes"][0]["value"]["messages"][0]["text"]["
 add the code below - remember to change <your web server IP>:
 
 ```
-  let url = "http://<your web server IP>:5000/msgrcvd?message=" + req.body["entry"][0]["changes"][0]["value"]["messages"][0]["text"]["body"]
-  
-	axios.get(url)
-  .then(response => {
-    console.log(response.data);
-  })
-  .catch(error => {
-    console.error('Axios error:', error);
-  });
+  let url = "http://<your web server IP>:5000/msgrcvd?message=" + 
+    req.body["entry"][0]["changes"][0]["value"]["messages"][0]["text"]["body"]
+
+  axios.get(url)
+    .then(response => {
+      console.log(response.data);
+    })
+    .catch(error => {
+      console.error('Axios error:', error);
+    });
 ```
 
 The code simply forwards the user message received by the WhatsApp Cloud Platform to the Llama 2 enabled web app described in the previous section.