Skip to main content

LMITF - Large Model Interface

PyPI Version Python Versions License Documentation

LMITF (Large Model Interface) 为与大型语言模型和视觉模型交互提供了一个灵活、简洁的Python接口。

✨ 特性

  • 🚀 简单易用 - 直观的API设计,快速上手
  • 🔧 灵活配置 - 支持多种API端点和环境配置
  • 📊 内置定价 - 集成成本追踪和使用分析
  • 🎯 模板系统 - 预构建模板和自定义提示管理
  • 🖼️ 视觉模型 - 支持图像分析和多模态AI任务
  • 📖 完整文档 - 详尽的使用指南和API参考

📚 文档

‼️(文档由claude code生成,不太准确,无误版请参考下方的 ## 📖 示例)

完整文档: https://colehank.github.io/AI-interface/

🚀 快速开始

安装

pip install lmitf

基本使用

from lmitf import BaseLLM

llm = BaseLLM()
response = llm.call("你好,请介绍一下人工智能")
print(response)

📋 项目简介

LMITF (Large Model Interface) 为与聚合API平台交互提供了一个灵活的接口,支持:

  • 文本生成 - 基于BaseLLM的语言模型交互
  • 图像理解 - 基于BaseLVM的视觉语言模型
  • 模板系统 - TemplateLLM支持复用提示模板
  • 成本管理 - 内置定价追踪和使用分析

🔧 环境配置

创建.env文件:

OPENAI_API_KEY=你的API密钥
OPENAI_BASE_URL=https://api.openai.com/v1

📖 示例

🤝 贡献

欢迎贡献代码!请查看贡献指南了解详情。

📄 许可证

本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。

👨‍💻 作者

Guohao Zhang - guohao2045@gmail.com


🌟 如果这个项目对您有帮助,请给个星标支持!

Metadata

Release files for lmitf 0.1.24

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

Source distribution (sdist)

Source distribution for lmitf 0.1.24
File Size Uploaded Provenance Actions
lmitf-0.1.24.tar.gz 30.6 MB Without provenance Details for lmitf-0.1.24.tar.gz

Built distribution (wheel)

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

Total release size: 31.1 MB

Release files / lmitf-0.1.24.tar.gz

Download URL lmitf-0.1.24.tar.gz
Size 30.6 MB
Tags Source
SHA-256 checksum
How to use checksums
ac8fc336b5df1621c5058b39667c8e420a0a462ccfbb5aeefcaed8f038d46f20
BLAKE2b-256 checksum
How to use checksums
24449a186aa19e15122b2cd918f1f3e79017a5f49a96e9ca258d2e6f52530338
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.4

Release files / lmitf-0.1.24-py3-none-any.whl

Download URL lmitf-0.1.24-py3-none-any.whl
Size 507.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
926e1a5fe8432b759ba58c0e5e4f5f376bcfc3c295af4a5a7e66f726898ac92e
BLAKE2b-256 checksum
How to use checksums
f9a24f9d0482c72c2c8523c9458054b347e9ba4bccaa34aaab6abe473f4f3b7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.32.4

Security for lmitf 0.1.24

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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