The LangChain integration provides Chat and Embedding classes that automatically manage downloading models and starting servers.Install langchain-openai in your environment:
pip install langchain-openai
Only pip install packages in your conda environment once all other packages and their dependencies have been installed. For more information on installing pip packages in your conda environment, see Installing pip packages.
The AnacondaQuantizedLLM class is not currently supported due to llama.cpp limitations with the v1/completions endpoint. Use AnacondaQuantizedModelChat for chat completions and AnacondaQuantizedModelEmbeddings for embeddings.See llama.cpp discussion for details.
Here is a minimal setup example for using LangChain with Anaconda’s models:
from langchain.prompts import ChatPromptTemplatefrom anaconda_ai.integrations.langchain import AnacondaQuantizedModelChat, AnacondaQuantizedModelEmbeddingsprompt = ChatPromptTemplate.from_template("tell me a joke about {topic}")model = AnacondaQuantizedModelChat(model_name='meta-llama/llama-2-7b-chat-hf_Q4_K_M.gguf')chain = prompt | modelmessage = chain.invoke({'topic': 'python'})
To use an already running server, pass server/<server-name> as the model_name:
model = AnacondaQuantizedModelChat(model_name='server/my-server')
You can pass server configuration options using the extra_options parameter:
These options are passed directly to the inference server during startup.For more information on using the langchain-openai package, see the official documentation.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Anaconda","description":"Guides, tutorials, and reference material for Anaconda's Python, data science, and AI tools","colors":{"primary":"#1d6cf7","light":"#1d6cf7","dark":"#96f778"},"logo":{"light":"https://mintcdn.com/anaconda-29683c67/s-9WR15r5rZoaPqb/logo/light.svg?fit=max\u0026auto=format\u0026n=s-9WR15r5rZoaPqb\u0026q=85\u0026s=5996719b8530aaf065dc1ee1f39b2e67","dark":"https://mintcdn.com/anaconda-29683c67/s-9WR15r5rZoaPqb/logo/dark.svg?fit=max\u0026auto=format\u0026n=s-9WR15r5rZoaPqb\u0026q=85\u0026s=db482b1eac6af589d234160a76de3400","href":"https://www.anaconda.com/docs/main"},"favicon":"https://mintcdn.com/anaconda-29683c67/p8JNFuYYvTL8gfpM/favicon.png?fit=max\u0026auto=format\u0026n=p8JNFuYYvTL8gfpM\u0026q=85\u0026s=51a585758330bbe8f1ea032113854252","api":{"playground":{"display":"simple"}},"background":{"color":{"light":"#F7F8F9","dark":"#10121a"}},"navbar":{},"footer":{"socials":{"linkedin":"https://www.linkedin.com/company/anacondainc","github":"https://github.com/ContinuumIO","youtube":"https://www.youtube.com/c/ContinuumIo"},"links":[{"header":"Company","items":[{"label":"Anaconda Newsletter","href":"https://www.anaconda.com/newsletter"}]}]},"seo":{"metatags":{"canonical":"https://www.anaconda.com/docs"}},"styling":{"eyebrows":"breadcrumbs","latex":false},"integrations":{"ga4":{"measurementId":"G-VQTY6YKM6J"},"heap":{"appId":"758475466"}},"contextual":{"options":["claude","chatgpt","perplexity","cursor","vscode","add-mcp","copy"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"anaconda-29683c67","hasAudioNarration":false,"actualSubdomain":"anaconda-29683c67","customDomains":["anaconda.com"],"gitSource":{"type":"github","owner":"anaconda","repo":"documentation","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true,"contextualFeedback":{"allowEmail":true,"emailDisclaimer":"Your email will only be used to follow up on this feedback."}},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b00649f6c736afc6845f454","clientVersion":"0.0.4270","searchFilterCounts":[{"language":"default","tag":"Data Science \u0026 AI Workbench","count":240},{"language":"default","tag":"Package Security Manager","count":152},{"language":"default","tag":"Anaconda Platform","count":152},{"language":"default","tag":"Anaconda CLI","count":126},{"language":"default","tag":"Guides","count":105},{"language":"default","tag":"Platform Guides","count":86},{"language":"default","tag":"Package Security Manager (On-prem)","count":85},{"language":"default","tag":"Package Security Manager (6.8.0)","count":85},{"language":"default","tag":"Anaconda Desktop","count":82},{"language":"default","tag":"Anaconda CLI \u0026 MCP","count":79}],"searchSettings":{"isFiltersEnabled":true}},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":true,"email":"support@anaconda.com"}},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","href":"/docs/_mintlify/custom/anaconda-29683c67/68c5081e7d29c6a7/custom.css"}]}
{"page":{"pagePath":"cli-reference/anaconda-ai/integrations/langchain","slug":"/cli-reference/anaconda-ai/integrations/langchain","pageMetadata":{"title":"LangChain","searchDescription":"Use Anaconda AI models with LangChain for chat and embeddings.","keywords":["ai","navigator","sdk","langchain","integrations"],"description":null,"href":"/cli-reference/anaconda-ai/integrations/langchain"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const __snippet_BANNER_SIZES_1a1vhaj={sm:`px-4 py-2 text-sm gap-2`,md:`px-4 py-3 text-sm gap-3`,lg:`px-4 py-4 text-base gap-3`};const __snippet_BANNER_ICON_SIZES_1a1vhaj={sm:`h-4 w-4`,md:`h-4 w-4`,lg:`h-5 w-5`};const __snippet_BANNER_ICON_PATHS_1a1vhaj={info:`M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24v-64H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z`,success:`M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z`,warning:`M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 0 40.1S493.4 480 479.2 480H32.8c-14.2 0-27.3-7.5-34.5-19.8s-7.3-27.7 0-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0-64 0 32 32 0 1 0 64 0z`,danger:`M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z`};const __snippet_BANNER_STORAGE_PREFIX_1a1vhaj=`anaconda-banner-dismissed:`;const __snippet_getBannerStorageKey_1a1vhaj=banner=>{const content=banner.querySelector(`.anaconda-page-banner-content`)||banner;const text=(content.textContent||``).replace(/\\s+/g,` `).trim();let hash=5381;for(let i=0;i\u003ctext.length;i+=1){hash=(hash\u003c\u003c5)+hash+text.charCodeAt(i)|0}return`${__snippet_BANNER_STORAGE_PREFIX_1a1vhaj}${(hash>>>0).toString(36)}`};const __snippet_readBannerDismissed_1a1vhaj=key=>{try{return window.sessionStorage.getItem(key)===`true`}catch(error){return false}};const __snippet_writeBannerDismissed_1a1vhaj=key=>{try{window.sessionStorage.setItem(key,`true`)}catch(error){}};const Banner=({children,variant=`info`,size=`md`,dismissible=true,icon=true,className=``})=>{const[dismissed,setDismissed]=React.useState(false);const slotRef=React.useRef(null);const bannerRef=React.useRef(null);const storageKeyRef=React.useRef(null);const handleDismiss=()=>{setDismissed(true);if(storageKeyRef.current)__snippet_writeBannerDismissed_1a1vhaj(storageKeyRef.current)};React.useEffect(()=>{const banner=bannerRef.current;const slot=slotRef.current;if(!banner)return undefined;storageKeyRef.current=__snippet_getBannerStorageKey_1a1vhaj(banner);if(dismissible\u0026\u0026__snippet_readBannerDismissed_1a1vhaj(storageKeyRef.current)){setDismissed(true);return undefined}const navbar=document.getElementById(`navbar`);if(!navbar||!navbar.parentNode){banner.setAttribute(`data-banner-placement`,`inline`);return undefined}navbar.parentNode.insertBefore(banner,navbar.nextSibling);banner.setAttribute(`data-banner-placement`,`top`);const root=document.documentElement;const syncHeights=()=>{root.style.setProperty(`--anaconda-navbar-height`,`${navbar.offsetHeight}px`);root.style.setProperty(`--anaconda-banner-height`,`${banner.offsetHeight}px`)};syncHeights();const observer=typeof ResizeObserver!==`undefined`?new ResizeObserver(syncHeights):null;if(observer){observer.observe(navbar);observer.observe(banner)}return()=>{if(observer)observer.disconnect();root.style.removeProperty(`--anaconda-navbar-height`);root.style.removeProperty(`--anaconda-banner-height`);if(slot\u0026\u0026banner.parentNode!==slot){slot.appendChild(banner)}}},[]);const variantKey=__snippet_BANNER_ICON_PATHS_1a1vhaj[variant]?variant:`info`;const sizeClasses=__snippet_BANNER_SIZES_1a1vhaj[size]||__snippet_BANNER_SIZES_1a1vhaj.md;const iconClasses=__snippet_BANNER_ICON_SIZES_1a1vhaj[size]||__snippet_BANNER_ICON_SIZES_1a1vhaj.md;return _jsx(`div`,{ref:slotRef,className:`anaconda-page-banner-slot`,children:_jsx(`div`,{ref:bannerRef,role:variantKey===`danger`?`alert`:`status`,\"data-banner-variant\":variantKey,\"data-banner-dismissed\":dismissed?`true`:undefined,className:`anaconda-page-banner not-prose ${className}`,children:_jsxs(`div`,{className:`anaconda-page-banner-inner mint-flex mint-items-start ${sizeClasses}`,children:[icon\u0026\u0026_jsx(`span`,{className:`anaconda-page-banner-icon mint-shrink-0 mint-mt-0.5 ${iconClasses}`,children:_jsx(`svg`,{viewBox:`0 0 512 512`,fill:`currentColor`,className:`mint-h-full mint-w-full`,\"aria-hidden\":`true`,children:_jsx(`path`,{d:__snippet_BANNER_ICON_PATHS_1a1vhaj[variantKey]})})}),_jsx(`div`,{className:`anaconda-page-banner-content mint-min-w-0 mint-flex-1`,children}),dismissible\u0026\u0026_jsx(`button`,{type:`button`,onClick:handleDismiss,\"aria-label\":`Dismiss banner`,className:`anaconda-page-banner-dismiss mint-shrink-0 mint--mr-1 mint-rounded-md mint-p-1 mint-text-current mint-opacity-70 mint-transition-opacity hover:mint-opacity-100 focus-visible:mint-outline focus-visible:mint-outline-2 focus-visible:mint-outline-offset-2 focus-visible:mint-outline-current`,children:_jsx(`svg`,{viewBox:`0 0 384 512`,fill:`currentColor`,className:`mint-h-3.5 mint-w-3.5`,\"aria-hidden\":`true`,children:_jsx(`path`,{d:`M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z`})})})]})})})};function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_MdxComponentBoundary,{name:`Banner`,children:_jsx(Banner,{variant:`warning`,size:`md`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`anaconda-ai`}),` has reached `,_jsx(_components.a,{href:`/reference/policies-practices/software-version-support#end-of-life-eol`,children:`end of life`}),`. The anaconda-ai documentation will be removed on December 31, 2026.`]})})}),`\n`,_jsx(_components.p,{children:`The LangChain integration provides Chat and Embedding classes that automatically manage downloading models and starting servers.`}),`\n`,_jsxs(_components.p,{children:[`Install `,_jsx(_components.code,{children:`langchain-openai`}),` in your environment:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` langchain-openai`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Only `,_jsx(_components.code,{children:`pip install`}),` packages in your conda environment once all other packages and their dependencies have been installed. For more information on installing pip packages in your conda environment, see `,_jsx(_components.a,{href:`/getting-started/working-with-conda/packages/pip-install#using-pip-install-in-a-conda-environment`,children:`Installing pip packages`}),`.`]})}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`AnacondaQuantizedLLM`}),` class is not currently supported due to llama.cpp limitations with the v1/completions endpoint. Use `,_jsx(_components.code,{children:`AnacondaQuantizedModelChat`}),` for chat completions and `,_jsx(_components.code,{children:`AnacondaQuantizedModelEmbeddings`}),` for embeddings.`]}),_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`https://github.com/ggerganov/llama.cpp/discussions/9219`,children:`llama.cpp discussion`}),` for details.`]})]}),`\n`,_jsx(_components.p,{children:`Here is a minimal setup example for using LangChain with Anaconda’s models:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` langchain.prompts `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChatPromptTemplate`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` anaconda_ai.integrations.langchain `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AnacondaQuantizedModelChat, AnacondaQuantizedModelEmbeddings`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`prompt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ChatPromptTemplate.from_template(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"tell me a joke about `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{topic}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`model `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AnacondaQuantizedModelChat(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'meta-llama/llama-2-7b-chat-hf_Q4_K_M.gguf'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`chain `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` prompt `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`|`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` model`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`message `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chain.invoke({`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'topic'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'python'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`To use an already running server, pass `,_jsx(_components.code,{children:`server/\u003cserver-name>`}),` as the `,_jsx(_components.code,{children:`model_name`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`model `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AnacondaQuantizedModelChat(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'server/my-server'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`You can pass server configuration options using the `,_jsx(_components.code,{children:`extra_options`}),` parameter:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`model `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AnacondaQuantizedModelChat(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model_name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'meta-llama/llama-2-7b-chat-hf_Q4_K_M.gguf'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` extra_options`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'ctx_size'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4096`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'n_gpu_layers'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`20`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'temperature'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`These options are passed directly to the inference server during startup.`}),`\n`,_jsxs(_components.p,{children:[`For more information on using the `,_jsx(_components.code,{children:`langchain-openai`}),` package, see the `,_jsx(_components.a,{href:`https://github.com/langchain-ai/langchain/blob/master/README.md`,children:`official documentation`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{__snippet_BANNER_SIZES_1a1vhaj,__snippet_BANNER_ICON_SIZES_1a1vhaj,__snippet_BANNER_ICON_PATHS_1a1vhaj,__snippet_BANNER_STORAGE_PREFIX_1a1vhaj,__snippet_getBannerStorageKey_1a1vhaj,__snippet_readBannerDismissed_1a1vhaj,__snippet_writeBannerDismissed_1a1vhaj,Banner,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"LangChain","searchDescription":"Use Anaconda AI models with LangChain for chat and embeddings.","keywords":["ai","navigator","sdk","langchain","integrations"],"description":null,"href":"/cli-reference/anaconda-ai/integrations/langchain"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[165,1460,"undefined;const __snippet_BANNER_ICON_SIZES_1a1vhaj=undefined;const __snippet_BANNER_ICON_PATHS_1a1vhaj=undefined;const "],[1500,2024,"undefined;const __snippet_getBannerStorageKey_1a1vhaj=()=>null;const __snippet_readBannerDismissed_1a1vhaj=()=>null;cons"],[2065,5559,"()=>null;const Banner=()=>null;function "]]},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/anaconda-29683c67/b738e1eb47e9934c/_transcend.js","/docs/_mintlify/custom/anaconda-29683c67/3ca111da84ffed5d/docs-dropdown-tooltip.js","/docs/_mintlify/custom/anaconda-29683c67/a3d1c2dd97aa6593/toc-indicator.js"],"dynamicCss":".mint--mr-1 {\n margin-right: -0.25rem\n}\n.mint-mt-0\\.5 {\n margin-top: 0.125rem\n}\n.mint-flex {\n display: flex\n}\n.mint-h-3\\.5 {\n height: 0.875rem\n}\n.mint-h-full {\n height: 100%\n}\n.mint-w-3\\.5 {\n width: 0.875rem\n}\n.mint-w-full {\n width: 100%\n}\n.mint-min-w-0 {\n min-width: 0px\n}\n.mint-flex-1 {\n flex: 1 1 0%\n}\n.mint-shrink-0 {\n flex-shrink: 0\n}\n.mint-items-start {\n align-items: flex-start\n}\n.mint-rounded-md {\n border-radius: 0.375rem\n}\n.mint-p-1 {\n padding: 0.25rem\n}\n.mint-text-current {\n color: currentColor\n}\n.mint-opacity-70 {\n opacity: 0.7\n}\n.mint-transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms\n}\n.hover\\:mint-opacity-100:hover {\n opacity: 1\n}\n.focus-visible\\:mint-outline:focus-visible {\n outline-style: solid\n}\n.focus-visible\\:mint-outline-2:focus-visible {\n outline-width: 2px\n}\n.focus-visible\\:mint-outline-offset-2:focus-visible {\n outline-offset: 2px\n}\n.focus-visible\\:mint-outline-current:focus-visible {\n outline-color: currentColor\n}","subdomain":"anaconda-29683c67","siteName":"Anaconda","title":"LangChain - Anaconda","contextualStarterQuestions":[{"_id":"6aff66e3fd2217b0c16373a4","deploymentId":"6781700c5f1e7d2ac00fcc4a","questionText":"How do I use LangChain?","status":"active","generatedBy":"contextual","path":"cli-reference/anaconda-ai/integrations/langchain","createdAt":"2026-11-19T21:15:15.643Z","updatedAt":"2026-11-19T21:15:15.643Z","__v":0},{"_id":"6aff66e3fd2217b0c16373a6","deploymentId":"6781700c5f1e7d2ac00fcc4a","questionText":"How do I install LangChain?","status":"active","generatedBy":"contextual","path":"cli-reference/anaconda-ai/integrations/langchain","createdAt":"2026-11-19T21:15:15.643Z","updatedAt":"2026-11-19T21:15:15.643Z","__v":0},{"_id":"6aff66e3fd2217b0c16373a5","deploymentId":"6781700c5f1e7d2ac00fcc4a","questionText":"What is LangChain integration?","status":"active","generatedBy":"contextual","path":"cli-reference/anaconda-ai/integrations/langchain","createdAt":"2026-11-19T21:15:15.643Z","updatedAt":"2026-11-19T21:15:15.643Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{},"searchTabScopes":[{"product":"Getting Started","tab":"About Anaconda"},{"product":"Getting Started","tab":"Installation"},{"product":"Getting Started","tab":"Getting started guides"},{"product":"Getting Started","tab":"Working with conda"},{"product":"Package Security Manager","tab":"Package Security Manager (Cloud)"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.8.0"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.7.2"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.7.1"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.7.0"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.6.5"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.6.4"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.6.3"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.6.2"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.6.1"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.6.0"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.5.3"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.5.2"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.5.1"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.4.0"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.3.1"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.3.0"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.2.0"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.1.9"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.1.8"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.1.7"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.1.6"},{"product":"Package Security Manager","tab":"Package Security Manager (On-prem)","version":"6.1.4"},{"product":"Anaconda Platform","tab":"Guides"},{"product":"Anaconda Platform","tab":"Tutorials"},{"product":"Anaconda Platform","tab":"CLI Reference"},{"product":"Anaconda CLI \u0026 MCP","tab":"Anaconda CLI"},{"product":"Anaconda CLI \u0026 MCP","tab":"Anaconda MCP"},{"product":"Legacy applications","tab":"Anaconda Navigator"},{"product":"Legacy applications","tab":"Anaconda Toolbox Excel Add-in"}]},"lastModified":"2026-11-19T21:14:57.207Z","originalFileLocation":"cli-reference/anaconda-ai/integrations/langchain.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Anaconda\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/anaconda-29683c67/Q6mS5k5M0lNdBscF/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/anaconda-29683c67/Q6mS5k5M0lNdBscF/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/anaconda-29683c67/Q6mS5k5M0lNdBscF/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/anaconda-29683c67/Q6mS5k5M0lNdBscF/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/anaconda-29683c67/Q6mS5k5M0lNdBscF/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/anaconda-29683c67/Q6mS5k5M0lNdBscF/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/anaconda-29683c67/Q6mS5k5M0lNdBscF/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/anaconda-29683c67/Q6mS5k5M0lNdBscF/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/anaconda-29683c67/Q6mS5k5M0lNdBscF/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"LangChain - Anaconda\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Anaconda\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/langchain\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://anaconda-29683c67.mintlify.site/docs/_mintlify/api/og/v2?division=Integrations\u0026amp;title=LangChain\u0026amp;theme=7f7b55efd41022d147e41c35\u0026amp;signature=4f5e74b9f7e24c19215622875b7a449b0858544292ae9f9ab014d2668d6c3aa0\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"LangChain - Anaconda\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://anaconda-29683c67.mintlify.site/docs/_mintlify/api/og/v2?division=Integrations\u0026amp;title=LangChain\u0026amp;theme=7f7b55efd41022d147e41c35\u0026amp;signature=4f5e74b9f7e24c19215622875b7a449b0858544292ae9f9ab014d2668d6c3aa0\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/anaconda-29683c67/Q6mS5k5M0lNdBscF/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Anaconda\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1d6cf7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/langchain\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/cli-reference/anaconda-ai/integrations/langchain.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.anaconda.com/#organization\",\"name\":\"Anaconda\",\"url\":\"https://www.anaconda.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/anaconda-29683c67/s-9WR15r5rZoaPqb/logo/light.svg?fit=max\u0026auto=format\u0026n=s-9WR15r5rZoaPqb\u0026q=85\u0026s=5996719b8530aaf065dc1ee1f39b2e67\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.anaconda.com/docs#website\",\"name\":\"Anaconda\",\"url\":\"https://www.anaconda.com/docs\",\"publisher\":{\"@id\":\"https://www.anaconda.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/langchain#webpage\",\"url\":\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/langchain\",\"name\":\"LangChain\",\"dateModified\":\"2026-11-19T21:14:57.207Z\",\"isPartOf\":{\"@id\":\"https://www.anaconda.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/langchain#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/langchain#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"anaconda-ai\",\"item\":\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/getting-started\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integrations\",\"item\":\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/sagemaker\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"LangChain\",\"item\":\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/langchain\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/langchain#article\",\"headline\":\"LangChain\",\"name\":\"LangChain\",\"url\":\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/langchain\",\"mainEntityOfPage\":{\"@id\":\"https://www.anaconda.com/docs/cli-reference/anaconda-ai/integrations/langchain#webpage\"},\"dateModified\":\"2026-11-19T21:14:57.207Z\",\"keywords\":\"ai, navigator, sdk, langchain, integrations\",\"publisher\":{\"@id\":\"https://www.anaconda.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.anaconda.com/docs#website\"}}]}\u003c/script>","agentPointerHref":"/docs/cli-reference/anaconda-ai/integrations/langchain.md","siteName":"Anaconda","nav":{"global":null,"products":[{"product":"Anaconda Docs","icon":"https://mintlify.s3.us-west-1.amazonaws.com/anaconda-29683c67/images/anaconda-icon.svg","pages":[{"title":"Anaconda Docs","href":"/main"}]},{"product":"Getting Started","icon":"rocket-launch","pages":[{"title":"Getting Started","href":"/getting-started/main"}]},{"product":"Anaconda.org","icon":"globe","pages":[{"title":"Anaconda.org","href":"/anaconda-org/key-features"}]},{"product":"Anaconda Desktop","icon":"desktop","pages":[{"title":"Anaconda Desktop","href":"/anaconda-desktop/key-features"}]},{"product":"Package Security Manager","icon":"shield-check","versions":[{"version":"6.8.0"},{"version":"6.7.2"},{"version":"6.7.1"},{"version":"6.7.0"},{"version":"6.6.5"},{"version":"6.6.4"},{"version":"6.6.3"},{"version":"6.6.2"},{"version":"6.6.1"},{"version":"6.6.0"},{"version":"6.5.3"},{"version":"6.5.2"},{"version":"6.5.1"},{"version":"6.4.0"},{"version":"6.3.1"},{"version":"6.3.0"},{"version":"6.2.0"},{"version":"6.1.9"},{"version":"6.1.8"},{"version":"6.1.7"},{"version":"6.1.6"},{"version":"6.1.4"}],"pages":[{"title":"Package Security Manager","href":"/anaconda-platform/main"}]},{"product":"Anaconda Platform","icon":"layer-group","pages":[{"title":"Anaconda Platform","href":"/platform/main"}]},{"product":"Data Science \u0026 AI Workbench","icon":"chart-network","versions":[{"version":"5.9.0"},{"version":"5.8.1"},{"version":"5.8.0"},{"version":"5.7.1"},{"version":"5.7.0"},{"version":"5.6.2"},{"version":"5.6.1"},{"version":"5.6.0"},{"version":"5.5.2"},{"version":"5.5.1"}],"pages":[{"title":"Data Science \u0026 AI Workbench","href":"/data-science/latest/main"}]},{"product":"Anaconda CLI \u0026 MCP","icon":"terminal","tabs":[{"tab":"Anaconda CLI","groups":[{"group":"Anaconda CLI","pages":[{"title":"Getting started","href":"/cli-reference/anaconda-cli/getting-started"},{"group":"Commands","root":{"title":"Commands and configuration","sidebarTitle":"Commands","href":"/cli-reference/anaconda-cli/commands"},"pages":[{"group":"ana auth","root":{"title":"ana auth","href":"/cli-reference/anaconda-cli/commands/auth"},"pages":[{"title":"ana auth login","href":"/cli-reference/anaconda-cli/commands/login"},{"title":"ana auth logout","href":"/cli-reference/anaconda-cli/commands/logout"},{"title":"ana auth whoami","href":"/cli-reference/anaconda-cli/commands/whoami"},{"title":"ana auth api-key","href":"/cli-reference/anaconda-cli/commands/api-key"}]},{"group":"ana org","root":{"title":"ana org","href":"/cli-reference/anaconda-cli/commands/org"},"pages":[{"title":"ana org auth","href":"/cli-reference/anaconda-cli/commands/org-auth"},{"title":"ana org config","href":"/cli-reference/anaconda-cli/commands/org-config"},{"title":"ana org copy","href":"/cli-reference/anaconda-cli/commands/org-copy"},{"title":"ana org download","href":"/cli-reference/anaconda-cli/commands/org-download"},{"title":"ana org groups","href":"/cli-reference/anaconda-cli/commands/org-groups"},{"title":"ana org label","href":"/cli-reference/anaconda-cli/commands/org-label"},{"title":"ana org login","href":"/cli-reference/anaconda-cli/commands/org-login"},{"title":"ana org logout","href":"/cli-reference/anaconda-cli/commands/org-logout"},{"title":"ana org move","href":"/cli-reference/anaconda-cli/commands/org-move"},{"title":"ana org package","href":"/cli-reference/anaconda-cli/commands/org-package"},{"title":"ana org remove","href":"/cli-reference/anaconda-cli/commands/org-remove"},{"title":"ana org search","href":"/cli-reference/anaconda-cli/commands/org-search"},{"title":"ana org show","href":"/cli-reference/anaconda-cli/commands/org-show"},{"title":"ana org update","href":"/cli-reference/anaconda-cli/commands/org-update"},{"title":"ana org upload","href":"/cli-reference/anaconda-cli/commands/org-upload"},{"title":"ana org whoami","href":"/cli-reference/anaconda-cli/commands/org-whoami"},{"group":"ana org channel","root":{"title":"ana org channel","sidebarTitle":"Subcommand reference","href":"/cli-reference/anaconda-cli/commands/channel"},"pages":[{"title":"ana org channel list","sidebarTitle":"list","href":"/cli-reference/anaconda-cli/commands/channel-list"},{"title":"ana org channel create","sidebarTitle":"create","href":"/cli-reference/anaconda-cli/commands/channel-create"},{"title":"ana org channel remove","sidebarTitle":"remove","href":"/cli-reference/anaconda-cli/commands/channel-remove"},{"title":"ana org channel show","sidebarTitle":"show","href":"/cli-reference/anaconda-cli/commands/channel-show"},{"title":"ana org channel modify","sidebarTitle":"modify","href":"/cli-reference/anaconda-cli/commands/channel-modify"},{"title":"ana org channel upload","sidebarTitle":"upload","href":"/cli-reference/anaconda-cli/commands/channel-upload"},{"title":"anaconda channel remove-package","sidebarTitle":"remove-package","href":"/cli-reference/anaconda-cli/commands/channel-remove-package"},{"title":"ana org channel share","sidebarTitle":"share","href":"/cli-reference/anaconda-cli/commands/channel-share"},{"title":"ana org channel notice","sidebarTitle":"notice","href":"/cli-reference/anaconda-cli/commands/channel-notice"}]}]},{"group":"anaconda sites","root":{"title":"anaconda sites","sidebarTitle":"Subcommand reference","href":"/cli-reference/anaconda-cli/commands/sites"},"pages":[{"title":"anaconda sites list","sidebarTitle":"list","href":"/cli-reference/anaconda-cli/commands/sites-list"},{"title":"anaconda sites show","sidebarTitle":"show","href":"/cli-reference/anaconda-cli/commands/sites-show"},{"title":"anaconda sites add","sidebarTitle":"add","href":"/cli-reference/anaconda-cli/commands/sites-add"},{"title":"anaconda sites modify","sidebarTitle":"modify","href":"/cli-reference/anaconda-cli/commands/sites-modify"},{"title":"anaconda sites remove","sidebarTitle":"remove","href":"/cli-reference/anaconda-cli/commands/sites-remove"}]},{"group":"anaconda token","root":{"title":"anaconda token","sidebarTitle":"Subcommand reference","href":"/cli-reference/anaconda-cli/commands/token"},"pages":[{"title":"anaconda token install","sidebarTitle":"install","href":"/cli-reference/anaconda-cli/commands/token-install"},{"title":"anaconda token uninstall","sidebarTitle":"uninstall","href":"/cli-reference/anaconda-cli/commands/token-uninstall"},{"title":"anaconda token list","sidebarTitle":"list","href":"/cli-reference/anaconda-cli/commands/token-list"},{"title":"anaconda token config","sidebarTitle":"config","href":"/cli-reference/anaconda-cli/commands/token-config"},{"title":"anaconda token set","sidebarTitle":"set","href":"/cli-reference/anaconda-cli/commands/token-set"},{"title":"anaconda token remove","sidebarTitle":"remove","href":"/cli-reference/anaconda-cli/commands/token-remove"}]}]},{"title":"Authentication","href":"/cli-reference/anaconda-cli/authentication"},{"title":"Update the CLI","sidebarTitle":"Self update","href":"/cli-reference/anaconda-cli/self-update"},{"title":"Anaconda CLI features","sidebarTitle":"Features","href":"/cli-reference/anaconda-cli/features"},{"title":"Install and manage tools","sidebarTitle":"Tools","href":"/cli-reference/anaconda-cli/tools"},{"title":"Configure MCP clients","sidebarTitle":"MCP","href":"/cli-reference/anaconda-cli/mcp"},{"title":"Troubleshooting","href":"/cli-reference/anaconda-cli/troubleshooting"},{"title":"Release notes","sidebarTitle":"Release notes","href":"/cli-reference/anaconda-cli/release-notes"}]},{"group":"CI/CD","pages":[{"title":"Anaconda GitHub Actions","href":"/cli-reference/anaconda-cli/github-actions"}]},{"group":"anaconda-ai","pages":[{"title":"Getting started","href":"/cli-reference/anaconda-ai/getting-started"},{"group":"Commands","root":{"title":"Command reference","href":"/cli-reference/anaconda-ai/commands/index"},"pages":[{"title":"anaconda ai models","sidebarTitle":"models","href":"/cli-reference/anaconda-ai/commands/models"},{"title":"anaconda ai download","sidebarTitle":"download","href":"/cli-reference/anaconda-ai/commands/download"},{"title":"anaconda ai remove","sidebarTitle":"remove","href":"/cli-reference/anaconda-ai/commands/remove"},{"title":"anaconda ai launch","sidebarTitle":"launch","href":"/cli-reference/anaconda-ai/commands/launch"},{"title":"anaconda ai servers","sidebarTitle":"servers","href":"/cli-reference/anaconda-ai/commands/servers"},{"title":"anaconda ai stop","sidebarTitle":"stop","href":"/cli-reference/anaconda-ai/commands/stop"},{"title":"anaconda ai launch-vectordb","sidebarTitle":"launch-vectordb","href":"/cli-reference/anaconda-ai/commands/launch-vectordb"},{"title":"anaconda ai stop-vectordb","sidebarTitle":"stop-vectordb","href":"/cli-reference/anaconda-ai/commands/stop-vectordb"},{"title":"anaconda ai delete-vectordb","sidebarTitle":"delete-vectordb","href":"/cli-reference/anaconda-ai/commands/delete-vectordb"},{"title":"anaconda ai list-tables","sidebarTitle":"list-tables","href":"/cli-reference/anaconda-ai/commands/list-tables"},{"title":"anaconda ai create-table","sidebarTitle":"create-table","href":"/cli-reference/anaconda-ai/commands/create-table"},{"title":"anaconda ai drop-table","sidebarTitle":"drop-table","href":"/cli-reference/anaconda-ai/commands/drop-table"},{"title":"anaconda ai config","sidebarTitle":"config","href":"/cli-reference/anaconda-ai/commands/config"},{"title":"anaconda ai version","sidebarTitle":"version","href":"/cli-reference/anaconda-ai/commands/version"}]},{"title":"Anaconda AI MCP","href":"/cli-reference/anaconda-ai/anaconda-ai-mcp"},{"group":"SDK","root":{"title":"Anaconda AI SDK Overview","href":"/cli-reference/anaconda-ai/sdk/overview"},"pages":[{"title":"Models","href":"/cli-reference/anaconda-ai/sdk/models"},{"title":"Servers","href":"/cli-reference/anaconda-ai/sdk/servers"},{"title":"Vector database","href":"/cli-reference/anaconda-ai/sdk/sdk-vectordb"}]},{"group":"Integrations","pages":[{"title":"Amazon SageMaker","description":null,"href":"/cli-reference/anaconda-ai/integrations/sagemaker"},{"title":"LangChain","href":"/cli-reference/anaconda-ai/integrations/langchain"},{"title":"LlamaIndex","description":null,"href":"/cli-reference/anaconda-ai/integrations/llamaindex"},{"title":"LiteLLM","href":"/cli-reference/anaconda-ai/integrations/litellm"},{"title":"DSPy","href":"/cli-reference/anaconda-ai/integrations/dspy"},{"title":"PydanticAI","href":"/cli-reference/anaconda-ai/integrations/pydanticai"},{"title":"Instructor","href":"/cli-reference/anaconda-ai/integrations/instructor"},{"title":"Panel","href":"/cli-reference/anaconda-ai/integrations/panel"},{"title":"LLM","href":"/cli-reference/anaconda-ai/integrations/llm"}]},{"title":"Release notes","href":"/cli-reference/anaconda-ai/release-notes"}]}]},{"tab":"Anaconda MCP","pages":[{"title":"Anaconda MCP","href":"/cli-reference/anaconda-mcp/main"}]}]},{"product":"Legacy applications","icon":"window-restore","pages":[{"title":"Legacy applications","href":"/legacy/anaconda-navigator/main"}]},{"product":"Reference","icon":"book","pages":[{"title":"Reference","href":"/reference/release-notes"}]},{"product":"Support \u0026 Troubleshooting","icon":"headset","pages":[{"title":"Support \u0026 Troubleshooting","href":"/reference/help-support"}]},{"product":"Repository Managers","hidden":true,"pages":[{"title":"Repository Managers","href":"/repo-managers/main"}]}]},"basePath":"","title":"LangChain - Anaconda","deploymentId":"dpl_53YqbBPsHdrqSGqXiWPGU7csRVod","buildId":"dpl_53YqbBPsHdrqSGqXiWPGU7csRVod","dynamics":[],"chunks":[]}