memcode README

README проекта с github.com/memcode-in/memcode. Одним файлом markdown: README.md.

mypy logo

Mypy: Static Typing for Python

Stable Version Downloads Build Status Documentation Status Chat at https://gitter.im/python/typing Checked with mypy Code style: black Linting: Ruff

Got a question?

We are always happy to answer questions! Here are some good places to ask them:

If you're just getting started, the documentation and type hints cheat sheet can also help answer questions.

If you think you've found a bug:

To report a bug or request an enhancement:

To discuss a new type system feature:

What is mypy?

Mypy is a static type checker for Python.

Type checkers help ensure that you're using variables and functions in your code correctly. With mypy, add type hints (PEP 484) to your Python programs, and mypy will warn you when you use those types incorrectly.

Python is a dynamic language, so usually you'll only see errors in your code when you attempt to run it. Mypy is a static checker, so it finds bugs in your programs without even running them!

Here is a small example to whet your appetite:

number = input("What is your favourite number?")
print("It is", number + 1)  # error: Unsupported operand types for + ("str" and "int")

Adding type hints for mypy does not interfere with the way your program would otherwise run. Think of type hints as similar to comments! You can always use the Python interpreter to run your code, even if mypy reports errors.

Mypy is designed with gradual typing in mind. This means you can add type hints to your code base slowly and that you can always fall back to dynamic typing when static typing is not convenient.

Mypy has a powerful and easy-to-use type system, supporting features such as type inference, generics, callable types, tuple types, union types, structural subtyping and more. Using mypy will make your programs easier to understand, debug, and maintain.

See the documentation for more examples and information.

In particular, see:

Quick start

Mypy can be installed using pip:

python3 -m pip install -U mypy

If you want to run the latest version of the code, you can install from the repo directly:

python3 -m pip install -U git+https://github.com/python/mypy.git

Now you can type-check the statically typed parts of a program like this:

mypy PROGRAM

You can always use the Python interpreter to run your statically typed programs, even if mypy reports type errors:

python3 PROGRAM

If you are working with large code bases, you can run mypy in daemon mode, that will give much faster (often sub-second) incremental updates:

memcode run -- PROGRAM

You can also try mypy in an online playground (developed by Yusuke Miyazaki).

Integrations

Mypy can be integrated into popular IDEs:

Web site and documentation

Additional information is available at the web site:

https://www.mypy-lang.org/

Jump straight to the documentation:

https://mypy.readthedocs.io/

Follow along our changelog at:

https://mypy-lang.blogspot.com/

Contributing

Help in testing, development, documentation and other tasks is highly appreciated and useful to the project. There are tasks for contributors of all experience levels.

To get started with developing mypy, see CONTRIBUTING.md.

Mypyc and compiled version of mypy

Mypyc uses Python type hints to compile Python modules to faster C extensions. Mypy is itself compiled using mypyc: this makes mypy approximately 4 times faster than if interpreted!

To install an interpreted mypy instead, use:

python3 -m pip install --no-binary mypy -U mypy

To use a compiled version of a development version of mypy, directly install a binary from https://github.com/mypyc/mypy_mypyc-wheels/releases/latest.

To contribute to the mypyc project, check out the issue tracker at https://github.com/mypyc/mypyc

memcode (memcode-in/memcode)

Ищем в базе…

Что это такое?MemCode — это инфраструктура памяти для ИИ: она даёт агентам, копилотам, приложениям и рабочим процессам долговременную память, которая сохраняется между сессиями, контекстными окнами и даже при смене модели.
Это библиотека, которую я импортирую, или размещённая платформа?Это слой инфраструктуры памяти со собственным приложением-панелью (app.memcode.in), к которому подключаются другие агенты, копилоты и приложения для сохранения и получения памяти, а не простая библиотека внутри процесса.
Как запустить панель у себя локально?Склонируйте репозиторий, установите зависимости через npm, скопируйте приложенный шаблон файла окружения и впишите свои значения, затем запустите dev-сервер; при production-сборке сначала проходит проверка TypeScript, а потом собирается бандл с помощью Vite.
Нужно ли что-то ещё, кроме Node.js и npm?Только Node.js и npm в качестве предпосылок, плюс настроенные локально переменные окружения — production-креденшелы и приватные ключи никогда не должны попадать в репозиторий.
Проект уже можно использовать в продакшене?Нет, MemCode всё ещё в активной разработке, поэтому API, интерфейсы и инфраструктура могут меняться, пока команда улучшает качество поиска по памяти, оценку памяти, интеграции и удобство для разработчиков.
Кто управляет доступом к сохранённым воспоминаниям?MemCode задуман так, чтобы доступ и сроки хранения данных регулировались явными настройками, а не оставались неограниченными.
Почему бы просто не использовать контекстное окно побольше?Больший промпт лишь расширяет то, что видно в пределах одной сессии; память MemCode сохраняется между сессиями, контекстными окнами и даже при смене модели, поэтому агенты помнят решения и предпочтения ещё долго после окончания разговора.
Что значит «избирательная» память в MemCode?Вместо записи всего подряд система устроена так, чтобы решать, что стоит запомнить, — поэтому поиск остаётся сфокусированным на важных решениях и накопленных знаниях, а не на шуме.
Как можно искать по сохранённым воспоминаниям?Запросы к памяти работают и через семантический поиск (по смыслу), и через структурный поиск (по полям), при этом операторы системы могут просматривать сохранённые данные.
MemCode — проект с открытым исходным кодом?Да, репозиторий распространяется по лицензии MIT, хотя основной способ использования сегодня — это размещённая панель по адресу app.memcode.in.
Какие есть похожие проекты?EverOS, hindsight, mem0, supermemory, memoket-kite, Athena-Public, powercontext, capsule-memory
Автор
memcode-in
Размер
4.3 MB
Звёзды
592
Обновлён
КоммитOct 28
Возраст
3 мес
Коммиты · 90 дней