agentscope icon indicating copy to clipboard operation
agentscope copied to clipboard

Add support for deepseek

Open PengHongyiNTU opened this issue 11 months ago • 0 comments


Add support for deepseek official api

Description

This PR adds support for the Deepseek API. Since Deepseek uses an OpenAI-compatible API, the wrapper is almost the same as the OpenAI one. The key difference lies in the yield generator, which now needs to access both the content and reasoning_content fields from the response.

issues

  1. The Deepseek official URL is often unresponsive. For testing and debugging, use the Aliyun-hosted version as a fallback.

  2. The streaming handling in logging.py causes bugs when displaying flags to indicate whether reasoning and final answer generation have started. Consider a better implementation.

  3. Streaming content can be a bit chunky because responses arrive faster than they are consumed. A better implementation (e.g., buffering or fixed-rate throttling) is needed to handle streaming more effectively.

PengHongyiNTU avatar Feb 16 '25 03:02 PengHongyiNTU