assistants-framework


Nameassistants-framework JSON
Version 0.7.11 PyPI version JSON
download
home_pageNone
SummaryAI Assistant Framework with CLI and Telegram Bot
upload_time2025-09-18 22:16:49
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License
keywords openai gpt3 gpt3.5 gpt4 o1 chatgpt chatbot assistant mistral deepseek assistants claude anthropic cli telegram llm bot ui tui coding-assistant coding programming
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Assistants Framework

A flexible framework for creating AI assistants with multiple frontend interfaces.

## Features

- **Multi-Front-End Support**: CLI and Telegram interfaces built on the same core framework
- **CLI Features**: Code highlighting, thread management, editor integration, file input, image generation
- **Multiple LLM Support**: OpenAI (`gpt-*`, `o*`), Anthropic (`claude-*`), MistralAI (`mistral-*`, `codestral-*`), and image generation (DALL-E)
- **New Universal Assistant Interface**: See MIGRATION_GUIDE.md for details

## Installation

Requires Python 3.11+

```bash
pip install assistants-framework
```

For Telegram bot functionality:

```bash
pip install assistants-framework[telegram]
```

Add commands to your PATH:

```bash
ai-cli install
```

## Usage

### Command Line Interface

```bash
ai-cli --help
```

Key CLI commands (prefixed with `/`):

- `/help` - Show help message
- `/editor` - Open editor for prompt composition
- `/image <prompt>` - Generate an image
- `/copy` - Copy response to clipboard
- `/new` - Start new thread
- `/threads` - List and select threads
- `/thinking <level>` - Toggle thinking mode (for reasoning models)
- `/last` - Retrieve last message

Use the `claude` command for Anthropic models (Now defaults to Claude 4):

```bash
claude -e  # Open editor for Claude
```

There's also a `chatgpt` command that uses the default ChatGPT model:

```bash
chatgpt -t  # Continue the last thread with ChatGPT (`gpt-4.1-mini`)
```

Run migrations in case of breaking changes:

```bash
ai-cli migrate
```

Rebuild the database:

```bash
ai-cli rebuild
```

### Telegram Interface

The framework includes a Telegram bot interface with the following features:

- **User Management**: Authorise/deauthorise users and chats, promote/demote users
- **Thread Management**: Start new conversation threads
- **Auto-Reply Toggle**: Enable/disable automatic responses
- **Media Generation**: Generate images from text prompts
- **Voice Responses**: Generate audio responses with the `/voice` command

Key Telegram commands:

- `/new_thread` - Clear conversation history and start a new thread
- `/auto_reply` - Toggle automatic responses on/off
- `/image <prompt>` - Generate an image from a text prompt
- `/voice <text>` - Generate an audio response.

## Environment Variables

- `ASSISTANT_INSTRUCTIONS` - System message (default: "You are a helpful assistant")
- `ASSISTANTS_API_KEY_NAME` - API key variable name (default: `OPENAI_API_KEY`)
- `ANTHROPIC_API_KEY_NAME` - Anthropic API key variable (default: `ANTHROPIC_API_KEY`)
- `MISTRAL_API_KEY_NAME` - Mistral API key variable (default: `MISTRAL_API_KEY`)
- `DEFAULT_MODEL` - Default model (default: `gpt-4o-mini`)
- `DEFAULT_CLAUDE_SONNET_MODEL` - Default Claude model (default: `claude-sonnet-4-20250514`)
- `DEFAULT_CLAUDE_OPUS_MODEL` - Default Claude Opus model (default: `claude-opus-4-1-20250805`)
- `DEFAULT_CHATGPT_MODEL` - Default ChatGPT model (default: `gpt-4.1-mini`)
- `DEFAULT_GPT_REASONING_MODEL` - Default GPT reasoning model (default: `o4-mini`)
- `CODE_MODEL` - Reasoning model (default: `o3-mini`)
- `IMAGE_MODEL` - Image model (default: `dall-e-3`)
- `ASSISTANTS_DATA_DIR` - Data directory (default: `~/.local/share/assistants`)
- `ASSISTANTS_CONFIG_DIR` - Config directory (default: `~/.config/assistants`)
- `TG_BOT_TOKEN` - Telegram bot token
- `OPEN_IMAGES_IN_BROWSER` - Open images automatically (default: `true`)
- `DEFAULT_MAX_RESPONSE_TOKENS` - Default max response tokens (default: `4096`)
- `DEFAULT_MAX_HISTORY_TOKENS` - Default max history tokens (default: `10000`)

## Contributing

Contributions welcome! Fork the repository, make changes, and submit a pull request.

#### TODOs:

- Improved conversation handling/truncation for token limits - currently uses tiktoken for all models
- Additional model/API support
- Additional database support

## License

MIT License

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "assistants-framework",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "openai, gpt3, gpt3.5, gpt4, o1, chatgpt, chatbot, assistant, mistral, deepseek, assistants, claude, anthropic, cli, telegram, llm, bot, ui, tui, coding-assistant, coding, programming",
    "author": null,
    "author_email": "Michael Jarvis <nihilok@jarv.dev>",
    "download_url": "https://files.pythonhosted.org/packages/e5/d6/746c972f570e2d0007da8833731152a23774d7225d2a4ab742a7e94a2445/assistants_framework-0.7.11.tar.gz",
    "platform": null,
    "description": "# Assistants Framework\n\nA flexible framework for creating AI assistants with multiple frontend interfaces.\n\n## Features\n\n- **Multi-Front-End Support**: CLI and Telegram interfaces built on the same core framework\n- **CLI Features**: Code highlighting, thread management, editor integration, file input, image generation\n- **Multiple LLM Support**: OpenAI (`gpt-*`, `o*`), Anthropic (`claude-*`), MistralAI (`mistral-*`, `codestral-*`), and image generation (DALL-E)\n- **New Universal Assistant Interface**: See MIGRATION_GUIDE.md for details\n\n## Installation\n\nRequires Python 3.11+\n\n```bash\npip install assistants-framework\n```\n\nFor Telegram bot functionality:\n\n```bash\npip install assistants-framework[telegram]\n```\n\nAdd commands to your PATH:\n\n```bash\nai-cli install\n```\n\n## Usage\n\n### Command Line Interface\n\n```bash\nai-cli --help\n```\n\nKey CLI commands (prefixed with `/`):\n\n- `/help` - Show help message\n- `/editor` - Open editor for prompt composition\n- `/image <prompt>` - Generate an image\n- `/copy` - Copy response to clipboard\n- `/new` - Start new thread\n- `/threads` - List and select threads\n- `/thinking <level>` - Toggle thinking mode (for reasoning models)\n- `/last` - Retrieve last message\n\nUse the `claude` command for Anthropic models (Now defaults to Claude 4):\n\n```bash\nclaude -e  # Open editor for Claude\n```\n\nThere's also a `chatgpt` command that uses the default ChatGPT model:\n\n```bash\nchatgpt -t  # Continue the last thread with ChatGPT (`gpt-4.1-mini`)\n```\n\nRun migrations in case of breaking changes:\n\n```bash\nai-cli migrate\n```\n\nRebuild the database:\n\n```bash\nai-cli rebuild\n```\n\n### Telegram Interface\n\nThe framework includes a Telegram bot interface with the following features:\n\n- **User Management**: Authorise/deauthorise users and chats, promote/demote users\n- **Thread Management**: Start new conversation threads\n- **Auto-Reply Toggle**: Enable/disable automatic responses\n- **Media Generation**: Generate images from text prompts\n- **Voice Responses**: Generate audio responses with the `/voice` command\n\nKey Telegram commands:\n\n- `/new_thread` - Clear conversation history and start a new thread\n- `/auto_reply` - Toggle automatic responses on/off\n- `/image <prompt>` - Generate an image from a text prompt\n- `/voice <text>` - Generate an audio response.\n\n## Environment Variables\n\n- `ASSISTANT_INSTRUCTIONS` - System message (default: \"You are a helpful assistant\")\n- `ASSISTANTS_API_KEY_NAME` - API key variable name (default: `OPENAI_API_KEY`)\n- `ANTHROPIC_API_KEY_NAME` - Anthropic API key variable (default: `ANTHROPIC_API_KEY`)\n- `MISTRAL_API_KEY_NAME` - Mistral API key variable (default: `MISTRAL_API_KEY`)\n- `DEFAULT_MODEL` - Default model (default: `gpt-4o-mini`)\n- `DEFAULT_CLAUDE_SONNET_MODEL` - Default Claude model (default: `claude-sonnet-4-20250514`)\n- `DEFAULT_CLAUDE_OPUS_MODEL` - Default Claude Opus model (default: `claude-opus-4-1-20250805`)\n- `DEFAULT_CHATGPT_MODEL` - Default ChatGPT model (default: `gpt-4.1-mini`)\n- `DEFAULT_GPT_REASONING_MODEL` - Default GPT reasoning model (default: `o4-mini`)\n- `CODE_MODEL` - Reasoning model (default: `o3-mini`)\n- `IMAGE_MODEL` - Image model (default: `dall-e-3`)\n- `ASSISTANTS_DATA_DIR` - Data directory (default: `~/.local/share/assistants`)\n- `ASSISTANTS_CONFIG_DIR` - Config directory (default: `~/.config/assistants`)\n- `TG_BOT_TOKEN` - Telegram bot token\n- `OPEN_IMAGES_IN_BROWSER` - Open images automatically (default: `true`)\n- `DEFAULT_MAX_RESPONSE_TOKENS` - Default max response tokens (default: `4096`)\n- `DEFAULT_MAX_HISTORY_TOKENS` - Default max history tokens (default: `10000`)\n\n## Contributing\n\nContributions welcome! Fork the repository, make changes, and submit a pull request.\n\n#### TODOs:\n\n- Improved conversation handling/truncation for token limits - currently uses tiktoken for all models\n- Additional model/API support\n- Additional database support\n\n## License\n\nMIT License\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "AI Assistant Framework with CLI and Telegram Bot",
    "version": "0.7.11",
    "project_urls": {
        "Bug Tracker": "https://github.com/nihilok/assistants/issues",
        "Homepage": "https://github.com/nihilok/assistants"
    },
    "split_keywords": [
        "openai",
        " gpt3",
        " gpt3.5",
        " gpt4",
        " o1",
        " chatgpt",
        " chatbot",
        " assistant",
        " mistral",
        " deepseek",
        " assistants",
        " claude",
        " anthropic",
        " cli",
        " telegram",
        " llm",
        " bot",
        " ui",
        " tui",
        " coding-assistant",
        " coding",
        " programming"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1e14e4633106444222bc11c0d72c7467869c88358ed5058229a8f788e365decd",
                "md5": "c2fac0233dac624171505e7312f2cd58",
                "sha256": "8c7ca07af8bf28574fde41b457e2fac4b6978f446dfd3476b15a8477805fcf25"
            },
            "downloads": -1,
            "filename": "assistants_framework-0.7.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c2fac0233dac624171505e7312f2cd58",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 72049,
            "upload_time": "2025-09-18T22:16:47",
            "upload_time_iso_8601": "2025-09-18T22:16:47.810040Z",
            "url": "https://files.pythonhosted.org/packages/1e/14/e4633106444222bc11c0d72c7467869c88358ed5058229a8f788e365decd/assistants_framework-0.7.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e5d6746c972f570e2d0007da8833731152a23774d7225d2a4ab742a7e94a2445",
                "md5": "97c32bc0984e708acef7eb610a59f9e8",
                "sha256": "8d098f05502a6dfc02ab3007d8c409f21b539f01dc622deb4a9d478c5550ef3e"
            },
            "downloads": -1,
            "filename": "assistants_framework-0.7.11.tar.gz",
            "has_sig": false,
            "md5_digest": "97c32bc0984e708acef7eb610a59f9e8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 55623,
            "upload_time": "2025-09-18T22:16:49",
            "upload_time_iso_8601": "2025-09-18T22:16:49.345334Z",
            "url": "https://files.pythonhosted.org/packages/e5/d6/746c972f570e2d0007da8833731152a23774d7225d2a4ab742a7e94a2445/assistants_framework-0.7.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-18 22:16:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "nihilok",
    "github_project": "assistants",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "assistants-framework"
}
        
Elapsed time: 9.53994s