-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathREADME.MD
75 lines (58 loc) · 2.52 KB
/
README.MD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<div align=center>
<img src="https://iim.ai/public/images/logo.png?t=20231207" width="128"/>
# 智元 IIM API
[![Release](https://img.shields.io/github/v/release/iimeta/iim-api?color=blue)](https://github.com/iimeta/iim-api/releases)
[![License](https://img.shields.io/static/v1?label=license&message=MIT&color=green)](https://github.com/iimeta/iim-api/blob/main/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/iimeta/iim-api)](https://goreportcard.com/report/github.com/iimeta/iim-api)
</div>
`智元 IIM` 是一款开源的网页版即时聊天系统, 同时拥有AI聊天对话功能, 本项目基于[Lumen IM](https://github.com/gzydong/go-chat)使用[GoFrame](https://github.com/gogf/gf)框架开发
## 功能介绍
- 支持 OpenAI 全模型
## 项目预览
- 地址: [https://iim.ai](https://iim.ai)
- 账号: [email protected] 或 [email protected]
- 密码: 123456
## Docker部署
### [传送门](https://github.com/iimeta/iim-api/tree/docker)
## API接口
### 同OpenAI接口
```bash
curl --location 'https://api.iim.ai/v1/chat/completions' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer sk-IIMGD1unkIVxDbCi0ErDjnM0YwVuDUbJOs0XMkTtMJxAEg0N' \
--data '{
"model": "gpt-3.5-turbo-16k",
"stream": true,
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "hi"}
]
}'
```
### 获取使用额度接口
```bash
curl --location 'https://api.iim.ai/v1/token/usage' \
--header 'Authorization: Bearer sk-IIMGD1unkIVxDbCi0ErDjnM0YwVuDUbJOs0XMkTtMJxAEg0N'
```
响应结果
```json
{
"code": 200,
"message": "success",
"data": {
"usage_count": 1,
"used_tokens": 11,
"total_tokens": 10000
}
}
```
## 开源地址
| 仓库 | 前端 | 后端 | API |
| ---- | --------------------------------- | ------------------------------------ | --------------------------------- |
| 主库 | https://github.com/iimeta/iim-web | https://github.com/iimeta/iim-client | https://github.com/iimeta/iim-api |
| 码云 | https://gitee.com/iimeta/iim-web | https://gitee.com/iimeta/iim-client | https://gitee.com/iimeta/iim-api |
## 作者
<img src="https://iim.ai/public/images/Author.png?t=20231207" width="320" alt="作者"/>
## 交流群
<img src="https://iim.ai/public/images/WeChatGroup.jpg?t=20231207" width="320" alt="交流群"/>
![Star History Chart](https://api.star-history.com/svg?repos=iimeta/iim-api&type=Date)