Skip to content

Commit

Permalink
📝 docs: Add LLM_VISION_IMAGE_USE_BASE64 environment variable for ba…
Browse files Browse the repository at this point in the history
…se64 image uploads in English and Chinese documentation
  • Loading branch information
CaiJingLong committed Dec 11, 2024
1 parent c61657b commit d90ff3f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/self-hosting/environment-variables/basic.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,20 @@ The above example sets the `SERPAPI_API_KEY` of the `search-engine` plugin to `x
- Type: Optional
- Description: Index address of the LobeChat assistant market. If you have deployed the assistant market service on your own, you can use this variable to override the default market address.
- Default: `https://chat-agents.lobehub.com`

## Upload image

### `LLM_VISION_IMAGE_USE_BASE64`

- Type: Optional
- Description: Set to `1` to use base64 encoding for image upload.
- Default: undefined
- Example: `1`

When set to `1`, LobeChat will convert images to base64 encoding before
uploading them to the LLM model. When encountering the following error,
please consider configuring this environment variable to `1`:

```log
Route: [xai] ProviderBizError: Fetching images over plain http:// is not supported.
```
15 changes: 15 additions & 0 deletions docs/self-hosting/environment-variables/basic.zh-CN.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,18 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境
- 类型:可选
- 描述:LobeChat 助手市场的索引地址,如果你自行部署了助手市场的服务,可以使用该变量来覆盖默认的市场地址
- 默认值:`https://chat-agents.lobehub.com`

## 上传图片

### `LLM_VISION_IMAGE_USE_BASE64`

- 类型:可选
- 描述:设置为 1 则使用 base64 编码上传图片
- 默认值:undefined
- 示例:`1`

当设置为 `1` 时,LobeChat 会将图片转换为 base64 编码后上传到 LLM 模型中,当遇到如下错误时请考虑配置该环境变量为 1

```log
Route: [xai] ProviderBizError: Fetching images over plain http:// is not supported.
```

0 comments on commit d90ff3f

Please sign in to comment.