Skip to content

Your code contains @async_model_validator and @async_field_validator, but it seems to be dead code #2528

Description

@Steve973

Is your feature request related to a problem? Please describe.
I want to validate cypher queries when the LLM generates parameters, but I want it to happen in the retry loop, if possible. The fact that you have async validator decorators indicates that you may be planning for async validation, but the code is not really connected to anything (apparently dead code).

Describe the solution you'd like
I would like to be able to use the async validator decorators and have instructor call them, and have them work for async functions.

Describe alternatives you've considered
I am trying manual validation, but that makes me accept bad input from the LLM and proceeding with it in some way, then only sending a message back with an error to try again, except it's disconnected from the original request. I also tried pydantic-async-validation, but it doesn't work, either. Neither does just putting the regular validator decorators on an async function.

Additional context
These seem to be the same validators in pydantic-async-validation, and if instructor worked with those, that would be fine, as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions