# 中文说明
## 项目简介
LMITF (Large Model Interface) 为与聚合API平台交互提供了一个灵活的接口,支持直接消息调用和基于模板的提示调用。
## 安装方法
```bash
pip install lmitf
```
或者从源码安装:
```bash
git clone https://github.com/colehank/AI-interface.git
cd AI-interface
pip install -r requirements.txt
```
## 环境变量
在项目根目录下创建`.env`文件(参考`.env_example`):
```
OPENAI_API_KEY=你的API密钥
OPENAI_BASE_URL=API地址
```
## 使用示例
LLM见[example_llm.ipynb](https://github.com/colehank/AI-interface/blob/main/example_llm.ipynb),
LVM见[example_lvm.ipynb](https://github.com/colehank/AI-interface/blob/main/example_lvm.ipynb),
模型问价及api key余额查询见[example_price.ipynb](https://github.com/colehank/AI-interface/blob/main/example_price.ipynb)
Raw data
{
"_id": null,
"home_page": null,
"name": "lmitf",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "ai, llm, lvm, api, interface, openai, large-model",
"author": null,
"author_email": "Guohao Zhang <guohao2045@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e4/e7/7f595930d505a5fbb64352ce704d05b4fcc91193eee202eb381f89410948/lmitf-0.1.11.tar.gz",
"platform": null,
"description": "# \u4e2d\u6587\u8bf4\u660e\n\n## \u9879\u76ee\u7b80\u4ecb\n\nLMITF (Large Model Interface) \u4e3a\u4e0e\u805a\u5408API\u5e73\u53f0\u4ea4\u4e92\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7075\u6d3b\u7684\u63a5\u53e3\uff0c\u652f\u6301\u76f4\u63a5\u6d88\u606f\u8c03\u7528\u548c\u57fa\u4e8e\u6a21\u677f\u7684\u63d0\u793a\u8c03\u7528\u3002\n\n## \u5b89\u88c5\u65b9\u6cd5\n\n```bash\npip install lmitf\n```\n\n\u6216\u8005\u4ece\u6e90\u7801\u5b89\u88c5\uff1a\n\n```bash\ngit clone https://github.com/colehank/AI-interface.git\ncd AI-interface\npip install -r requirements.txt\n```\n\n## \u73af\u5883\u53d8\u91cf\n\n\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u521b\u5efa`.env`\u6587\u4ef6\uff08\u53c2\u8003`.env_example`\uff09\uff1a\n\n```\nOPENAI_API_KEY=\u4f60\u7684API\u5bc6\u94a5\nOPENAI_BASE_URL=API\u5730\u5740\n```\n\n## \u4f7f\u7528\u793a\u4f8b\nLLM\u89c1[example_llm.ipynb](https://github.com/colehank/AI-interface/blob/main/example_llm.ipynb),\nLVM\u89c1[example_lvm.ipynb](https://github.com/colehank/AI-interface/blob/main/example_lvm.ipynb),\n\u6a21\u578b\u95ee\u4ef7\u53caapi key\u4f59\u989d\u67e5\u8be2\u89c1[example_price.ipynb](https://github.com/colehank/AI-interface/blob/main/example_price.ipynb)\n",
"bugtrack_url": null,
"license": null,
"summary": "Large Model Interface - A flexible interface for interacting with large language models and vision models.",
"version": "0.1.11",
"project_urls": {
"Homepage": "https://github.com/colehank/AI-interface",
"Issues": "https://github.com/colehank/AI-interface/issues",
"Repository": "https://github.com/colehank/AI-interface"
},
"split_keywords": [
"ai",
" llm",
" lvm",
" api",
" interface",
" openai",
" large-model"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "bf2491f534862651b70404d07651d196af5e52dc3f1fd6f0adda8fec02837a15",
"md5": "145c13d05a97317c3caaf293a355fbaf",
"sha256": "845af32d43238911ddf2bad04fbd0d28279531579f8e7f6ed973fb76f9c8790c"
},
"downloads": -1,
"filename": "lmitf-0.1.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "145c13d05a97317c3caaf293a355fbaf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 499383,
"upload_time": "2025-08-14T10:06:35",
"upload_time_iso_8601": "2025-08-14T10:06:35.204727Z",
"url": "https://files.pythonhosted.org/packages/bf/24/91f534862651b70404d07651d196af5e52dc3f1fd6f0adda8fec02837a15/lmitf-0.1.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e4e77f595930d505a5fbb64352ce704d05b4fcc91193eee202eb381f89410948",
"md5": "5e45c09cb4cfeea9a1a4910e31748462",
"sha256": "4a2e672218ed13edd11071e229d38dc53d13cdcd9115fc404f5651f11e849f14"
},
"downloads": -1,
"filename": "lmitf-0.1.11.tar.gz",
"has_sig": false,
"md5_digest": "5e45c09cb4cfeea9a1a4910e31748462",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 493876,
"upload_time": "2025-08-14T10:06:37",
"upload_time_iso_8601": "2025-08-14T10:06:37.286758Z",
"url": "https://files.pythonhosted.org/packages/e4/e7/7f595930d505a5fbb64352ce704d05b4fcc91193eee202eb381f89410948/lmitf-0.1.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-14 10:06:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "colehank",
"github_project": "AI-interface",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "openai",
"specs": [
[
"==",
"1.90.0"
]
]
},
{
"name": "pandas",
"specs": [
[
"==",
"2.3.0"
]
]
},
{
"name": "pillow",
"specs": [
[
"==",
"10.0.1"
]
]
},
{
"name": "python-dotenv",
"specs": [
[
"==",
"1.1.0"
]
]
},
{
"name": "wasabi",
"specs": [
[
"==",
"1.1.3"
]
]
}
],
"lcname": "lmitf"
}