Welcome to "Who the F... is Alice?", a repository dedicated to getting your first touch with Langchain. This project consists of two main parts:
- Data Seed: This part involves loading a text file. In this example, we're using the book "Alice in Wonderland". 📖
- Chat.js: This is where you can ask your model questions about the ingested data. 🗣️
To run this application, you'll need to have an OpenAI API key. If you don't have one, you can get it from the OpenAI website.
First, clone this repository:
git clone https://github.com/yourusername/who-the-f-is-alice.git
Then, navigate into the project directory and install the dependencies:
cd who-the-f-is-alice
npm install
To seed the data, run the following command:
node seed-db.js
To start the chat, run:
node chat.js
Enjoy exploring Wonderland with Alice! 🎉
This project is not limited to "Alice in Wonderland". You can ingest any text data you want! For example, you could export some pages from Notion, convert them to text, and ingest them into the model. Then, you can ask your model questions about the content you've ingested.
Here's how you can do it:
- Export your desired pages from Notion as Markdown or HTML.
- Convert the exported files to plain text. You can use an online converter or write a script to do this.
- Replace the "Alice in Wonderland" text file with your new text file in the data seed script.
- Run the data seed script to ingest your new data into the model.
- Start the chat and ask your model questions about your Notion pages!
Remember, the sky's the limit with what you can do. Be creative and explore different possibilities! 🚀