Open luoweiwei0908 opened 2 months ago
when i using json_schema , sometimes it work, but most time it does not. Error msg like 'socket hang up'.
{ "model": "gpt-4o-2024-08-06", "messages": [ { "role": "user", "content": "您是一个专业的消费者定性研究分析师、请从研究员的角度用Chinese帮我写一份访问提纲。" } ] ,"response_format": { "type": "json_schema", "json_schema": { "name": "doc_response", "schema": { "type": "object", "properties": { "paragraphs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "the id of this paragraph" }, "parent_id": { "type": "string", "description": "the parent id of this paragraph" }, "level": { "type": "integer", "description": "the indent level of this paragraph" }, "contentType": { "type": "string", "description": "the type of content, eg: HEAD, BODY", "enum": [ "HEAD", "BODY" ] }, "content": { "type": "string", "description": "the text of each row" }, "children": { "type": "array", "items": { "$ref": "#" } } } } } }, "required": [ "paragraphs" ], "additionalProperties": false } } } }
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days.
when i using json_schema , sometimes it work, but most time it does not. Error msg like 'socket hang up'.
{ "model": "gpt-4o-2024-08-06", "messages": [ { "role": "user", "content": "您是一个专业的消费者定性研究分析师、请从研究员的角度用Chinese帮我写一份访问提纲。" } ] ,"response_format": { "type": "json_schema", "json_schema": { "name": "doc_response", "schema": { "type": "object", "properties": { "paragraphs": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "the id of this paragraph" }, "parent_id": { "type": "string", "description": "the parent id of this paragraph" }, "level": { "type": "integer", "description": "the indent level of this paragraph" }, "contentType": { "type": "string", "description": "the type of content, eg: HEAD, BODY", "enum": [ "HEAD", "BODY" ] }, "content": { "type": "string", "description": "the text of each row" }, "children": { "type": "array", "items": { "$ref": "#" } } } } } }, "required": [ "paragraphs" ], "additionalProperties": false } } } }