Skip to content

Commit

Permalink
Merge pull request #82 from langchain-ai/revert-81-brace/tmp-special-…
Browse files Browse the repository at this point in the history
…routing

Revert "chore: Tmp special routing"
  • Loading branch information
bracesproul authored Jan 25, 2025
2 parents d855e5c + 6d5b59b commit 5e36212
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/agents/generate-post/generate-post-graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
import {
GeneratePostAnnotation,
GeneratePostConfigurableAnnotation,
GeneratePostInputAnnotation,
} from "./generate-post-state.js";
import { generateContentReport } from "./nodes/generate-report/index.js";
import { generatePost } from "./nodes/geterate-post/index.js";
Expand Down Expand Up @@ -71,17 +72,8 @@ function generateReportOrEndConditionalEdge(
return END;
}

function startOrInterrupt(
state: typeof GeneratePostAnnotation.State,
): "humanNode" | "authSocialsPassthrough" {
if (state.post && state.relevantLinks?.length && state.pageContents?.length) {
return "humanNode";
}
return "authSocialsPassthrough";
}

const generatePostBuilder = new StateGraph(
{ stateSchema: GeneratePostAnnotation, input: GeneratePostAnnotation },
{ stateSchema: GeneratePostAnnotation, input: GeneratePostInputAnnotation },
GeneratePostConfigurableAnnotation,
)
.addNode("authSocialsPassthrough", authSocialsPassthrough)
Expand All @@ -106,11 +98,7 @@ const generatePostBuilder = new StateGraph(
.addNode("updateScheduleDate", updateScheduledDate)

// Start node
// .addEdge(START, "authSocialsPassthrough")
.addConditionalEdges(START, startOrInterrupt, [
"authSocialsPassthrough",
"humanNode",
])
.addEdge(START, "authSocialsPassthrough")
.addEdge("authSocialsPassthrough", "verifyLinksSubGraph")

// After verifying the different content types, we should generate a report on them.
Expand Down

0 comments on commit 5e36212

Please sign in to comment.