TogetherEmbeddings
This will help you get started with Together embedding models using LangChain. For detailed documentation on TogetherEmbeddings
features and configuration options, please refer to the API reference.
Overview
Integration details
Provider | Package |
---|---|
Together | langchain-together |
Setup
To access Together embedding models you'll need to create a/an Together account, get an API key, and install the langchain-together
integration package.
Credentials
Head to https://api.together.xyz/ to sign up to Together and generate an API key. Once you've done this set the TOGETHER_API_KEY environment variable:
import getpass
import os
if not os.getenv("TOGETHER_API_KEY"):
os.environ["TOGETHER_API_KEY"] = getpass.getpass("Enter your Together API key: ")
If you want to get automated tracing of your model calls you can also set your LangSmith API key by uncommenting below:
# os.environ["LANGCHAIN_TRACING_V2"] = "true"
# os.environ["LANGCHAIN_API_KEY"] = getpass.getpass("Enter your LangSmith API key: ")
Installation
The LangChain Together integration lives in the langchain-together
package:
%pip install -qU langchain-together
[1m[[0m[34;49mnotice[0m[1;39;49m][0m[39;49m A new release of pip is available: [0m[31;49m24.0[0m[39;49m -> [0m[32;49m24.2[0m
[1m[[0m[34;49mnotice[0m[1;39;49m][0m[39;49m To update, run: [0m[32;49mpython -m pip install --upgrade pip[0m
Note: you may need to restart the kernel to use updated packages.