diff --git a/README.md b/README.md index 691df0cd33..ea34a8b3c1 100644 --- a/README.md +++ b/README.md @@ -79,22 +79,20 @@ React Native ExecuTorch is powering [Private Mind](https://privatemind.swmansion **Get started with AI-powered text generation in 3 easy steps!** +The steps below assume an Expo project. For bare React Native, follow the [Getting Started guide](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) in the documentation. + ### :one: Installation ```bash # Install the package yarn add react-native-executorch -# If you use expo, please add these packages for resource fetching: +# Add these packages for resource fetching: yarn add react-native-executorch-expo-resource-fetcher yarn add expo-file-system expo-asset -# If you use bare React Native project use these packages: -yarn add react-native-executorch-bare-resource-fetcher -yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader - # Depending on the platform, choose either iOS or Android -yarn < ios | android > +yarn ``` > npm and pnpm work too — use `npm install` or `pnpm add` for the packages, and `npm run ` / `pnpm ` for the run step. @@ -106,7 +104,7 @@ Add this to your component file: ```tsx import { useLLM, - LFM2_5_1_2B_INSTRUCT, + models, Message, initExecutorch, } from 'react-native-executorch'; @@ -118,7 +116,7 @@ initExecutorch({ function MyComponent() { // Initialize the model 🚀 - const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT }); + const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() }); // ... rest of your component } ``` @@ -151,7 +149,7 @@ We currently host a few example [apps](https://github.com/software-mansion/react If you would like to run a demo app, navigate to its project directory. Then install dependencies and run app with: ```bash -yarn && yarn < ios | android > +yarn && yarn ``` > [!WARNING] diff --git a/docs/docs/01-fundamentals/01-getting-started.md b/docs/docs/01-fundamentals/01-getting-started.md index 0f5abf8cae..d78042c3f5 100644 --- a/docs/docs/01-fundamentals/01-getting-started.md +++ b/docs/docs/01-fundamentals/01-getting-started.md @@ -164,21 +164,21 @@ Running the app with the library: ```bash - npm run -- -d + npm run -- -d ``` ```bash - pnpm -d + pnpm -d ``` ```bash - yarn -d + yarn -d ``` diff --git a/docs/versioned_docs/version-0.8.x/01-fundamentals/01-getting-started.md b/docs/versioned_docs/version-0.8.x/01-fundamentals/01-getting-started.md index 159c1998a7..b723bd17da 100644 --- a/docs/versioned_docs/version-0.8.x/01-fundamentals/01-getting-started.md +++ b/docs/versioned_docs/version-0.8.x/01-fundamentals/01-getting-started.md @@ -121,7 +121,7 @@ Because we are using ExecuTorch under the hood, you won't be able to build iOS a Running the app with the library: ```bash -yarn -d +yarn -d ``` ## Supporting new models in React Native ExecuTorch diff --git a/readmes/README_cn.md b/readmes/README_cn.md index e148e18aa0..ee95d54fd0 100644 --- a/readmes/README_cn.md +++ b/readmes/README_cn.md @@ -75,22 +75,20 @@ React Native ExecuTorch 为 [Private Mind](https://privatemind.swmansion.com/) **通过三个简单步骤,开始使用 AI 驱动的文本生成!** +以下步骤假设您使用 Expo 项目。对于原生 React Native,请参阅文档中的[入门指南](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started)。 + ### :one: 安装 ```bash # 安装包 yarn add react-native-executorch -# 如果您使用 expo,请添加这些包用于资源获取: +# 添加这些包用于资源获取: yarn add react-native-executorch-expo-resource-fetcher yarn add expo-file-system expo-asset -# 如果您使用原生 React Native 项目,请使用这些包: -yarn add react-native-executorch-bare-resource-fetcher -yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader - # 根据平台,选择 iOS 或 Android -yarn < ios | android > +yarn ``` > npm 和 pnpm 同样适用 — 使用 `npm install` 或 `pnpm add` 安装包,使用 `npm run ` / `pnpm ` 运行应用。 @@ -102,7 +100,7 @@ yarn < ios | android > ```tsx import { useLLM, - LFM2_5_1_2B_INSTRUCT, + models, Message, initExecutorch, } from 'react-native-executorch'; @@ -114,7 +112,7 @@ initExecutorch({ function MyComponent() { // 初始化模型 🚀 - const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT }); + const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() }); // ... 您组件的其余部分 } ``` @@ -147,7 +145,7 @@ const handleGenerate = async () => { 如果您想运行示例应用程序,请导航到其项目目录。然后安装依赖项并运行应用: ```bash -yarn && yarn < ios | android > +yarn && yarn ``` > [!WARNING] diff --git a/readmes/README_es.md b/readmes/README_es.md index 63dfd5a3b7..7e9158581a 100644 --- a/readmes/README_es.md +++ b/readmes/README_es.md @@ -75,22 +75,20 @@ React Native ExecuTorch impulsa [Private Mind](https://privatemind.swmansion.com **¡Comienza con la generación de texto impulsada por IA en 3 sencillos pasos!** +Los pasos a continuación asumen un proyecto Expo. Para React Native puro, sigue la [guía de Inicio](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) en la documentación. + ### :one: Instalación ```bash # Instalar el paquete yarn add react-native-executorch -# Si usa expo, agregue estos paquetes para la obtención de recursos: +# Agrega estos paquetes para la obtención de recursos: yarn add react-native-executorch-expo-resource-fetcher yarn add expo-file-system expo-asset -# Si usa un proyecto básico de React Native, use estos paquetes: -yarn add react-native-executorch-bare-resource-fetcher -yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader - # Dependiendo de la plataforma, elige iOS o Android -yarn < ios | android > +yarn ``` > npm y pnpm también funcionan — usa `npm install` o `pnpm add` para los paquetes, y `npm run ` / `pnpm ` para el paso de ejecución. @@ -102,7 +100,7 @@ Agrega esto a tu archivo de componente: ```tsx import { useLLM, - LFM2_5_1_2B_INSTRUCT, + models, Message, initExecutorch, } from 'react-native-executorch'; @@ -114,7 +112,7 @@ initExecutorch({ function MyComponent() { // Inicializa el modelo 🚀 - const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT }); + const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() }); // ... resto de tu componente } ``` @@ -147,7 +145,7 @@ Actualmente alojamos algunos ejemplos de [aplicaciones](https://github.com/softw Si deseas ejecutar una aplicación de demostración, navega a su directorio de proyecto. Luego instala las dependencias y ejecuta la app con: ```bash -yarn && yarn < ios | android > +yarn && yarn ``` > [!WARNING] diff --git a/readmes/README_fr.md b/readmes/README_fr.md index 9447a91dc3..ff96f58f97 100644 --- a/readmes/README_fr.md +++ b/readmes/README_fr.md @@ -75,22 +75,20 @@ React Native ExecuTorch alimente [Private Mind](https://privatemind.swmansion.co **Commencez avec la génération de texte AI en 3 étapes faciles !** +Les étapes ci-dessous supposent un projet Expo. Pour React Native brut, suivez le [guide de démarrage](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) dans la documentation. + ### :one: Installation ```bash # Installez le package yarn add react-native-executorch -# Si vous utilisez expo, veuillez ajouter ces packages pour la récupération de ressources : +# Ajoutez ces packages pour la récupération de ressources : yarn add react-native-executorch-expo-resource-fetcher yarn add expo-file-system expo-asset -# Si vous utilisez un projet React Native brut, utilisez ces packages : -yarn add react-native-executorch-bare-resource-fetcher -yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader - # Selon la plateforme, choisissez soit iOS soit Android -yarn < ios | android > +yarn ``` > npm et pnpm fonctionnent aussi — utilisez `npm install` ou `pnpm add` pour les packages, et `npm run ` / `pnpm ` pour l'étape d'exécution. @@ -102,7 +100,7 @@ Ajoutez ceci à votre fichier de composant : ```tsx import { useLLM, - LFM2_5_1_2B_INSTRUCT, + models, Message, initExecutorch, } from 'react-native-executorch'; @@ -114,7 +112,7 @@ initExecutorch({ function MyComponent() { // Initialisez le modèle 🚀 - const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT }); + const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() }); // ... reste de votre composant } ``` @@ -147,7 +145,7 @@ Nous hébergeons actuellement quelques applications [exemples](https://github.co Si vous souhaitez exécuter une application de démonstration, accédez à son répertoire de projet. Puis installez les dépendances et lancez l'application avec : ```bash -yarn && yarn < ios | android > +yarn && yarn ``` > [!WARNING] diff --git a/readmes/README_in.md b/readmes/README_in.md index 0bf15c1d96..22070cc502 100644 --- a/readmes/README_in.md +++ b/readmes/README_in.md @@ -75,22 +75,20 @@ React Native ExecuTorch को [Private Mind](https://privatemind.swmansion.com/ **AI-समर्थित पाठ पीढ़ी के साथ आरंभ करें, केवल 3 आसान कदमों में!** +नीचे दिए गए चरण एक Expo प्रोजेक्ट मानते हैं। bare React Native के लिए, कृपया दस्तावेज़ में [Getting Started गाइड](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) का पालन करें। + ### :one: स्थापना ```bash # पैकेज को इंस्टॉल करें yarn add react-native-executorch -# यदि आप expo का उपयोग करते हैं, तो कृपया संसाधन प्राप्त करने के लिए ये पैकेज जोड़ें: +# संसाधन प्राप्त करने के लिए ये पैकेज जोड़ें: yarn add react-native-executorch-expo-resource-fetcher yarn add expo-file-system expo-asset -# यदि आप bare React Native प्रोजेक्ट का उपयोग करते हैं तो इन पैकेजों का उपयोग करें: -yarn add react-native-executorch-bare-resource-fetcher -yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader - # प्लेटफॉर्म के अनुसार, या तो iOS या Android चुनें -yarn < ios | android > +yarn ``` > npm और pnpm भी काम करते हैं — पैकेजों के लिए `npm install` या `pnpm add` का उपयोग करें, और रन स्टेप के लिए `npm run ` / `pnpm ` का उपयोग करें। @@ -102,7 +100,7 @@ yarn < ios | android > ```tsx import { useLLM, - LFM2_5_1_2B_INSTRUCT, + models, Message, initExecutorch, } from 'react-native-executorch'; @@ -114,7 +112,7 @@ initExecutorch({ function MyComponent() { // मॉडल को प्रारंभ करें 🚀 - const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT }); + const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() }); // ... आपके घटक के शेष } ``` @@ -147,7 +145,7 @@ const handleGenerate = async () => { यदि आप डेमो ऐप चलाना चाहते हैं, तो इसके प्रोजेक्ट डायरेक्टरी में नेविगेट करें। फिर निर्भरता इंस्टॉल करें और ऐप चलाएं: ```bash -yarn && yarn < ios | android > +yarn && yarn ``` > [!WARNING] diff --git a/readmes/README_pt.md b/readmes/README_pt.md index e8eda02f8e..5ee75b925b 100644 --- a/readmes/README_pt.md +++ b/readmes/README_pt.md @@ -75,22 +75,20 @@ React Native ExecuTorch está impulsionando o [Private Mind](https://privatemind **Comece com geração de texto com IA em 3 passos simples!** +Os passos abaixo assumem um projeto Expo. Para React Native puro, siga o [guia de Introdução](https://docs.swmansion.com/react-native-executorch/docs/fundamentals/getting-started) na documentação. + ### :one: Instalação ```bash # Instale o pacote yarn add react-native-executorch -# Se você usa expo, adicione estes pacotes para busca de recursos: +# Adicione estes pacotes para busca de recursos: yarn add react-native-executorch-expo-resource-fetcher yarn add expo-file-system expo-asset -# Se você usa projeto React Native básico, use estes pacotes: -yarn add react-native-executorch-bare-resource-fetcher -yarn add @dr.pogodin/react-native-fs @kesha-antonov/react-native-background-downloader - # Dependendo da plataforma, escolha iOS ou Android -yarn < ios | android > +yarn ``` > npm e pnpm também funcionam — use `npm install` ou `pnpm add` para os pacotes, e `npm run ` / `pnpm ` para o passo de execução. @@ -102,7 +100,7 @@ Adicione isso ao seu arquivo de componente: ```tsx import { useLLM, - LFM2_5_1_2B_INSTRUCT, + models, Message, initExecutorch, } from 'react-native-executorch'; @@ -114,7 +112,7 @@ initExecutorch({ function MyComponent() { // Inicialize o modelo 🚀 - const llm = useLLM({ model: LFM2_5_1_2B_INSTRUCT }); + const llm = useLLM({ model: models.llm.lfm2_5_1_2b_instruct() }); // ... restante do seu componente } ``` @@ -147,7 +145,7 @@ Atualmente, hospedamos alguns [apps](https://github.com/software-mansion/react-n Se deseja executar um aplicativo de demonstração, navegue até seu diretório de projeto. Em seguida, instale as dependências e execute o aplicativo com: ```bash -yarn && yarn < ios | android > +yarn && yarn ``` > [!WARNING]