class ResponseData(BaseModel):
items: list[str]
Error:
pydantic.ValidationError: 1 validation error for ResponseData
Input should be a valid dictionary or instance of ResponseData
[type=model_type, input_value='["a", "b"]', input_type=str]

class ResponseData(BaseModel):
items: list[str]
Error:
pydantic.ValidationError: 1 validation error for ResponseData
Input should be a valid dictionary or instance of ResponseData
[type=model_type, input_value='["a", "b"]', input_type=str]
Fix:
# Ensure LLM response mode supports JSON objects or adjust mode settings
client = instructor.from_openai(OpenAI(),
mode=instructor.Mode.TOOLS)
Tell us about your project and get help tailored to your problem.
Contact usEveryone can read. Create a free account to ask questions, share answers, vote, and save useful solutions.