mirror of
https://github.com/YuWanTingbb/unofficial-gpt4.git
synced 2025-10-13 13:45:06 +00:00
fix response BUG
This commit is contained in:
@@ -1416,7 +1416,7 @@ public class ChatController {
|
||||
String chat_message_id = resJson.getString("id");
|
||||
long timestamp = resJson.getLong("created");
|
||||
streamResponse.Choice choice = new streamResponse.Choice(0, new streamResponse.Delta(content), null);
|
||||
streamResponse streamResponse = new streamResponse(chat_message_id, "chat.completion.chunk", model, choice, timestamp);
|
||||
streamResponse streamResponse = new streamResponse(chat_message_id, model,"chat.completion.chunk", choice, timestamp);
|
||||
String tmpRes = "data: " + com.alibaba.fastjson.JSONObject.toJSONString(streamResponse) + "\n\n";
|
||||
out.print(tmpRes);
|
||||
out.flush();
|
||||
|
@@ -12,7 +12,7 @@ import lombok.NoArgsConstructor;
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JSONType(orders={"id","model","object","choices","created"})
|
||||
@JSONType(orders={"id","model","object","choice","created"})
|
||||
public class streamResponse {
|
||||
private String id;
|
||||
private String model;
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user