Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsAleph AlphaAwaDBAzureOpenAIBaidu QianfanBedrockBGE on Hugging FaceClarifaiCohereDashScopeDeepInfraEDEN AIElasticsearchEmbaasERNIE Embedding-V1Fake EmbeddingsGoogle Vertex AI PaLMGPT4AllGradientHugging FaceInstructEmbeddingsJinaLlama-cppLLMRailsLocalAIMiniMaxModelScopeMosaicMLNLP CloudOllamaOpenAISageMakerSelf HostedSentence TransformersSpaCyTensorflowHubXorbits inference (Xinference)Vector storesRetrieversToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsText embedding modelsGradientOn this pageGradientGradient allows to create Embeddings as well fine tune and get completions on LLMs with a simple web API.This notebook goes over how to use Langchain with Embeddings of Gradient.Imports‚Äãfrom langchain.embeddings import GradientEmbeddingsSet the Environment API Key‚ÄãMake sure to get your API key from Gradient AI. You are given $10 in free credits to test and fine-tune different models.from getpass import getpassimport osif not os.environ.get("GRADIENT_ACCESS_TOKEN",None):    # Access token under https://auth.gradient.ai/select-workspace    os.environ["GRADIENT_ACCESS_TOKEN"] = getpass("gradient.ai access token:")if not os.environ.get("GRADIENT_WORKSPACE_ID",None):    # `ID` listed in `$ gradient workspace list`    # also displayed after login at at https://auth.gradient.ai/select-workspace    os.environ["GRADIENT_WORKSPACE_ID"] = getpass("gradient.ai workspace id:")Optional: Validate your environment variables GRADIENT_ACCESS_TOKEN and GRADIENT_WORKSPACE_ID to get currently deployed models. Using the gradientai Python package.pip install gradientaiCreate the Gradient instance‚Äãdocuments = ["Pizza is a dish.","Paris is the capital of France", "numpy is a lib for linear algebra"]query = "Where is
Gradient allows to create Embeddings as well fine tune and get completions on LLMs with a simple web API.
Gradient allows to create Embeddings as well fine tune and get completions on LLMs with a simple web API. ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKProvidersAnthropicAWSGoogleMicrosoftOpenAIMoreComponentsLLMsChat modelsDocument loadersDocument transformersText embedding modelsAleph AlphaAwaDBAzureOpenAIBaidu QianfanBedrockBGE on Hugging FaceClarifaiCohereDashScopeDeepInfraEDEN AIElasticsearchEmbaasERNIE Embedding-V1Fake EmbeddingsGoogle Vertex AI PaLMGPT4AllGradientHugging FaceInstructEmbeddingsJinaLlama-cppLLMRailsLocalAIMiniMaxModelScopeMosaicMLNLP CloudOllamaOpenAISageMakerSelf HostedSentence TransformersSpaCyTensorflowHubXorbits inference (Xinference)Vector storesRetrieversToolsAgents and toolkitsMemoryCallbacksChat loadersComponentsText embedding modelsGradientOn this pageGradientGradient allows to create Embeddings as well fine tune and get completions on LLMs with a simple web API.This notebook goes over how to use Langchain with Embeddings of Gradient.Imports‚Äãfrom langchain.embeddings import GradientEmbeddingsSet the Environment API Key‚ÄãMake sure to get your API key from Gradient AI. You are given $10 in free credits to test and fine-tune different models.from getpass import getpassimport osif not os.environ.get("GRADIENT_ACCESS_TOKEN",None):    # Access token under https://auth.gradient.ai/select-workspace    os.environ["GRADIENT_ACCESS_TOKEN"] = getpass("gradient.ai access token:")if not os.environ.get("GRADIENT_WORKSPACE_ID",None):    # `ID` listed in `$ gradient workspace list`    # also displayed after login at at https://auth.gradient.ai/select-workspace    os.environ["GRADIENT_WORKSPACE_ID"] = getpass("gradient.ai workspace id:")Optional: Validate your environment variables GRADIENT_ACCESS_TOKEN and GRADIENT_WORKSPACE_ID to get currently deployed models. Using the gradientai Python package.pip install gradientaiCreate the Gradient instance‚Äãdocuments = ["Pizza is a dish.","Paris is the capital of France", "numpy is a lib for linear algebra"]query = "Where is