RChatSF
is an R package for calling the Siliconflow (硅基流动) API, enabling rapid interaction with various LLM models, including DeepSeek.
Once you create a Siliconflow account, you can enjoy efficient analysis workflows in R.
You can install the RChatSF from GitHub with:
# install.packages("devtools")
devtools::install_github("mumdark/RChatSF")
You can use the code below to execute the example:
library("RchatSF")
RchatSF("your api key",
model = "deepseek-ai/DeepSeek-R1",
max_tokens = 8190,
temperature = 0.6,
top_k = 50,
top_p = 0.7,
frequency_penalty = 0)
Note: When you encounter issues such as 504 errors due to "server congestion", we highly recommend using the pro
version of the model Pro/deepseek-ai/DeepSeek-R1
.
For more model options, please refer to:
This software is free and open-source, distributed under the MIT License.