From 4e01a7b4edbb120427c78056d8a37ead6a83ea55 Mon Sep 17 00:00:00 2001 From: Chong Ruan Date: Fri, 10 May 2024 13:59:57 +0800 Subject: [PATCH] Update README.md LangChain support --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 6049440..7beb8de 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,19 @@ generated_text = [output.outputs[0].text for output in outputs] print(generated_text) ``` +### LangChain Support +Since our API is compatible with OpenAI, you can easily use it in [langchain](https://www.langchain.com/). +Here is an example: + +``` +from langchain_openai import ChatOpenAI +llm = ChatOpenAI( + model='deepseek-chat', + openai_api_key=, + openai_api_base='https://api.deepseek.com/v1', + temperature=0.85, + max_tokens=8000) +``` ## 8. License This code repository is licensed under [the MIT License](LICENSE-CODE). The use of DeepSeek-V2 Base/Chat models is subject to [the Model License](LICENSE-MODEL). DeepSeek-V2 series (including Base and Chat) supports commercial use.