The script below produces:
{
"error": {
"message": "The server had an error while processing your request. Sorry about that!",
"type": "server_error",
"param": "constrained_sampling_spec_data",
"code": null
}
}
Here is the script:
curl https://api.openai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-d '{
"input": "Please generate a good complete example resume based on the resume description and/or job description below. If the resume description and/or job description have enough information for you to generate an example resume, then call the function \"example_resume\" with the data of the example resume. But if there isn’t enough information for you to generate an example resume, then don’t call the function but instead respond with text explaining the issue.\n\nHere is the resume description delimited by triple quotes:\n\n\"\"\"\njava programmer\n\"\"\"\n\nHere is the job description delimited by triple quotes:\n\n\"\"\"\n\n\"\"\"\n",
"tools": [
{
"type": "function",
"name": "example_resume",
"description": "Provide an example resume. Note that there is no person’s name, location, or contact info. These will be filled in with generic info before presenting the resume to the user.",
"parameters": {
"type": "object",
"description": "Data of an example resume",
"properties": {
"occupation": {
"type": "string",
"description": "The job title (occupation) of the person in the resume"
},
"blocks": {
"type": "array",
"description": "A list of the sections of the resume. Note that the category of each item can only be 1 of the 3 constant values listed below. For any category other than \"summary\", \"work_experience\", or \"education\", use category \"text\" and set the title to describe the category.",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"summary": {
"type": "string",
"format": "html",
"description": "The summary text of the resume in HTML format."
},
"category": {
"type": "string",
"const": "summary"
},
"title": {
"type": "string",
"description": "The title of this summary section"
}
},
"required": [
"category",
"title",
"description"
],
"description": "The summary section of the resume."
},
{
"type": "object",
"properties": {
"work_experience": {
"type": "array",
"description": "A list of jobs held",
"items": {
"type": "object",
"description": "One job",
"properties": {
"job_title": {
"type": "string",
"description": "The title of the job held"
},
"company": {
"type": "string",
"description": "The company worked for"
},
"location": {
"type": "string",
"description": "Where the job was"
},
"from_month": {
"type": "string",
"pattern": "^(|[A-Z][a-z]{2})$",
"description": "Month of the starting date"
},
"from_year": {
"type": "string",
"pattern": "^(|[0-9]{4})$",
"description": "Year of the starting date"
},
"to_month": {
"type": "string",
"pattern": "^(|[A-Z][a-z]{2}|Current)$",
"description": "Month of the ending date"
},
"to_year": {
"type": "string",
"pattern": "^(|[0-9]{4})$",
"description": "Year of the ending date"
},
"description": {
"type": "string",
"format": "html",
"description": "The full description of the job"
}
}
}
},
"category": {
"type": "string",
"const": "work_experience"
},
"title": {
"type": "string",
"description": "The title of this work experience section"
}
}
},
{
"type": "object",
"properties": {
"education": {
"type": "array",
"description": "A list of schools attended",
"items": {
"type": "object",
"description": "One school",
"properties": {
"field_of_study": {
"type": "string",
"description": "The degree and field of study"
},
"school": {
"type": "string",
"description": "The name of the school"
},
"location": {
"type": "string",
"description": "The location of the school"
},
"start_year": {
"type": "string",
"pattern": "^(|[0-9]{4})$",
"description": "The start year"
},
"grad_year": {
"type": "string",
"pattern": "^(|[0-9]{4}|Current)$",
"description": "The graduation year"
},
"description": {
"type": "string",
"format": "html",
"description": "Relevant text about the school"
}
}
}
},
"category": {
"type": "string",
"const": "education"
},
"title": {
"type": "string",
"description": "The title of this education section"
}
}
},
{
"type": "object",
"description": "A section of the resume other than summary, work_experience, or education",
"properties": {
"text": {
"type": "string",
"format": "html",
"description": "The content of the section"
},
"category": {
"type": "string",
"const": "text",
"description": "This value must be \"text\"."
},
"title": {
"type": "string",
"description": "The title of the section"
}
}
}
]
}
}
}
}
}
],
"store": false,
"model": "gpt-4o"
}
'
(This would have been nicer as a file attachment, but I can’t do that here I guess.)