LangChain components for Dartmouth-hosted models.
Project description
Dartmouth LangChain
LangChain components for Dartmouth-hosted models.
Getting started
- Install the package:
pip install dartmouth-langchain
- Obtain a Dartmouth API key from developer.dartmouth.edu
- Store the API key as an environment variable called
DARTMOUTH_API_KEY
:
export DARTMOUTH_API_KEY=<your_key_here>
Using the library
Using a Dartmouth-hosted chat model:
from dartmouth_langchain import DartmouthChatModel
llm = DartmouthChatModel()
llm.invoke("<s>[INST] Hi there! [/INST]")
Note: Many chat models require the prompts to have a particular formatting to work correctly! The default model is a chat model from the Llama 2 family and thus requires the tags shown in the example above.
Using a Dartmouth-hosted embeddings model:
from dartmouth_langchain import DartmouthEmbeddingsModel
embeddings = DartmouthEmbeddingsModel()
embeddings.embed_query("Hello? Is there anybody in there?")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dartmouth_langchain-0.1.0.tar.gz
.
File metadata
- Download URL: dartmouth_langchain-0.1.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3894a8aa031a23a19076e5d384798b72f54baee3e443e0111119ff0aebbc9fb6 |
|
MD5 | 4fe228cd25256b32c7fcb9232dd858f8 |
|
BLAKE2b-256 | 78ea2993574139037b7d1adf9a9a4c6b7ebadb0973d2086e64ddadd813114b91 |
File details
Details for the file dartmouth_langchain-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: dartmouth_langchain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48269e2d1f8d3c2770e8fda84a895cf13a639028151069579a3294f392415d7c |
|
MD5 | 9c92ba68027994218b80d815f2130d59 |
|
BLAKE2b-256 | 80978b3bee71228ef935f8eeb54caf3b98d145551851e6cd84d2021ddb1f9b7c |