const json = {
  "id": "",
  "object": "",
  "created": 1,
  "model": "",
  "choices": [{
    "delta": {
      "content": "!"
    },
    "index": 0,
    "finish_reason": null
  }]
};
const contentValue = json.choices[0].delta.content;
console.log(contentValue); // "!"
id 	object 	created 1	model 	choices 		delta 			content !				index 0		finish_reason null	 用js代码提取上面这段json里的content字段里的值

原文地址: https://www.cveoy.top/t/topic/Nn1 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录