Skip to main content

Large Model Interface - A flexible interface for interacting with large language models and vision models.

Project description

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


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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lmitf-0.1.15.tar.gz (33.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lmitf-0.1.15-py3-none-any.whl (501.2 kB view details)

Uploaded Python 3

File details

Details for the file lmitf-0.1.15.tar.gz.

File metadata

  • Download URL: lmitf-0.1.15.tar.gz
  • Upload date:
  • Size: 33.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for lmitf-0.1.15.tar.gz
Algorithm Hash digest
SHA256 5b9267c7c84bc766fddc85c0304d9598b09da4a7c4aa1be82bd45dd432fdce97
MD5 3bdf03c1e917486ced41ec2cdd3c7a2f
BLAKE2b-256 72721c7bd9f17e35420308a2ff0251d75c18ce82e6d4f01e0c3ca79ec8dada4b

See more details on using hashes here.

File details

Details for the file lmitf-0.1.15-py3-none-any.whl.

File metadata

  • Download URL: lmitf-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 501.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for lmitf-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 4e8a8da38c5c2bde2e453b40df3da039340c796c5c090051c227f817f4c9a425
MD5 9d2cef5f9cccd78109312ccdda370256
BLAKE2b-256 657fd05691eb6b4ac4b0e0ca4461de01e12411b380b72d44369bd7e73ca1e8d1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page