Skip to content

macielrsf/react-native-gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Native GPT

📚 Índice · Table of Contents

🇧🇷 Português

💬 Um app de chat em React Native com integração com ChatGPT usando SSE (Server-Sent Events), proporcionando respostas em tempo real.

🚀 Funcionalidades

  • Interface simples de chat
  • Streaming de resposta com SSE (Server Sent Events)
  • Integração com a OpenAI API
  • Pronto para personalizações e testes

📱 Preview

react.native.3.webm

📦 Tecnologias

🔧 Instalação

Para rodar este projeto, siga os seguintes passos:

1. Clone o repositório:

git clone https://github.com/macielrsf/react-native-gpt
cd react-native-gpt

2. Instale as dependências:

yarn install

3. Configure sua chave da OpenAI API:

Crie um arquivo .env na raiz do projeto.

No arquivo .env, adicione sua chave da OpenAI API com o seguinte formato:

OPENAI_API_KEY=your-api-key-here

Você pode obter sua chave da API da OpenAI em https://platform.openai.com/signup.

4. Inicie o projeto:

Agora, você pode rodar o projeto com:

yarn start

Isso abrirá o Expo Dev Tools no navegador. A partir dele, você pode:

Escanear o QR Code com o aplicativo Expo Go no seu celular (disponível na App Store e Google Play).

Executar no simulador:

Pressione i para abrir no simulador iOS (apenas no macOS com Xcode instalado)

Pressione a para abrir no emulador Android (requer Android Studio configurado)

Dica: também é possível rodar yarn android ou yarn ios diretamente, se preferir abrir o app emulador via terminal.

📜 Licença

Este projeto está sob a licença MIT. Veja o arquivo LICENSE para mais detalhes.


🇺🇸 English

💬 A React Native chat app with ChatGPT integration using SSE (Server-Sent Events), providing real-time responses.

🚀 Features

  • Simple chat interface
  • Response streaming with SSE (Server Sent Events)
  • Integration with OpenAI API
  • Ready for customizations and testing

📱 Preview

react.native.3.webm

📦 Technologies

🔧 Installation

To run this project, follow these steps:

1. Clone the repository:

git clone https://github.com/macielrsf/react-native-gpt
cd react-native-gpt

2. Install the dependencies:

yarn install

3. Set up your OpenAI API key:

Create a .env file in the root of the project.

In the .env file, add your OpenAI API key with the following format:

OPENAI_API_KEY=your-api-key-here

You can get your OpenAI API key at https://platform.openai.com/signup.

4. Start the project:

Now, you can run the project with:

yarn start

This will open Expo Dev Tools in the browser. From there, you can:

Scan the QR Code with the Expo Go app on your phone (available on the App Store and Google Play).

Run in the simulator:

Press i to open in the iOS simulator (only on macOS with Xcode installed)

Press a to open in the Android emulator (requires Android Studio configured)

Tip: You can also run yarn android or yarn ios directly, if you prefer to open the emulator app via terminal.

📜 License

This project is under the MIT license. See the LICENSE file for more details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published