open-source browser extension that leverages the power of the AI to generate engaging replies for social media growth.
MIT License
Disclaimer: While I generally do not advocate for the use of automated tools for social media interactions, as they can reduce genuine human engagement, I wanted to build ollama-reply as an experiment. It was an opportunity to explore the capabilities of Ollama and dive into browser extensions.
ollama-reply is an open-source browser extension that leverages the power of the Ollama Llama3 model to generate engaging replies for social media growth. This tool is designed as a free and open alternative to MagicReply.
ollama-reply is a react-based browser extension built using the following technologies:
Before you begin, ensure you have:
Pull the AI Model:
ollama pull llama3:8b
to download the Llama3 model. You can also use other models if you prefer. See Configuration for more information.Start Ollama Server:
OLLAMA_ORIGINS=* ollama serve
to allow calls from the browser extension.Download the Repository:
Unzip the Repository:
Load the Extension:
chrome://extensions/
.dist
folder inside the unzipped folder of this repository.Once installed, navigate to any post on Twitter or LinkedIn, and you will see an additional button labeled "Generate Reply". Clicking this button will use the Ollama Llama3 model to generate a contextually relevant reply.
By default the extension uses the llama3:8b
model. You can change this by pulling the model you want from ollama and updating the MODEL
variable in the src/entries/background/main.ts
file. You will need to rebuild the extension after changing the model.
You can configure the answers generated by the extension by updating the SYSTEM_PROMPT
variable in the src/entries/background/main.ts
file. This variable is used as the prompt for the Ollama model. You will need to rebuild the extension after changing the prompt.
This project uses @samrum/vite-plugin-web-extension. Refer to the plugin documentation for more information.
npm install
Hot Module Reloading is used to load changes inline without requiring extension rebuilds and extension/page reloads Currently only works in Chromium based browsers.
npm run dev
Rebuilds extension on file changes. Requires a reload of the extension (and page reload if using content scripts)
npm run watch
Minifies and optimizes extension build
npm run build
Loads the contents of the dist directory into the specified browser
npm run serve:chrome
npm run serve:firefox
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE
for more information.