Skip to content

SaaranshDx/blink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blink AI

Blink AI is a powerful, autonomous AI agent designed to assist with a wide range of tasks, from coding to general problem-solving. It features a modern desktop-like interface and supports multiple Large Language Model (LLM) providers, allowing you to choose the best model for your needs.

Features

  • Multi-Provider Support: Seamlessly switch between OpenAI, Anthropic, Groq, and OpenRouter.
  • Autonomous Agent: Capable of executing terminal commands, file operations, and more to actively solve problems.
  • Persistent Memory: Maintains conversation context to provide coherent and improved responses.
  • Customizable: extensive configuration options including system prompts, model parameters, and more.
  • Modern UI: A sleek, dark-themed user interface built with HTML/CSS and powered by pywebview.

Prerequisites

  • Python 3.8 or higher.
  • pip package manager.

Installation

  1. Clone the repository:

    git clone https://github.com/SaaranshDx/blink.git
    cd blink
  2. Install dependencies:

    pip install -r requirements.txt

Architecture

Blink AI operates on a client-server architecture:

  • Backend (server/main.py): Handles the core AI logic, conversation memory, and communicates with LLM providers. It runs on http://127.0.0.1:5000.
  • Client (main.py): The user interface wrapper that communicates with the backend and handles local system operations (like terminal commands). It runs an internal server on http://127.0.0.1:6767.

Usage

To use Blink AI, you need to run both the backend server and the client application.

1. Host the Backend

Open a terminal window and run the backend server:

python server/main.py

This will start the Flask server on port 5000. You needs to keep this window open.

2. Run the Client

Open a second terminal window (or a new tab) and launch the client:

python main.py

This will open the Blink AI application window.

3. Configure Your Provider

  1. Click the Settings gear icon in the top right corner (or use Ctrl+,).
  2. Select your preferred Provider (OpenAI, Anthropic, Groq, OpenRouter).
  3. Enter your API Key.
  4. Specify the Model name (e.g., gpt-4, claude-3-opus-20240229, llama3-70b-8192).
  5. Adjust Temperature and Max Tokens if desired.
  6. Click Save.

Customization

Modifying the System Prompt

The "personality" and rules of the agent are defined in the System Prompt. To modify it:

  1. Open server/main.py in your text editor.
  2. Locate the variable SYSTEM_PROMPT (usually near the top of the file).
  3. Edit the text within the triple quotes """ to change how the agent behaves, its rules, or its capabilities.
# server/main.py

SYSTEM_PROMPT = """
You are "blink", an AI assistant developed by Blink AI.
...
"""
  1. Restart the backend server (server/main.py) for the changes to take effect.

Configuration File

Your settings (API keys, current model, etc.) are saved locally in config.json. You can edit this file directly if you prefer, but using the in-app Settings menu is recommended to ensure proper formatting.

Shortcuts

  • F5: Clear Chat History (UI only)
  • Ctrl + E: Clear Session (Clears UI and Backend Memory)
  • Ctrl + ,: Open Settings
  • Ctrl + L: Focus Input Field

Troubleshooting

  • "Connection Error": Ensure that server/main.py is running and accessible at localhost:5000.
  • Rate Limits: If you receive rate limit errors, try switching providers or increasing the wait time between requests.
  • Dependencies: If you encounter ModuleNotFoundError, make sure you have installed all requirements: pip install -r requirements.txt.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages