- Node.js needs to be installed on your machine.
- Ollama needs to be installed in advance.
- Also, download one or more models with
ollama pull <model_name>. - This source code uses the
llavamultimodal model.
- In Terminal,
cdinto this folder. - Run
npm install --forceto install the dependencies. - Run
npm run devto run the local server and the sketch. - Go to the URL displayed in the Terminal. ie.
http://localhost:5173.
If you want to use OpenAI ChatGPT, you need to create a file .env.local and provide your own API key as VITE_OPENAI_API_KEY=your-secret-key. Make sure you don't share this key online, such as when you push the project online. Also, if you build and publish the project as is, the key in the env file will be exposed and included in the bundled script, which is really bad! It's best to create a server to handle API calls instead of front-end code. This project is a learning resource and not production-ready.
I would like to give a credit for DesignersDecode for this inspiring ideas for bringing this creativity project, which based on the sustainability.