Skip to content

How can we further specify something for an AI model? #313

Answered by zzstoatzz
santiagobasulto asked this question in Q&A
Discussion options

You must be logged in to vote

hi @santiagobasulto - apologies for the late response 😅 . I haven't checked this section in a bit

you can add more color to the schema by using Field and its description, as well as a class docstring

from pydantic import BaseModel, Field

@ai_model
class Resume(BaseModel):
    """<A general description of how the fields should be parsed>"""
    first_name: str = Field(description="The first name of the resume owner")
    last_name: str = Field(description="The last name of the resume owner")
    phone_number: Optional[str] = Field(description="The phone number of the resume owner")
    email: str = Field(description="The email address of the resume owner")

and you can check what the schem…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@santiagobasulto
Comment options

Answer selected by santiagobasulto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants