Skip to content

docs(langchain): create SiliconFlow provider entry #32342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/docs/integrations/providers/siliconflow.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# langchain-siliconflow

This package contains the LangChain integration with SiliconFlow

## Installation

```bash
pip install -U langchain-siliconflow
```

And you should configure credentials by setting the following environment variables:

```bash
export SILICONFLOW_API_KEY="your-api-key"
```

You can set the following environment variable to use the `.cn` endpoint:

```bash
export SILICONFLOW_BASE_URL="https://api.siliconflow.cn/v1"
```

## Chat Models

`ChatSiliconFlow` class exposes chat models from SiliconFlow.

```python
from langchain_siliconflow import ChatSiliconFlow

llm = ChatSiliconFlow()
llm.invoke("Sing a ballad of LangChain.")
```

## Embeddings

`SiliconFlowEmbeddings` class exposes embeddings from SiliconFlow.

```python
from langchain_siliconflow import SiliconFlowEmbeddings

embeddings = SiliconFlowEmbeddings()
embeddings.embed_query("What is the meaning of life?")
```
Loading