Open
Conversation
Add new .deepseek model type with specific context length (32K), max output tokens (8K), capabilities (text generation, function calling, streaming, tool access), and parameter constraints. Update request/response handling to use GPT builders for API compatibility, and fallback to JSON mode for schema conversion. Includes integration tests for DeepSeek model functionality. Signed-off-by: alex <alex.tech.lab@outlook.com>
…compatibility - Updated `extractResponseFormatWithSchema` and related methods in `TranscriptConverter` to accept an `OpenAIModel` parameter - Added logic to fallback to `.json` mode for DeepSeek models that do not support `json_schema` - Modified `OpenAILanguageModel` to pass the model when extracting response formats - Ensures compatibility with various OpenAI-compatible models by handling schema support differences Signed-off-by: alex <alex.tech.lab@outlook.com>
a236a50 to
7d37d7e
Compare
a1704fe to
9578d29
Compare
This reverts commit 9578d29.
Author
|
And it is also necessary to build a special scheme to prompt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Title: Add DeepSeek Model Support for JSON Response Format
Description
DeepSeek models (deepseek-chat, deepseek-coder, etc.) are widely used but currently have compatibility issues with structured JSON output in this library.
Problem
DeepSeek models don't support OpenAI's
json_schemaresponse format. When requesting structured responses, they need to use the simplerjsonformat instead.Solution
Modified
TranscriptConverter.extractResponseFormatFromJSON()to detect DeepSeek models and automatically usejsonformat when a response schema is provided.Changes
jsonformatTesting
Added tests verifying DeepSeek models correctly use
jsonformat while maintaining compatibility with existing GPT models.This enables users to leverage DeepSeek models for structured output without API errors.