@lobehub/chat 1.79.5 → 1.79.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.79.6](https://github.com/lobehub/lobe-chat/compare/v1.79.5...v1.79.6)
|
6
|
+
|
7
|
+
<sup>Released on **2025-04-11**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Fix `grok-3-mini` series calling.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### What's fixed
|
19
|
+
|
20
|
+
- **misc**: Fix `grok-3-mini` series calling, closes [#7371](https://github.com/lobehub/lobe-chat/issues/7371) ([523c605](https://github.com/lobehub/lobe-chat/commit/523c605))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
### [Version 1.79.5](https://github.com/lobehub/lobe-chat/compare/v1.79.4...v1.79.5)
|
6
31
|
|
7
32
|
<sup>Released on **2025-04-10**</sup>
|
package/changelog/v1.json
CHANGED
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
title: 配置联网搜索功能 - 增强 AI 的网络信息获取能力
|
3
|
+
description: 了解如何为 LobeChat 配置 SearXNG 联网搜索功能,使 AI 能够获取最新的网络信息。
|
4
|
+
tags:
|
5
|
+
- 联网搜索
|
6
|
+
- SearXNG
|
7
|
+
- 网络信息
|
8
|
+
- AI 增强
|
9
|
+
---
|
10
|
+
|
11
|
+
# 配置联网搜索功能
|
12
|
+
|
13
|
+
LobeChat 支持为 AI 配置联网搜索功能,这使得 AI 能够获取最新的网络信息,从而提供更准确、更及时的回答。联网搜索功能基于 [SearXNG](https://github.com/searxng/searxng) 搜索引擎,它是一个尊重隐私的元搜索引擎,可以聚合多个搜索引擎的结果。
|
14
|
+
|
15
|
+
<Callout type={'info'}>
|
16
|
+
SearXNG 是一个开源的元搜索引擎,可以自行部署,也可以使用公共实例。通过配置 SearXNG,LobeChat 可以让 AI 获取最新的互联网信息,从而回答时效性问题、提供最新资讯。
|
17
|
+
</Callout>
|
18
|
+
|
19
|
+
# 核心环境变量
|
20
|
+
|
21
|
+
## `SEARXNG_URL`
|
22
|
+
|
23
|
+
SearXNG 实例的 URL 地址,这是启用联网搜索功能的必要配置。例如:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
SEARXNG_URL=https://searxng-instance.com
|
27
|
+
```
|
28
|
+
|
29
|
+
这个 URL 应该指向一个可用的 SearXNG 实例。您可以选择自行部署 SearXNG,或使用公共可用的 SearXNG 实例。
|
30
|
+
|
31
|
+
您可以在 [SearXNG 实例列表](https://searx.space/) 中找到公开可用的 SearXNG 实例。选择一个响应速度快、可靠性高的实例,然后将其 URL 配置到 LobeChat 中。
|
32
|
+
|
33
|
+
> 注意,使用的 `searxng` 必须开启 `json` 输出,否则 `lobe-chat` 调用会报错。
|
34
|
+
> 如果是自托管,类似下面这样,找到 `searxng` 的配置文件,追加 `json` 即可。
|
35
|
+
|
36
|
+
```bash
|
37
|
+
$ vi searxng/settings.yml
|
38
|
+
...
|
39
|
+
search:
|
40
|
+
formats:
|
41
|
+
- html
|
42
|
+
- json
|
43
|
+
```
|
44
|
+
|
45
|
+
# 验证联网搜索功能
|
46
|
+
|
47
|
+
配置完成后,您可以通过以下步骤验证联网搜索功能是否正常工作:
|
48
|
+
|
49
|
+
1. 重启 LobeChat 服务
|
50
|
+
2. 启动一个新的聊天,启动智能联网,之后向 AI 提问一个需要最新信息的问题,例如:"今天的实时金价是多少?"或"最近的重大新闻有哪些?"
|
51
|
+
3. 观察 AI 是否能够返回基于互联网搜索的最新信息
|
52
|
+
|
53
|
+
如果 AI 能够回答这些时效性问题,说明联网搜索功能已经成功配置。
|
54
|
+
|
55
|
+
## 参考资料
|
56
|
+
|
57
|
+
- [LobeChat 联网搜索 RFC 讨论](https://github.com/lobehub/lobe-chat/discussions/6447)
|
58
|
+
- [SearXNG GitHub 仓库](https://github.com/searxng/searxng)
|
59
|
+
- [SearXNG 开启 json 输出的讨论](https://github.com/searxng/searxng/discussions/3542)
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.79.
|
3
|
+
"version": "1.79.6",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -12,6 +12,16 @@ export const LobeXAI = LobeOpenAICompatibleFactory({
|
|
12
12
|
chatCompletion: {
|
13
13
|
// xAI API does not support stream_options: { include_usage: true }
|
14
14
|
excludeUsage: true,
|
15
|
+
handlePayload: (payload) => {
|
16
|
+
const { frequency_penalty, model, presence_penalty, ...rest } = payload;
|
17
|
+
|
18
|
+
return {
|
19
|
+
...rest,
|
20
|
+
frequency_penalty: model.includes('grok-3-mini') ? undefined : frequency_penalty,
|
21
|
+
model,
|
22
|
+
presence_penalty: model.includes('grok-3-mini') ? undefined : presence_penalty,
|
23
|
+
} as any;
|
24
|
+
},
|
15
25
|
},
|
16
26
|
debug: {
|
17
27
|
chatCompletion: () => process.env.DEBUG_XAI_CHAT_COMPLETION === '1',
|