Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libs/langchain/src/agents/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ import {
* contextSchema: z.object({
* userId: z.string(),
* }),
* beforeModel: async (state, runtime, controls) => {
* beforeModel: async (state, runtime) => {
* if (!state.isAuthenticated) {
* return controls.terminate(new Error("Not authenticated"));
* throw new Error("Not authenticated")
* }
* },
* });
Expand Down
Loading