AI Skill Hub 推荐使用:LM15 Python 是一款优质的AI工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的AI工具解决方案,这是一个值得深入了解的选择。
LM15 Python 是一款基于 Python 开发的开源工具,专注于 AI、Python、LLM 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
LM15 Python 是一款基于 Python 开发的开源工具,专注于 AI、Python、LLM 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install lm15-python
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install lm15-python
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/lm15-dev/lm15-python
cd lm15-python
pip install -e .
# 验证安装
python -c "import lm15_python; print('安装成功')"
# 命令行使用
lm15-python --help
# 基本用法
lm15-python input_file -o output_file
# Python 代码中调用
import lm15_python
# 示例
result = lm15_python.process("input")
print(result)
# lm15-python 配置文件示例(config.yml) app: name: "lm15-python" debug: false log_level: "INFO" # 运行时指定配置文件 lm15-python --config config.yml # 或通过环境变量配置 export LM15_PYTHON_API_KEY="your-key" export LM15_PYTHON_OUTPUT_DIR="./output"
lm15 is a small, typed, provider-neutral interface for foundation-model requests, responses, streams, tools, media parts, endpoint APIs, errors, and canonical JSON serialization. This repository is its Python reference implementation.
What lm15 is — and deliberately is not. lm15 is a low-level foundation library: one canonical representation, exact serde for it, and adapters that translate it to and from each provider's wire format — stdlib-only, with its own HTTP transport (websockets is the single optional extra, for live sessions). It is NOT an opinionated user-facing API: no magic call(), no automatic tool loops, no DSL. lm15 is meant to be the dependency for libraries that want to build their own take on the right way to talk to AI systems in Python — you bring the opinions, lm15 brings every provider.
The public API is the top-level package: `from lm15 import AnthropicLM, Request, Message, ... (see lm15/init.py` for the full curated surface). Transport plumbing stays under lm15.transports, live sessions under lm15.live, and the conformance shim under lm15.vet.
The code blocks below are documentation that runs: every
block is the real, captured output of the example above it.
```bash python3 -m pip install lm15
import os
from lm15 import Config, Message, OpenAILM, Request
lm = OpenAILM(api_key=os.environ["OPENAI_API_KEY"])
response = lm.complete(
Request(
model="gpt-4.1-mini",
system="You are terse.",
messages=(Message.user("Say hello in three words."),),
config=Config(max_tokens=50, temperature=0.2),
)
)
print(response.text)
print(response.finish_reason)
print(response.usage.total_tokens)
Hello there, friend.
stop
27
The mental model is one straight line:
Message parts → Message → Request → ProviderLM → Response
│
└── stream() → StreamEvent → materialized Response
python3 -m pip install 'lm15[live]'
Or from source, for development:
bash git clone https://github.com/lm15-dev/lm15-python && cd lm15-python python3 -m pip install -e '.[live]' ```
lm15 has zero required dependencies — it is stdlib-only, including its HTTP transports.
Multimodal input uses typed media parts (ImagePart, AudioPart, DocumentPart, ...):
import os
from lm15 import ImagePart, Message, OpenAILM, Request, TextPart
lm = OpenAILM(api_key=os.environ["OPENAI_API_KEY"])
request = Request(
model="gpt-4.1-mini",
messages=(
Message.user([
TextPart("Describe this image in a few words."),
ImagePart(
url="https://raw.githubusercontent.com/github/explore/main/topics/react/react.png",
media_type="image/png",
detail="low",
),
]),
),
)
print(lm.complete(request).text)
This image shows a blue atomic symbol, often used to represent an atom or atomic energy.
Non-chat endpoints have separate request/response types — EmbeddingRequest, ImageGenerationRequest, AudioGenerationRequest, FileUploadRequest, BatchRequest, LiveConfig:
from lm15 import EmbeddingRequest
embeddings = lm.embeddings(
EmbeddingRequest(
model="text-embedding-3-small",
inputs=("hello", "world"),
)
)
print(len(embeddings.vectors), len(embeddings.vectors[0]))
2 1536
高质量的开源AI工具,值得关注
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
总体来看,LM15 Python 是一款质量良好的AI工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | lm15-python |
| 原始描述 | 开源AI工具:lm15 Python reference implementation — provider-neutral, low-level foundation fo。⭐10 · Python |
| Topics | AIPythonLLM |
| GitHub | https://github.com/lm15-dev/lm15-python |
| License | MIT |
| 语言 | Python |
收录时间:2026-06-11 · 更新时间:2026-06-11 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。