FEAT: implement temp version of main tooling feedback loop
This commit is contained in:
@@ -6,12 +6,12 @@ import { hydratePrompt } from "../prompts/hydratePrompt";
|
||||
|
||||
export function createModelNode(tools: any, promptPath: string): GraphNode<typeof MessagesState> {
|
||||
return async (state) => {
|
||||
const sysPrompt = hydratePrompt(promptPath, state.disinformationTitle)
|
||||
const sysPrompt = hydratePrompt(promptPath, state);
|
||||
|
||||
const model = new ChatOpenAI({
|
||||
model: "gpt-5-mini"
|
||||
});
|
||||
const modelWithTools = model.bindTools(tools);
|
||||
const modelWithTools = model.bindTools(Object.values(tools));
|
||||
|
||||
const response = await modelWithTools.invoke([
|
||||
new SystemMessage(
|
||||
|
||||
@@ -6,10 +6,6 @@ export function createToolNode(tools: any): GraphNode<typeof MessagesState> {
|
||||
return async (state) => {
|
||||
const lastMessage = state.messages.at(-1);
|
||||
|
||||
//STARTTEMP
|
||||
return {messages: [new AIMessage("yeman")]}
|
||||
//ENDTEMP
|
||||
|
||||
if (lastMessage == null || !AIMessage.isInstance(lastMessage)) {
|
||||
return { messages: [] };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user