2025年4月21日15:12:31
parent
5fcb78176e
commit
02ec8bf376
|
|
@ -68,9 +68,9 @@
|
|||
## 使用指南
|
||||
|
||||
### 环境要求
|
||||
- Java 17 或更高版本
|
||||
- Ollama 服务已安装并运行
|
||||
- 系统内存建议 8GB 以上
|
||||
1. Java 17 或更高版本
|
||||
2. Ollama 服务已安装并运行
|
||||
3. 系统内存建议 8GB 以上
|
||||
|
||||
### 安装步骤
|
||||
1. 下载最新版本安装包
|
||||
|
|
@ -89,6 +89,8 @@
|
|||
- 建议定期备份重要对话
|
||||
- 注意网络连接状态
|
||||
|
||||
> 由于许多成熟的客户端较多,暂时放弃对此项目的维护
|
||||
|
||||
## 反馈与支持
|
||||
- 问题反馈请提交 Issue
|
||||
- 功能建议欢迎提交 PR
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import java.util.function.Consumer;
|
|||
public class ChatService {
|
||||
private final HttpClient client;
|
||||
private final ObjectMapper mapper;
|
||||
private final String BASE_URL = "http://localhost:8083/ai/v1/ollama/redis/chat";
|
||||
private final String BASE_URL = "http://localhost:8083/ai/chat";
|
||||
|
||||
public ChatService() {
|
||||
this.client = HttpClient.newBuilder()
|
||||
|
|
@ -33,7 +33,7 @@ public class ChatService {
|
|||
CompletableFuture.runAsync(() -> {
|
||||
try {
|
||||
String encodedMessage = URLEncoder.encode(message, StandardCharsets.UTF_8);
|
||||
String url = String.format("%s?input=%s&userId=%s", BASE_URL, encodedMessage,currentChat.getId());
|
||||
String url = String.format("%s?prompt=%s&chatId=%s", BASE_URL, encodedMessage,currentChat.getId());
|
||||
|
||||
HttpRequest request = HttpRequest.newBuilder()
|
||||
.uri(URI.create(url))
|
||||
|
|
|
|||
Loading…
Reference in New Issue