RepoSiliconFlowSiliconFlowpublished Jul 31, 2025seen 5d

siliconflow/langchain-siliconflow

Python

Open original ↗

Captured source

source ↗

siliconflow/langchain-siliconflow

Description: langchain partner package for siliconflow

Language: Python

License: MIT

Stars: 7

Forks: 0

Open issues: 0

Created: 2025-07-31T06:37:31Z

Pushed: 2025-12-12T05:14:06Z

Default branch: main

Fork: no

Archived: no

README:

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")

Notability

notability 2.0/10

Low-star new repo, routine.