Skip to content

Commit

Permalink
force messages keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnl committed Apr 2, 2024
1 parent 4560ae9 commit 20bb86d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/middleware/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ def dumb_rag(messages):
]


try:

@instructor.messages_middleware
def dumb_rag(x):
return x

except ValueError as e:
print("Correctly caught exception", e)


class User(BaseModel):
age: int
name: str
Expand Down

0 comments on commit 20bb86d

Please sign in to comment.