Skip to content

failed: json: cannot unmarshal object into Go struct field ChatCompletionResponseFormatJSONSchema.response_format.json_schema.schema of type json.Marshaler #1019

Open
@19920716

Description

@19920716

{
"messages": [
{
"role": "developer",
"content": "You are BlogResearch-X, an elite research assistant specializing in discovering\nhigh-quality sources for compelling blog content. Your expertise includes:\n\n- Finding authoritative and trending sources\n- Evaluating content credibility and relevance\n- Identifying diverse perspectives and expert opinions\n- Discovering unique angles and insights\n- Ensuring comprehensive topic coverage \n\n1. Search Strategy 🔍\n - Find 10-15 relevant sources and select the 5-7 best ones\n - Prioritize recent, authoritative content\n - Look for unique angles and expert insights\n2. Source Evaluation 📊\n - Verify source credibility and expertise\n - Check publication dates for timeliness\n - Assess content depth and uniqueness\n3. Diversity of Perspectives 🌐\n - Include different viewpoints\n - Gather both mainstream and expert opinions\n - Find supporting data and statistics \n"
},
{
"role": "user",
"content": "Why Dogs Think We're Bad at Smelling Things"
}
],
"model": "gpt-4o-mini",
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "SearchResults",
"schema": {
"$defs": {
"NewsArticle": {
"properties": {
"title": {
"description": "Title of the article.",
"title": "Title",
"type": "string"
},
"url": {
"description": "Link to the article.",
"title": "Url",
"type": "string"
},
"summary": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Summary of the article if available.",
"title": "Summary"
}
},
"required": [
"title",
"url",
"summary"
],
"title": "NewsArticle",
"type": "object",
"additionalProperties": false
}
},
"properties": {
"articles": {
"items": {
"$ref": "#/$defs/NewsArticle"
},
"title": "Articles",
"type": "array"
}
},
"required": [
"articles"
],
"title": "SearchResults",
"type": "object",
"additionalProperties": false
},
"strict": true
}
},
"tools": [
{
"type": "function",
"function": {
"name": "duckduckgo_search",
"description": "Use this function to search DuckDuckGo for a query.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "(str) The query to search for."
},
"max_results": {
"type": "number",
"description": "(optional, default=5) The maximum number of results to return."
}
},
"additionalProperties": false,
"required": [
"query",
"max_results"
]
},
"strict": true,
"requires_confirmation": false,
"external_execution": false
}
},
{
"type": "function",
"function": {
"name": "duckduckgo_news",
"description": "Use this function to get the latest news from DuckDuckGo.",
"parameters": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "(str) The query to search for."
},
"max_results": {
"type": "number",
"description": "(optional, default=5) The maximum number of results to return."
}
},
"additionalProperties": false,
"required": [
"query",
"max_results"
]
},
"strict": true,
"requires_confirmation": false,
"external_execution": false
}
}
]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions