Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SUPPORT] json_schema does not work #1403

Open
luoweiwei0908 opened this issue Sep 11, 2024 · 0 comments
Open

[SUPPORT] json_schema does not work #1403

luoweiwei0908 opened this issue Sep 11, 2024 · 0 comments
Labels
support Questions about how to do something

Comments

@luoweiwei0908
Copy link

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
}
}
}
}

image

@luoweiwei0908 luoweiwei0908 added the support Questions about how to do something label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions about how to do something
Projects
None yet
Development

No branches or pull requests

1 participant