I'm exploring LLMGraphTransformer, it works when try with ChatOpenAI
model = new ChatOpenAI({
temperature: 0,
model: "gpt-4-turbo-preview",
});
const llmGraphTransformer = new LLMGraphTransformer({
llm: model,
});
However when I try with GenAIChatModel it throws error, what models can I use and how to resolve this?
const model = new GenAIChatModel({
model_id: 'meta-llama/llama-3-70b-instruct', //
parameters: params,
configuration: {
apiKey: this.apiKey,
},
});
langchain-express/node_modules/@langchain/core/dist/language_models/chat_models.cjs:424
throw new Error(`Chat model must implement ".bindTools()" to use withStructuredOutput.`);
^
Error: Chat model must implement ".bindTools()" to use withStructuredOutput.
at GenAIChatModel.withStructuredOutput (/langchain-express/node_modules/@langchain/core/dist/language_models/chat_models.cjs:424:19)
at new LLMGraphTransformer (/langchain-express/node_modules/@langchain/community/dist/experimental/graph_transformers/llm.cjs:156:35)
I'm exploring LLMGraphTransformer, it works when try with ChatOpenAI
However when I try with GenAIChatModel it throws error, what models can I use and how to resolve this?