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(api/core/model_runtime/model_providers/__base/large_language_model.py): Add TEXT type checker #7407

Merged
merged 1 commit into from
Aug 19, 2024

Conversation

laipz8200
Copy link
Collaborator

@laipz8200 laipz8200 commented Aug 19, 2024

Checklist:

Important

Please review the checklist below before submitting your pull request.

  • Please open an issue before creating a PR or link to an existing issue
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

Description

Fix parameters check when using the OpenAI structured output feature.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

Testing Instructions

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. ⚙️ feat:model-runtime labels Aug 19, 2024
@laipz8200 laipz8200 requested review from crazywoola and removed request for crazywoola August 19, 2024 10:23
@laipz8200 laipz8200 self-assigned this Aug 19, 2024
@laipz8200 laipz8200 marked this pull request as draft August 19, 2024 10:31
@laipz8200 laipz8200 marked this pull request as ready for review August 19, 2024 10:42
@dosubot dosubot bot added the 🐞 bug Something isn't working label Aug 19, 2024
Copy link
Collaborator

@Yeuoly Yeuoly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 19, 2024
@laipz8200 laipz8200 changed the title fix(api/core/model_runtime/model_providers/__base/large_language_model.py): Add TEXT type checker && upgrade openai package. fix(api/core/model_runtime/model_providers/__base/large_language_model.py): Add TEXT type checker Aug 19, 2024
@laipz8200 laipz8200 merged commit 0087afc into main Aug 19, 2024
9 checks passed
@laipz8200 laipz8200 deleted the fix/openai-structured-output branch August 19, 2024 10:45
Copy link
Collaborator

@takatost takatost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Scorpion1221 added a commit to yybht155/dify that referenced this pull request Aug 20, 2024
* commit '3d27d15f00d025185bf979a90a07f2767297703f': (297 commits)
  chore(*): Bump version 0.7.1 (langgenius#7389)
  upgrade: sandbox to 0.2.6 (langgenius#7410)
  add CrossRef builtin tool: doi query and title query (langgenius#7406)
  feat: OpenRouter add gpt-4o-2024-08-06 model (langgenius#7409)
  fix(api/core/model_runtime/model_providers/__base/large_language_model.py): Add TEXT type checker (langgenius#7407)
  fix:start of the period should be YYYY-MM-DD 00:00 (langgenius#7371)
  Feat: shortcut hook (langgenius#7385)
  chore: rearrange api python dependencies (langgenius#7391)
  feat: support xinference's auth system (langgenius#7369)
  chore: update ruff from 0.5.x to 0.6.x (langgenius#7384)
  feat: custom app icon (langgenius#7196)
  feat: add jina tokenizer tool (langgenius#7375)
  feat(api): support wenxin text embedding (langgenius#7377)
  chore: optimize ark model parameters (langgenius#7378)
  chore: add LOG_FILE to docker-compose (langgenius#7372)
  fix(api/services/workflow/workflow_converter.py): Add converrsation variable to workflow. (langgenius#7257)
  add base url for moonshot model (langgenius#7360)
  fix: keywords (langgenius#7357)
  feat: support siliconflow rerank (langgenius#7337)
  add workflowClient ,fix rename bug (langgenius#7352)
  ...

# Conflicts:
#	api/configs/app_config.py
#	api/core/helper/code_executor/code_executor.py
#	api/core/tools/utils/message_transformer.py
#	api/core/workflow/nodes/tool/tool_node.py
#	api/poetry.lock
#	api/pyproject.toml
#	web/app/components/workflow/nodes/_base/components/variable/utils.ts
#	web/yarn.lock
cuiks pushed a commit to cuiks/dify that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working ⚙️ feat:model-runtime lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants