Skip to content

Commit

Permalink
Remove unnecessary else/if statements
Browse files Browse the repository at this point in the history
Make the code example cleaner and easier to read by removing unnecessary else/if statements.
  • Loading branch information
kostasx authored Jul 26, 2024
1 parent ee61340 commit c819bbb
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ Answer:`
const route = ({ topic }: { input: string; topic: string }) => {
if (topic.toLowerCase().includes("anthropic")) {
return anthropicChain;
} else if (topic.toLowerCase().includes("langchain")) {
}
if (topic.toLowerCase().includes("langchain")) {
return langChainChain;
} else {
return generalChain;
}
}
return generalChain;
};

const fullChain = RunnableSequence.from([
Expand Down

0 comments on commit c819bbb

Please sign in to comment.