package deepseek;import java.util.List;public class DpResponseStreamBean {public static void main(String[] args) {String text = " {\"id\":\"ae03d116-d280-4876-be1c-38611768d26f\",\"object\":\"chat.completion.chunk\",\"created\":1741741240,\"model\":\"deepseek-chat\",\"system_fingerprint\":\"fp_3a5770e1b4_prod0225\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"提供\"},\"logprobs\":null,\"finish_reason\":null}]}";DpResponseStreamBean dpResponseStreamBean = DeepSeekUtils.getGson().fromJson(text, DpResponseStreamBean.class);System.out.println(dpResponseStreamBean);}/*** id : 1b74807d-a74d-478b-9a69-eb234f498843* object : chat.completion.chunk* created : 1741740256* model : deepseek-chat* system_fingerprint : fp_3a5770e1b4_prod0225* choices : [{"index":0,"delta":{"content":"尼斯"},"logprobs":null,"finish_reason":null}]*/private String id;private String object;private int created;private String model;private String system_fingerprint;/*** index : 0* delta : {"content":"尼斯"}* logprobs : null* finish_reason : null*/private List<ChoicesBean> choices;public String getId() {return id;}public void setId(String id) {this.id = id;}public String getObject() {return object;}public void setObject(String object) {this.object = object;}public int getCreated() {return created;}public void setCreated(int created) {this.created = created;}public String getModel() {return model;}public void setModel(String model) {this.model = model;}public String getSystem_fingerprint() {return system_fingerprint;}public void setSystem_fingerprint(String system_fingerprint) {this.system_fingerprint = system_fingerprint;}public List<ChoicesBean> getChoices() {return choices;}public void setChoices(List<ChoicesBean> choices) {this.choices = choices;}public static class ChoicesBean {private int index;/*** content : 尼斯*/private DeltaBean delta;private Object logprobs;private Object finish_reason;public int getIndex() {return index;}public void setIndex(int index) {this.index = index;}public DeltaBean getDelta() {return delta;}public void setDelta(DeltaBean delta) {this.delta = delta;}public Object getLogprobs() {return logprobs;}public void setLogprobs(Object logprobs) {this.logprobs = logprobs;}public Object getFinish_reason() {return finish_reason;}public void setFinish_reason(Object finish_reason) {this.finish_reason = finish_reason;}public static class DeltaBean {private String content;public String getContent() {return content;}public void setContent(String content) {this.content = content;}@Overridepublic String toString() {return "DeltaBean{" +"content='" + content + '\'' +'}';}}@Overridepublic String toString() {return "ChoicesBean{" +"index=" + index +", delta=" + delta +", logprobs=" + logprobs +", finish_reason=" + finish_reason +'}';}}@Overridepublic String toString() {return "DpResponseStreamBean{" +"id='" + id + '\'' +", object='" + object + '\'' +", created=" + created +", model='" + model + '\'' +", system_fingerprint='" + system_fingerprint + '\'' +", choices=" + choices +'}';}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。