Switch to actual instruction model. For debug, log entire object.
This commit is contained in:
@@ -3,13 +3,14 @@ import { GraphNode } from "@langchain/langgraph";
|
|||||||
import { MessagesState } from "../state";
|
import { MessagesState } from "../state";
|
||||||
import { ChatOllama } from "@langchain/ollama";
|
import { ChatOllama } from "@langchain/ollama";
|
||||||
import { hydratePrompt } from "../prompts/hydratePrompt";
|
import { hydratePrompt } from "../prompts/hydratePrompt";
|
||||||
|
import { logger } from "../utils/logger";
|
||||||
|
|
||||||
export function createModelNode(tools: any, promptPath: string): GraphNode<typeof MessagesState> {
|
export function createModelNode(tools: any, promptPath: string): GraphNode<typeof MessagesState> {
|
||||||
return async (state) => {
|
return async (state) => {
|
||||||
const sysPrompt = await hydratePrompt(promptPath, state);
|
const sysPrompt = await hydratePrompt(promptPath, state);
|
||||||
|
|
||||||
const model = new ChatOllama({
|
const model = new ChatOllama({
|
||||||
model: "qwen3.5:9b",
|
model: "llama3.1:8b-instruct-fp16",
|
||||||
temperature: 0.7,
|
temperature: 0.7,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -20,6 +21,8 @@ export function createModelNode(tools: any, promptPath: string): GraphNode<typeo
|
|||||||
...state.messages,
|
...state.messages,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
logger.error(response);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
messages: [response]
|
messages: [response]
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user