From here, we can initialize our model:llm = Replicate(model="replicate/dolly-v2-12b:ef0e1aefc61f8e096ebe4db6b2bacc297daf2ef6899f0f7e001ec445893500e5")And run it:prompt = """Answer the following yes/no question by reasoning step by step.Can a dog drive a car?"""llm(prompt)We can call any Replicate model (not just LLMs) using this syntax. For example, we can call Stable Diffusion:text2image = Replicate(model="stability-ai/stable-diffusion:db21e45d3f7023abc2a46ee38a23973f6dce16bb082a930b0c49861f96d1e5bf", input={'image_dimensions':'512x512'})image_output = text2image("A cat riding a motorcycle by Picasso")PreviousRedisNextRoamInstallation and SetupCalling a modelCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.
This page covers how to run models on Replicate within LangChain.
This page covers how to run models on Replicate within LangChain. ->: From here, we can initialize our model:llm = Replicate(model="replicate/dolly-v2-12b:ef0e1aefc61f8e096ebe4db6b2bacc297daf2ef6899f0f7e001ec445893500e5")And run it:prompt = """Answer the following yes/no question by reasoning step by step.Can a dog drive a car?"""llm(prompt)We can call any Replicate model (not just LLMs) using this syntax. For example, we can call Stable Diffusion:text2image = Replicate(model="stability-ai/stable-diffusion:db21e45d3f7023abc2a46ee38a23973f6dce16bb082a930b0c49861f96d1e5bf", input={'image_dimensions':'512x512'})image_output = text2image("A cat riding a motorcycle by Picasso")PreviousRedisNextRoamInstallation and SetupCalling a modelCommunityDiscordTwitterGitHubPythonJS/TSMoreHomepageBlogCopyright ¬© 2023 LangChain, Inc.