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

add max_tokens parameter rule for zhipuai glm4 and glm4v #2861

Merged
merged 5 commits into from
Mar 18, 2024

Conversation

orangeclk
Copy link
Contributor

@orangeclk orangeclk commented Mar 16, 2024

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #2860

Type of Change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

My testing environment is WSL2 Ubuntu 22.04 LTS, Python 3.10.13, Node v21.7.1.
I have instructed glm4 and glm4v to output long content, and by setting different values for max_tokens, it is possible to observe varying lengths of returned results.

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Mar 16, 2024
web/yarn.lock Outdated Show resolved Hide resolved
@orangeclk orangeclk marked this pull request as draft March 17, 2024 04:26
@orangeclk orangeclk marked this pull request as ready for review March 17, 2024 05:45
@takatost takatost assigned Yeuoly and unassigned Yeuoly Mar 17, 2024
@takatost takatost requested a review from Yeuoly March 17, 2024 06:04
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 label Mar 18, 2024
@crazywoola crazywoola merged commit e7343cc into langgenius:main Mar 18, 2024
7 checks passed
@orangeclk orangeclk deleted the max-tokens-glm4 branch March 23, 2024 09:11
HuberyHuV1 pushed a commit to HuberyHuV1/dify that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:S This PR changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding max_tokens parameter rule setting option to ZhipuAI glm4 glm4v model
4 participants