The ChatWithReasoningDeepSeekExample demonstrates an interactive chat session using the DeepSeek Reasoner model, focusing on eliciting thoughtful and reasoned responses from the AI.
public async Task Start()
{
DeepSeekExample.Setup(); //We need to provide DeepSeek API key
Console.WriteLine("(DeepSeek) ChatExample with reasoning is running!");
await AIHub.Chat()
.WithModel("deepseek-reasoner") // a model that supports reasoning
.WithMessage("What chill pc game do you recommend?")
.CompleteAsync(interactive: true);
}- Set up DeepSeek API β
DeepSeekExample.Setup()(API key is required) - Initialize a chat session β
AIHub.Chat() - Choose a model β
.WithModel("deepseek-reasoner") - Send a message β
.WithMessage("What chill pc game do you recommend?") - Run the chat β
.CompleteAsync(interactive: true);
This example showcases how to leverage the DeepSeek Reasoner model to engage in a conversational exchange where the AI is prompted to provide recommendations based on reasoning, making it ideal for scenarios requiring more elaborate and thought-out responses.
If you don't require the advanced reasoning capabilities, you can simply select a DeepSeek model that isn't designed for reasoning ("deepseek-chat"). The integration process remains just as straightforward.