You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@nlp
@dataclass
class Person:
"""Extract personal info"""
name: str
age: int
person = Person.from_natural_language("Hi i am serkan.")
print(person)
The code above throws the exception openai_functions.exceptions.BrokenSchemaError: 'OpenAI returned a response that did not match the schema: None does not match {'type': 'integer'} or hallucinates empty fields. I want the code to repeatedly prompt the user to fill in all the fields.
Is it achievable with this library ?
The text was updated successfully, but these errors were encountered:
serkancancaglayan
changed the title
Pydantic from natural language, repetitive asking until every field is filled
data class from natural language, repetitive asking until every field is filled
Dec 10, 2024
The code above throws the exception openai_functions.exceptions.BrokenSchemaError: 'OpenAI returned a response that did not match the schema: None does not match {'type': 'integer'} or hallucinates empty fields. I want the code to repeatedly prompt the user to fill in all the fields.
Is it achievable with this library ?
The text was updated successfully, but these errors were encountered: