Class responsible for managing the interaction with the Replicate API. It handles the API key and model details, makes the actual API calls, and converts the API response into a format usable by the rest of the LangChain framework.
const model = new Replicate({ model: "replicate/flan-t5-xl:3ae0799123a1fe11f8c89fd99632f843fc5f7a761630160521c4253149754523",});const res = await model.invoke( "Question: What would be a good company name for a company that makes colorful socks?\nAnswer:");console.log({ res }); Copy
const model = new Replicate({ model: "replicate/flan-t5-xl:3ae0799123a1fe11f8c89fd99632f843fc5f7a761630160521c4253149754523",});const res = await model.invoke( "Question: What would be a good company name for a company that makes colorful socks?\nAnswer:");console.log({ res });
Optional
The key used to pass prompts to the model.
Generated using TypeDoc
Class responsible for managing the interaction with the Replicate API. It handles the API key and model details, makes the actual API calls, and converts the API response into a format usable by the rest of the LangChain framework.
Example