Skip to main content

English | 简体中文

Myla: MY Local Assistants

Self-hosting AI Assistants compatible with OpenAI

Myla stands for MY Local Assistants and is designed and optimized for deploying AI assistants based on large language models (LLMs) in a private environment. Myla provides an API compatible with the OpenAI assistants API, with support for multiple LLM backends. Whether on a laptop or a production server, you can quickly develop and run AI assistants.

Key Features:

  • Support for OpenAI API and compatible LLM services
  • Assistant API compatible with OpenAI
  • Vector retrieval (FAISS/LanceDB)
  • sentence_transformers
  • WebUI
  • Tool extensions
  • Document Q&A (in progress)

Quick Start

Installation

Python version requirement: >= 3.9

Myla can be installed from PyPI using pip. It is recommended to create a new virtual environment before installation to avoid conflicts.

pip install myla

If you need Retrieval, please install all dependencies:

pip install "myla[all]"

Configuration

Myla supports using an OpenAI API-compatible LLM service as the backend. You can use the OpenAI API directly or deploy your own local LLM. If you want to deploy a local LLM, it is recommended to use Xorbits Inference.

Create a .env file in the current directory with the following content:

# LLM configuration
LLM_ENDPOINT=https://api.openai.com/v1/
LLM_API_KEY=sk-xx
DEFAULT_LLM_MODEL_NAME=gpt-3.5-turbo

More configurations can be found in: env-example.txt

ChatGLM as backend for your MacBook

Myla supports running ChatGLM locally using chatglm.cpp as the backend. To install the Python Binding, refer to: https://github.com/li-plus/chatglm.cpp#python-binding

.env configuration example:

DEFAULT_LLM_MODEL_NAME=chatglm@/Users/shellc/Workspaces/chatglm.cpp/chatglm-ggml.bin

Start

myla

or

python -m myla

For more startup options:

myla --help

WebUI

Myla provides a simple web interface that makes it easy to develop and debug assistants.

Access from your browser: http://localhost:2000/

Screenshot

API

You can directly use the OpenAI python SDK to access the assistants API.

  • API Docs: http://localhost:2000/api/docs
  • Swagger: http://localhost:2000/api/swagger

Community

Myla is still under rapid development, and community contributions are welcome.

Metadata

Release files for myla 0.2.40

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for myla 0.2.40
File Interpreter ABI Platform
myla-0.2.40-py3-none-any.whl Python 3 none any Details

Release files / myla-0.2.40-py3-none-any.whl

Download URL myla-0.2.40-py3-none-any.whl
Size 588.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
daf541cce63fbe303de8cee96d1c1994ecd7dcc1fd9ba883f191b95835ba599b
BLAKE2b-256 checksum
How to use checksums
363e2ba7b674cab48b73023619fd43be82376615d55a913bc11a00cec03b4840
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.2.40 This release

1 release file

0.2.39

1 release file

0.2.36

1 release file

0.2.35

1 release file

0.2.34

1 release file

0.2.33

1 release file

0.2.32

1 release file

0.2.31

1 release file

0.2.30

1 release file

0.2.29

1 release file

0.2.28

1 release file

0.2.24

1 release file

0.2.21

1 release file

0.2.20

1 release file

0.2.19

1 release file

0.2.18

1 release file

0.2.17

1 release file

0.2.16

1 release file

0.2.14

1 release file

0.2.12

1 release file

0.2.10

1 release file

0.2.9

1 release file

0.2.8

1 release file

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.21

1 release file

0.1.20

1 release file

0.1.19

1 release file

0.1.18

1 release file

0.1.17

1 release file

0.1.16

1 release file

0.1.15

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.12

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page