Skip to content
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

Feature: deepseek provider & support for text-only model #41

Draft
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

HairlessVillager
Copy link
Contributor

@HairlessVillager HairlessVillager commented Jan 31, 2025

这个 PR 主要添加了 DeepSeek 的 LLMProvider 以及对纯文本大模型的支持。这个 PR 做了以下修改:

  1. 新增了 DeepseekProvider 以及对应的集成测试;
  2. 对所有 Tool 新增了 need_vision 字段,当这个 Tool 可能会需要大模型的视觉能力时该字段为 true,否则为false
  3. 对所有 LLMProvider 新增了 hasVisionCapacity() 方法,当这个 LLMProvider 有视觉能力时该方法返回 true,否则为 false
  4. Eko 类的构造函数中,根据 llmProvider.hasVisionCapacity() 过滤可能使用的 tools。

对于第 1 条修改,你可以通过运行对应的集成测试来验证,具体命令如下:

export ENABLE_INTEGRATION_TESTS=1
export OPENAI_API_KEY=<your_deepseek_api_key>
npx jest deepseek-provider

对于其他修改,我目前暂时无法验证,一种可能的解决方法是在 https://github.com/FellouAI/eko-browser-extension-template 中添加对 DeepseekProvider 的支持后再来验证。


This PR mainly adds the LLMProvider for DeepSeek and support for plain text large models. The following modifications have been made in this PR:

  1. Added DeepseekProvider and the corresponding integration tests;
  2. Added a need_vision field to all Tool subclasses. This field is set to true if the Tool may require the vision capabilities of a large model, and false otherwise;
  3. Added an hasVisionCapacity() method to all LLMProvider subclasses. This method returns true if the LLMProvider has vision capabilities, and false otherwise;
  4. In the constructor of the Eko class, filtered the potential tools to use based on llmProvider.hasVisionCapacity().

For the first modification, you can verify it by running the corresponding integration tests. The specific commands are as follows:

export ENABLE_INTEGRATION_TESTS=1
export OPENAI_API_KEY=<your_deepseek_api_key>
npx jest deepseek-provider

For the other modifications, I am currently unable to verify them. One possible solution is to add support for DeepseekProvider in the https://github.com/FellouAI/eko-browser-extension-template repository before verification.

@HairlessVillager HairlessVillager marked this pull request as draft January 31, 2025 10:45
@HairlessVillager HairlessVillager marked this pull request as ready for review February 4, 2025 07:57
@HairlessVillager HairlessVillager marked this pull request as draft February 4, 2025 08:11
@HairlessVillager
Copy link
Contributor Author

Draft for the lack of removal logic for the <think></think> block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant