FreeThinker is an AI agent that uses free of charge API open source LLMs in order to automatize tasks. That meaning that you don't required pay-per-token API keys to run it.
Welcome to the FreeThinker documentation. This AI agent is designed to automatize tasks via natural language. It leverages a pool of multiple advanced LLMs to choose from in order to run the agent. The model uses free open source model's APIs in order to run so there are no costs per token.
- No cost API usage.
- Multiple LLMs to choose from in order to run the agent.
- Easy to use as it uses natural language to communicate with the user.
- Automatize various tasks.
This file lists all the Python packages required to run the project. It ensures that all necessary dependencies are installed for the project to function correctly.
This is the main file of the project and is the one that needs to be run in order to use FreeThinker.
This files exist in every folder in order to use imports from other folders.
This folder contains the .env file with all API keys.
This folder contains one file per available model.
This folder contains prompting files, one for formatting and another one with an initial system prompt.
This folder contains one file per available tool and another one for the toolbox that agglutinates all tools and its docs.
To install the FreeThinker, follow these steps:
git clone https://github.com/diegovelilla/FreeThinker
cd FreeThinker
pip install -r requirements.txtSet up your API keys in the .env file inside the config model:
GROQ_API_KEY=your_api_key_here || Get it on: https://console.groq.com/keys
SERPER_API_KEY=your_api_key_here || Get it on: https://serper.dev/
CLIENT_ID=your_api_key_here || REDDIT
CLIENT_SECRET=your_api_key_here || REDDIT
WEATHER_API_KEY=your_api_key_here || Get it on: https://openweathermap.org/api
To use FreeThinker just run the following command:
python3 -m agentIn order to quit, just type exit.
Here are all the tools supported:
- Basic_calculator: Performs basic binary math operations.
- Weather_forecaster: Retrieves weather information on a given location.
- Reddit_scrapper: Scrapes a given subreddit for a number of posts.
- Search_tool: Searches a given query on Google.
- Scrape_tool: Scrapes a given webpage.
The models used for this project are:
- Llama 3.1 70B - Groq.
- Mistral Nemo Instruct 2407 - Hugging Face.
This is what I learned from this project:
- Most of small/old models act poorly on this task (gpt2, gemma 2B...) being mistral-nemo-instruct-2407 one of the exceptions.
- When using small models, good prompting becomes key. There were big improvements after splitting the answer method in first_answer and second_answer.
- Also the usage of examples of wrong outputs or a forbidden words part in the prompt improved the results.
- Easing the answer by asking for a list instead of a dictionary since the models had problems formatting it correctly.
- Using markdown instead of plain text for instructions really felt like an upgrade.
This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.
For any questions or feedback please reach out to:
- Email: diegovelillarecio@gmail.com
- GitHub Profile: diegovelilla
- Hugging Face Profile: diegovelilla
- LinkedIn: Diego Velilla Recio
Feel free to open an issue on GitHub or contact me in any way if you have any queries or suggestions.