Replies: 1 comment
-
Please try setting the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi ,
I am using the openai gpt 4 o mini with pydantic model . But I keep getting this error.
{
"detail": "500: Error code: 400 - {'error': {'message': "Invalid schema for response_format 'default': In context=(), 'additionalProperties' is required to be supplied and to be false.", 'type': 'invalid_request_error', 'param': 'response_format', 'code': None}}"
}
My Code :
model = models.openai(
"gpt-4o-mini",
api_key=get_env_variable("OpenAI-Key-v2"),
)
generator = generate.json(model, SkillInto)
prompt = f"""
Create a skill template for a new skill with the following description:
{query.skillDescription}
from enum import Enum
from pydantic import BaseModel, conint, constr
class SkillCategory(str, Enum):
sports = "Sports"
music = "Music"
other = "Other"
class SkillInto(BaseModel):
skillName: str
skillDesc: str
category: SkillCategory
Beta Was this translation helpful? Give feedback.
All reactions