langchain-ark
Welcome to Volcengine Ark
Installation and Setup
Install the integration package:
pip install langchain-ark
Request an API key and set it as an environment variable
export ARK_API_KEY=...
export ARK_CHAT_MODEL=ep-...
export ARK_EMBEDDING_MODEL=ep-...
ChatModel Example:
import os
from langchain_ark.chat_models import ChatArk
from langchain_core.prompts import PromptTemplate
from langchain_core.output_parsers import StrOutputParser
prompt_template = PromptTemplate.from_template("Hello {role}")
llm = ChatArk(model=os.environ["ARK_CHAT_MODEL"])
parser = StrOutputParser()
chain = prompt_template | llm | parser
print(chain.invoke({"role": "Doubao"}))
Embeddings Example:
from langchain_ark.embeddings import ArkEmbeddings
ArkEmbeddings().embed_query("Volcengine ARK Doubao")
Metadata
Release files for langchain-ark 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| langchain_ark-0.1.5.tar.gz | 13.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_ark-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.9 kB
Release files / langchain_ark-0.1.5.tar.gz
| Download URL | langchain_ark-0.1.5.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17ed630cb2e28bc140f2aec326ee9a70d5a1eea4feced8b6c074b5e238b1f39f
|
|
BLAKE2b-256 checksum How to use checksums |
2c379a440fe048e414301d2a19d222f09042bbe930a0c2dac754bf89a892cbf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.10 Darwin/23.4.0
|
Release files / langchain_ark-0.1.5-py3-none-any.whl
| Download URL | langchain_ark-0.1.5-py3-none-any.whl |
|---|---|
| Size | 14.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16fc9af03770ff3678df60bb6b754e2c08f43d7c91ecc6f32bc347fd52dd4ad8
|
|
BLAKE2b-256 checksum How to use checksums |
9bfe8a010d6019ca3585b3b139d5fa2c4d29a149a6c88ff0fad202e65bf53d1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.10 Darwin/23.4.0
|