langchain-siliconflow
This package contains the LangChain integration with SiliconFlow
Installation
pip install -U langchain-siliconflow
And you should configure credentials by setting the following environment variables:
export SILICONFLOW_API_KEY="your-api-key"
You can set the following environment variable to use the .cn endpoint:
export SILICONFLOW_BASE_URL="https://api.siliconflow.cn/v1"
Chat Models
ChatSiliconFlow class exposes chat models from SiliconFlow.
from langchain_siliconflow import ChatSiliconFlow
llm = ChatSiliconFlow()
llm.invoke("Sing a ballad of LangChain.")
Embeddings
SiliconFlowEmbeddings class exposes embeddings from SiliconFlow.
from langchain_siliconflow import SiliconFlowEmbeddings
embeddings = SiliconFlowEmbeddings()
embeddings.embed_query("What is the meaning of life?")
LLMs
SiliconFlowLLM class exposes LLMs from SiliconFlow.
from langchain_siliconflow import SiliconFlowLLM
llm = SiliconFlowLLM()
llm.invoke("The meaning of life is")
Metadata
Release files for langchain-siliconflow 1.0.0
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_siliconflow-1.0.0.tar.gz | 282.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| langchain_siliconflow-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 297.7 kB
Release files / langchain_siliconflow-1.0.0.tar.gz
| Download URL | langchain_siliconflow-1.0.0.tar.gz |
|---|---|
| Size | 282.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b3cdda0b9b76ee824fb1efa752433a761dae5c3f421a15cd790ae77ec288eca
|
|
BLAKE2b-256 checksum How to use checksums |
6f4612f8430cb9222812110030004c1d1db4ffd6d6996205c77e7e07000f890e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.12
|
Release files / langchain_siliconflow-1.0.0-py3-none-any.whl
| Download URL | langchain_siliconflow-1.0.0-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d51a8fddcd1cec395079efde669b26cacd214fae90ebb37ab3ae31cb52d7798
|
|
BLAKE2b-256 checksum How to use checksums |
4e9a64e17e7ce3714d91942430c434de77e16e4446cb9d46ac99ed24e1205b1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.12
|