#LangChainJS, Google Auth, and Node
1 messages · Page 1 of 1 (latest)
@pale root - let's at least move it to this thread so we don't clutter up the main channel.
Did you try using --experimental-vm-modules?
Or possibly try using the combined ts-compiler / node thingie?
Allen, really sorry again for taking up your time, i solved this, i changed the javascript from common js to ESModules and the langchain error code was solved. The require issue i solved changing the require(path) to import(path), that way:
But really thanks for all the help ❤️
@silk monolith Sorry for the off topic, but do you know how i send instructions to Gemini with langchain?
I found how to i send the saffetySettings, but i didn't find how to send instructions
LangChain.js includes system instructions as part of the chat conversation. So however you're creating your chat, you want one of type SYSTEM
and this isn't taking up my time. it means I didn't document this well. {: which I know I didn't.
If you look at the getting started blog I mentioned, you can see setting that in getJoke:
async function getJoke(topic){
// Setup the prompt template
const template = "Tell me a joke about {topic}.";
const prompt = ChatPromptTemplate.fromMessages([
["system", "You are a comedian, and your specialty is telling short jokes about a topic."],
["human", template],
]);
I tried this, but when i pass a system, i receive this
Hmmm. I have a guess, but can't double check at moment. Might be were not handling flash right. There's a parameter to force it. But I don't remember if flash supports system instructions
But there is a parameter to force. Will check later.