mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
Add coveralls (#203)
This commit is contained in:
@@ -43,15 +43,16 @@ After validation with `llm_validator`
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
class QuestionAnswerNoEvil(BaseModel):
|
||||
question: str
|
||||
answer: Annotated[
|
||||
str,
|
||||
BeforeValidator(llm_validator("don't say objectionable things", openai_client=client))
|
||||
BeforeValidator(
|
||||
llm_validator("don't say objectionable things", openai_client=client)
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
try:
|
||||
qa = QuestionAnswerNoEvil(
|
||||
question="What is the meaning of life?",
|
||||
|
||||
Reference in New Issue
Block a user