Skip to content
 
 

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FreeThinker: Your own free of charge AI agent

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.

Other contributors

Luca Tufariello Logo Luca Tufariello

Table of contents

  1. Overview
  2. Features
  3. Files
  4. Installation
  5. Configuration
  6. Usage
  7. Toolbox
  8. Models
  9. Learnings
  10. License
  11. Contact

Overview

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.

Features

  • 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.

Files

requirements.txt

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.

agent.py

This is the main file of the project and is the one that needs to be run in order to use FreeThinker.

__init__.py

This files exist in every folder in order to use imports from other folders.

config

This folder contains the .env file with all API keys.

models

This folder contains one file per available model.

prompts

This folder contains prompting files, one for formatting and another one with an initial system prompt.

tools

This folder contains one file per available tool and another one for the toolbox that agglutinates all tools and its docs.

Installation

To install the FreeThinker, follow these steps:

git clone https://github.com/diegovelilla/FreeThinker
cd FreeThinker
pip install -r requirements.txt

Configuration:

Set 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

Usage:

To use FreeThinker just run the following command:

python3 -m agent

In order to quit, just type exit.

Toolbox:

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.

Models

The models used for this project are:

Learnings

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.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.

Contact

For any questions or feedback please reach out to:

Feel free to open an issue on GitHub or contact me in any way if you have any queries or suggestions.

About

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.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages