langchaingo icon indicating copy to clipboard operation
langchaingo copied to clipboard

Add Support for DeepSeek LLM Integration

Open danielmerja opened this issue 11 months ago • 11 comments

Description:

DeepSeek is an advanced open-source LLM that rivals some of the most sophisticated models globally, such as OpenAI's offerings. Its latest version, DeepSeek-V3, delivers exceptional inference speed and accuracy across multiple benchmarks, including English, Chinese, code, and math reasoning tasks. Integrating DeepSeek into LangChainGo would expand its capabilities and provide users with an additional high-performance, open-source LLM option.

Current Behavior

LangChainGo currently supports various LLMs but lacks integration with DeepSeek, which is rapidly gaining recognition for its performance and open-source nature.

Expected Behavior

Adding DeepSeek support would allow LangChainGo users to:

  1. Leverage DeepSeek's superior inference speed and performance.
  2. Access its broad capabilities across multiple domains, such as reasoning, math, and code.
  3. Use a free, open-source alternative to proprietary models.

Why This Enhancement Is Useful

  1. Performance Leader: DeepSeek ranks highly on key benchmarks like MMLU and HumanEval, outperforming other open-source models and competing with closed-source solutions.
  2. Open Source: Aligns with the ethos of LangChainGo by providing more open-source alternatives.
  3. Multi-Domain Strength: Its versatility in handling diverse tasks makes it a valuable addition to the LangChainGo ecosystem.

References

danielmerja avatar Jan 22 '25 01:01 danielmerja

It use with OpenAI starndard. @danielmerja

lifejwang11 avatar Jan 22 '25 01:01 lifejwang11

It use with OpenAI starndard. @danielmerja

Is the finish_reason also supported in the llms/openai?

danielmerja avatar Jan 22 '25 01:01 danielmerja

oh,I agree

lifejwang11 avatar Jan 22 '25 01:01 lifejwang11

oh,I agree

it would be very cost effective if we add these, and we can use DeepSeek API with their new reasoning model

Reasoning Model (deepseek-reasoner)

Image

danielmerja avatar Jan 22 '25 01:01 danielmerja

Its a good feature.Every model have their own feature.I think it will support in the future.

lifejwang11 avatar Jan 22 '25 01:01 lifejwang11

Any progress on this?

vMaroon avatar Jan 30 '25 11:01 vMaroon

@vMaroon no,I don't have any time for this.

lifejwang11 avatar Jan 31 '25 12:01 lifejwang11

@danielmerja turns out finish_reason was already supported in the existing codebase but not the ReasoningContent. I quickly opened a PR let me know if i missed anything: https://github.com/tmc/langchaingo/pull/1121/files

semioz avatar Jan 31 '25 14:01 semioz

@danielmerja turns out finish_reason was already supported in the existing codebase but not the ReasoningContent. I quickly opened a PR let me know if i missed anything: https://github.com/tmc/langchaingo/pull/1121/files

Sweet! Thank you! I have pinged @FluffyKebab to take a look at it.

danielmerja avatar Jan 31 '25 16:01 danielmerja

@semioz thanks for this. on the other hand, we seem to lack a WithStreamingReasoningFunc, otherwise we cannot achieve streaming reasoning. I have already submitted a PR to implement this feature, please take a look. #1125

douglarek avatar Feb 02 '25 10:02 douglarek