Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsLLMsAI21Aleph AlphaAmazon API GatewayAnyscaleArceeAzure MLAzure OpenAIBaidu QianfanBananaBasetenBeamBedrockBittensorCerebriumAIChatGLMClarifaiCohereC TransformersCTranslate2DatabricksDeepInfraDeepSparseEden AIFireworksForefrontAIGCP Vertex AIGooseAIGPT4AllGradientHugging Face HubHugging Face Local PipelinesHuggingface TextGen InferenceJavelin AI Gateway TutorialJSONFormerKoboldAI APILlama.cppLLM Caching integrationsManifestMinimaxModalMosaicMLNLP CloudOctoAIOllamaOpaquePromptsOpenAIOpenLLMOpenLMPetalsPipelineAIPredibasePrediction GuardPromptLayer OpenAIRELLMReplicateRunhouseSageMakerEndpointStochasticAINebula (Symbl.ai)TextGenTitan TakeoffTogether AITongyi QwenvLLMWriterXorbits Inference (Xinference)YandexGPTChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsLLMsCerebriumAIOn this pageCerebriumAICerebrium is an AWS Sagemaker alternative. It also provides API access to several LLM models.This notebook goes over how to use Langchain with CerebriumAI.Install cerebrium‚ÄãThe cerebrium package is required to use the CerebriumAI API. Install cerebrium using pip3 install cerebrium.# Install the packagepip3 install cerebriumImports‚Äãimport osfrom langchain.llms import CerebriumAIfrom langchain.prompts import PromptTemplatefrom langchain.chains import LLMChainSet the Environment API Key‚ÄãMake sure to get your API key from CerebriumAI. See here. You are given a 1 hour free of serverless GPU compute to test different models.os.environ["CEREBRIUMAI_API_KEY"] = "YOUR_KEY_HERE"Create the CerebriumAI instance‚ÄãYou can specify different parameters such as the model endpoint url, max length, temperature, etc. You must provide an endpoint url.llm = CerebriumAI(endpoint_url="YOUR ENDPOINT URL
Cerebrium is an AWS Sagemaker alternative. It also provides API access to several LLM models.
Cerebrium is an AWS Sagemaker alternative. It also provides API access to several LLM models. ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsLLMsAI21Aleph AlphaAmazon API GatewayAnyscaleArceeAzure MLAzure OpenAIBaidu QianfanBananaBasetenBeamBedrockBittensorCerebriumAIChatGLMClarifaiCohereC TransformersCTranslate2DatabricksDeepInfraDeepSparseEden AIFireworksForefrontAIGCP Vertex AIGooseAIGPT4AllGradientHugging Face HubHugging Face Local PipelinesHuggingface TextGen InferenceJavelin AI Gateway TutorialJSONFormerKoboldAI APILlama.cppLLM Caching integrationsManifestMinimaxModalMosaicMLNLP CloudOctoAIOllamaOpaquePromptsOpenAIOpenLLMOpenLMPetalsPipelineAIPredibasePrediction GuardPromptLayer OpenAIRELLMReplicateRunhouseSageMakerEndpointStochasticAINebula (Symbl.ai)TextGenTitan TakeoffTogether AITongyi QwenvLLMWriterXorbits Inference (Xinference)YandexGPTChat modelsDocument loadersDocument transformersText embedding modelsVector storesRetrieversToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsLLMsCerebriumAIOn this pageCerebriumAICerebrium is an AWS Sagemaker alternative. It also provides API access to several LLM models.This notebook goes over how to use Langchain with CerebriumAI.Install cerebrium‚ÄãThe cerebrium package is required to use the CerebriumAI API. Install cerebrium using pip3 install cerebrium.# Install the packagepip3 install cerebriumImports‚Äãimport osfrom langchain.llms import CerebriumAIfrom langchain.prompts import PromptTemplatefrom langchain.chains import LLMChainSet the Environment API Key‚ÄãMake sure to get your API key from CerebriumAI. See here. You are given a 1 hour free of serverless GPU compute to test different models.os.environ["CEREBRIUMAI_API_KEY"] = "YOUR_KEY_HERE"Create the CerebriumAI instance‚ÄãYou can specify different parameters such as the model endpoint url, max length, temperature, etc. You must provide an endpoint url.llm = CerebriumAI(endpoint_url="YOUR ENDPOINT URL