Add ROBERTA classifier ranking PoC, with 77pc off the bat
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { GraphNode } from "@langchain/langgraph";
|
||||
import { MessagesState } from "../state";
|
||||
import { AIMessage } from "@langchain/core/messages";
|
||||
import { evaluateWithRoberta } from "../tools/robertaCall";
|
||||
|
||||
export const robertaMetrics: GraphNode<typeof MessagesState> = async (state) => {
|
||||
const answer = state.proposedTriggerEvent[state.proposedTriggerEventIndex].Event
|
||||
|
||||
const result = await evaluateWithRoberta({answer})
|
||||
|
||||
return {
|
||||
messages: [ new AIMessage("ROBERTA:" + result)]
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user