Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/lobehub/lobe-chat
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Apr 13, 2024
2 parents f8bf3e7 + 98ad8e0 commit 77af1f3
Show file tree
Hide file tree
Showing 53 changed files with 933 additions and 538 deletions.
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,56 @@

# Changelog

### [Version 0.147.9](https://github.com/lobehub/lobe-chat/compare/v0.147.8...v0.147.9)

<sup>Released on **2024-04-12**</sup>

#### 🐛 Bug Fixes

- **misc**: Fix custom model list not display correctly.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

- **misc**: Fix custom model list not display correctly, closes [#2009](https://github.com/lobehub/lobe-chat/issues/2009) ([7d0e220](https://github.com/lobehub/lobe-chat/commit/7d0e220))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

### [Version 0.147.8](https://github.com/lobehub/lobe-chat/compare/v0.147.7...v0.147.8)

<sup>Released on **2024-04-12**</sup>

#### ♻ Code Refactoring

- **misc**: Update README.md.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

- **misc**: Update README.md ([44b5a23](https://github.com/lobehub/lobe-chat/commit/44b5a23))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

### [Version 0.147.7](https://github.com/lobehub/lobe-chat/compare/v0.147.6...v0.147.7)

<sup>Released on **2024-04-12**</sup>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,12 @@ We have implemented support for the following model service providers:
- **AWS Bedrock**: Integrated with AWS Bedrock service, supporting models such as **Claude / LLama2**, providing powerful natural language processing capabilities. [Learn more](https://aws.amazon.com/cn/bedrock)
- **Anthropic (Claude)**: Accessed Anthropic's **Claude** series models, including Claude 3 and Claude 2, with breakthroughs in multi-modal capabilities and extended context, setting a new industry benchmark. [Learn more](https://www.anthropic.com/claude)
- **Google AI (Gemini Pro, Gemini Vision)**: Access to Google's **Gemini** series models, including Gemini and Gemini Pro, to support advanced language understanding and generation. [Learn more](https://deepmind.google/technologies/gemini/)
- **ChatGLM**: Added the **ChatGLM** series models from Zhipuai (GLM-4/GLM-4-vision/GLM-3-turbo), providing users with another efficient conversation model choice. [Learn more](https://www.zhipuai.cn/)
- **Moonshot AI (Dark Side of the Moon)**: Integrated with the Moonshot series models, an innovative AI startup from China, aiming to provide deeper conversation understanding. [Learn more](https://www.moonshot.cn/)
- **Groq**: Accessed Groq's AI models, efficiently processing message sequences and generating responses, capable of multi-turn dialogues and single-interaction tasks. [Learn more](https://groq.com/)
- **OpenRouter**: Supports routing of models including **Claude 3**, **Gemma**, **Mistral**, **Llama2** and **Cohere**, with intelligent routing optimization to improve usage efficiency, open and flexible. [Learn more](https://openrouter.ai/)
- **01.AI (Yi Model)**: Integrated the 01.AI models, with series of APIs featuring fast inference speed, which not only shortened the processing time, but also maintained excellent model performance. [Learn more](https://01.ai/)
- **Together.ai**: Over 100 leading open-source Chat, Language, Image, Code, and Embedding models are available through the Together Inference API. For these models you pay just for what you use. [Learn more](https://www.together.ai/)
- **ChatGLM**: Added the **ChatGLM** series models from Zhipuai (GLM-4/GLM-4-vision/GLM-3-turbo), providing users with another efficient conversation model choice. [Learn more](https://www.zhipuai.cn/)
- **Moonshot AI (Dark Side of the Moon)**: Integrated with the Moonshot series models, an innovative AI startup from China, aiming to provide deeper conversation understanding. [Learn more](https://www.moonshot.cn/)

At the same time, we are also planning to support more model service providers, such as Replicate and Perplexity, to further enrich our service provider library. If you would like LobeChat to support your favorite service provider, feel free to join our [community discussion](https://github.com/lobehub/lobe-chat/discussions/1284).

Expand Down
48 changes: 48 additions & 0 deletions docs/self-hosting/advanced/model-list.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: Customizing Provider Model List in LobeChat for Deployment
description: >-
Learn how to customize the model list in LobeChat for deployment with the
syntax and extension capabilities
tags:
- LobeChat
- model customization
- deployment
- extension capabilities
---

# Model List

LobeChat supports customizing the model list during deployment. You can use `+` to add a model, `-` to hide a model, and use `model name=display name<extension configuration>` to customize the display name of a model, separated by English commas. The basic syntax is as follows:

```shell
id=displayName < maxToken:vision:fc:file > ,model2,model3
```

For example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`

In the above example, it adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the model name of `gpt-4-0125-preview` as `gpt-4-turbo`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only enabling `gpt-3.5-turbo`.

## Extension Capabilities

Considering the diversity of model capabilities, we started to add extension configuration in version `0.147.8`, with the following rules:

```shell
id=displayName<maxToken:vision:fc:file>
```

The first value in angle brackets is designated as the `maxToken` for this model. The second value and beyond are the model's extension capabilities, separated by colons `:`, and the order is not important.

Examples are as follows:

- `chatglm-6b=ChatGLM 6B<4096>`: ChatGLM 6B, maximum context of 4k, no advanced capabilities;
- `spark-v3.5=讯飞星火 v3.5<8192:fc>`: Xunfei Spark 3.5 model, maximum context of 8k, supports Function Call;
- `gemini-pro-vision=Gemini Pro Vision<16000:vision>`: Google Vision model, maximum context of 16k, supports image recognition;
- `gpt-4-all=ChatGPT Plus<128000:fc:vision:file>`, hacked version of ChatGPT Plus web, context of 128k, supports image recognition, Function Call, file upload.

Currently supported extension capabilities are:

| --- | Description |
| -------- | -------------------------------------------------------- |
| `fc` | Function Calling |
| `vision` | Image Recognition |
| `file` | File Upload (a bit hacky, not recommended for daily use) |
46 changes: 46 additions & 0 deletions docs/self-hosting/advanced/model-list.zh-CN.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
title: LobeChat 自定义模型服务商模型列表及扩展能力配置
description: 了解如何在 LobeChat 中自定义模型列表以及扩展能力配置的基本语法和规则。
tags:
- LobeChat
- 自定义模型列表
- 扩展能力配置
- 模型展示名
- 模型能力
---
# Model List

LobeChat 支持在部署时自定义模型列表,可以使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。通过 `<>` 来添加扩展配置。基本语法如下:

```shell
id=displayName < maxToken:vision:fc:file > ,model2,model3
```

例如: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`

上面示例表示增加 `qwen-7b-chat``glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-0125-preview` 模型名字展示为 `gpt-4-turbo`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`

## 扩展能力

考虑到模型的能力多样性,我们在 `0.147.8` 版本开始增加扩展性配置,它的规则如下:

```shell
id=displayName<maxToken:vision:fc:file>
```

尖括号第一个值约定为这个模型的 `maxToken` 。第二个及以后作为模型的扩展能力,能力与能力之间用冒号 `:` 作为分隔符,顺序不重要。

举例如下:

- `chatglm-6b=ChatGLM 6B<4096>`:ChatGLM 6B,最大上下文 4k,没有高阶能力;
- `spark-v3.5=讯飞星火 v3.5<8192:fc>`:讯飞星火 3.5 模型,最大上下文 8k,支持 Function Call;
- `gemini-pro-vision=Gemini Pro Vision<16000:vision>`:Google 视觉模型,最大上下文 16k,支持图像识别;
- `gpt-4-all=ChatGPT Plus<128000:fc:vision:file>`,hack 的 ChatGPT Plus 网页版,上下 128k ,支持图像识别、Function Call、文件上传

目前支持的扩展能力有:

| --- | 描述 |
| -------- | ------------------------------------ |
| `fc` | 函数调用(function calling) |
| `vision` | 视觉识别 |
| `file` | 文件上传(比较hack,不建议日常使用) |
11 changes: 11 additions & 0 deletions docs/self-hosting/environment-variables/basic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ LobeChat provides some additional configuration options during deployment, which
- Default: -
- Example: `awCTe)re_r74` or `rtrt_ewee3@09!`

### `API_KEY_SELECT_MODE`

- Type:Optional
- Description:Controls the mode for selecting the API Key when multiple API Keys are available. Currently supports `random` and `turn`.
- Default:`random`
- Example:`random` or `turn`

When using the `random` mode, a random API Key will be selected from the available multiple API Keys.

When using the `turn` mode, the API Keys will be retrieved in a round-robin manner according to the specified order.

### `ENABLE_OAUTH_SSO`

- Type: Optional
Expand Down
11 changes: 11 additions & 0 deletions docs/self-hosting/environment-variables/basic.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
- 默认值:-
- 示例:`awCTe)re_r74` or `rtrt_ewee3@09!`

### `API_KEY_SELECT_MODE`

- 类型:可选
- 描述:用于控制多个 API Keys 时,选择 Key 的模式,当前支持 `random``turn`
- 默认值:`random`
- 示例:`random``turn`

使用 `random` 模式下,将在多个 API Keys 中随机获取一个 API Key。

使用 `turn` 模式下,将按照填写的顺序,轮训获取得到 API Key。

### `ENABLE_OAUTH_SSO`

- 类型:可选
Expand Down
Loading

0 comments on commit 77af1f3

Please sign in to comment.