Skip to content

feat: Support min_tokens and ignore_eos parameters#190

Merged
Jiayi Ni (jiayin-nvidia) merged 4 commits intolangchain-ai:mainfrom
jiayin-nvidia:support_min_tokens_and_ignore_eos
Sep 9, 2025
Merged

feat: Support min_tokens and ignore_eos parameters#190
Jiayi Ni (jiayin-nvidia) merged 4 commits intolangchain-ai:mainfrom
jiayin-nvidia:support_min_tokens_and_ignore_eos

Conversation

@jiayin-nvidia
Copy link
Collaborator

No description provided.

stop=None,
)
assert payload["min_tokens"] == 10
assert "ignore_eos" not in payload
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need to check ignore_eos in this min_tokens test? seems independent?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this sounds good. Let me add a separate test case where the parameters are not set (default None values and not appear in the payload).

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes that would be good to check for covering other none cases too

@soumilinandi
Copy link
Collaborator

Jiayi Ni (@jiayin-nvidia) Do you think we can add integration tests for this parameter with a model that supports it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

looks good! ✌️

@jiayin-nvidia Jiayi Ni (jiayin-nvidia) force-pushed the support_min_tokens_and_ignore_eos branch from 94e211b to 21da604 Compare September 8, 2025 23:24
@jiayin-nvidia Jiayi Ni (jiayin-nvidia) merged commit b5c05a4 into langchain-ai:main Sep 9, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants