mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-09 14:57:59 -05:00
Add llm disable stop word env var (#10274)
Co-authored-by: Xingyao Wang <xingyao@all-hands.dev>
This commit is contained in:
@@ -305,8 +305,11 @@ class LLM(RetryMixin, DebugMixin):
|
||||
)
|
||||
kwargs['messages'] = messages
|
||||
|
||||
# add stop words if the model supports it
|
||||
if self.config.model not in MODELS_WITHOUT_STOP_WORDS:
|
||||
# add stop words if the model supports it and stop words are not disabled
|
||||
if (
|
||||
self.config.model not in MODELS_WITHOUT_STOP_WORDS
|
||||
and not self.config.disable_stop_word
|
||||
):
|
||||
kwargs['stop'] = STOP_WORDS
|
||||
|
||||
mock_fncall_tools = kwargs.pop('tools')
|
||||
|
||||
Reference in New Issue
Block a user