Structured output fix

colored-output
Nicolas Nahas 6 months ago
parent 33ee2e5a40
commit 7f68747f81

@ -50,7 +50,7 @@ def base_model_to_openai_function(
schema = pydantic_type.model_json_schema()
# Fetch the name of the class
name = type(pydantic_type).__name__
name = pydantic_type.__name__
docstring = parse(pydantic_type.__doc__ or "")
parameters = {
@ -73,8 +73,8 @@ def base_model_to_openai_function(
schema["description"] = docstring.short_description
else:
schema["description"] = (
f"Correctly extracted `{name}` with all "
f"the required parameters with correct types"
f"Strictly adhere to `{name}`'s format with all "
f"the required parameters and using the correct types"
)
_remove_a_key(parameters, "title")

Loading…
Cancel
Save