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

fix: DeepSeek API Error with response format active (text and json_object) #12747

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

jiandanfeng
Copy link
Contributor

@jiandanfeng jiandanfeng commented Jan 15, 2025

Summary

Fixes #12713
Fixes #12868

The response_format conversion has been done once in OAIAPICompatLargeLanguageModel, no need to convert again in DeepseekLargeLanguageModel. The same goes for moonshot and siliconflow.

Screenshots

Before After
... ...

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 🐞 bug Something isn't working labels Jan 15, 2025
@jiandanfeng jiandanfeng changed the title fix DeepSeek API Error with response format active (text and json_object) fix: DeepSeek API Error with response format active (text and json_object) Jan 15, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jan 20, 2025
@crazywoola crazywoola merged commit 6ea77ab into langgenius:main Jan 20, 2025
6 checks passed
Scorpion1221 added a commit to yybht155/dify that referenced this pull request Jan 21, 2025
* commit '6db3ae9b8ec2f8491e2c9355056a8693ecd67f47': (22 commits)
  chore: remove webapp ga (langgenius#12909)
  fix: variable panel scrollable (langgenius#12769)
  fix: OpenAI o1 Bad Request Error (langgenius#12839)
  Update deepseek model configuration (langgenius#12899)
  fix: external dataset hit test display issue(langgenius#12564) (langgenius#12612)
  add deepseek-reasoner (langgenius#12898)
  chore(fix): Invalid quotes for using Array[String] in HTTP request node as JSON body (langgenius#12761)
  fix: Issues related to the deletion of conversation_id (langgenius#12488) (langgenius#12665)
  chore(lint): fix quotes for f-string formatting by bumping ruff to 0.9.x (langgenius#12702)
  feat:Support Minimax-Text-01 (langgenius#12763)
  fix: serply credential check query might return empty records (langgenius#12784)
  feat: allow updating chunk settings for the existing documents (langgenius#12833)
  fix: SparkLite API Auth error (langgenius#12781) (langgenius#12790)
  fix: "parmas" spelling mistake. (langgenius#12875)
  Fix suggested_question_prompt (langgenius#12738)
  fix(i18n): correct typo in zh-Hant translation (langgenius#12852)
  chore: fix chinese translation for 'recall' (langgenius#12772)
  fix: DeepSeek API Error with response format active (text and json_object)  (langgenius#12747)
  feat: enhance credential extraction logic based on configurate method (langgenius#12853)
  fix: Fix rerank model switching issue (langgenius#12721)
  ...

# Conflicts:
#	api/core/tools/utils/message_transformer.py
#	api/poetry.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

deepseek response format error DeepSeek API Error with response format active (text and json_object)
2 participants