instructor
instructor copied to clipboard
Skip field at run-time
Hi, Let's say I have class model with some fields in it:
class Response(BaseModel):
field_1: str
field_2: str
I am trying to update those fields while the conversation proceeds, I'd like to exclude the already populated fields just to try to populate the missing ones. For instance, after a bit, I'd like to pass something like:
class Response(BaseModel):
field_1: str
as field_2 was already populated in the previous part of the conversation.
I've seen there is the possibility to skip fields like this:
class Response(BaseModel):
question: str
answer: str
private_field: SkipJsonSchema[Union[str, None]] = None
how can I dynamically achieve something like that? Thank you!
I am also interested in this feature!