ComponentsText 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 Paris?"embeddings = GradientEmbeddings(    model="bge-large")documents_embedded = embeddings.embed_documents(documents)query_result = embeddings.embed_query(query)# (demo) compute similarityimport numpy as npscores = np.array(documents_embedded) @ np.array(query_result).Tdict(zip(documents, scores))PreviousGPT4AllNextHugging FaceImportsSet the Environment API KeyCreate the Gradient instance