Add support for deepseek
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
-
The Deepseek official URL is often unresponsive. For testing and debugging, use the Aliyun-hosted version as a fallback.
-
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.
-
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.