chore: apply code style reformat via dev/reformat

pull/21897/head
kimtaewoong 11 months ago
parent 33d239279b
commit c7a9c50ddb

@ -1182,4 +1182,4 @@ def _handle_completion_template(
contents=[TextPromptMessageContent(data=result_text)], role=PromptMessageRole.USER
)
prompt_messages.append(prompt_message)
return prompt_messages
return prompt_messages

@ -404,4 +404,4 @@ def test_execute_llm_with_thinking_tags(flask_req_ctx, thinking_tags_enabled, sh
assert "</think>" not in output_text
assert "Hello! How can I help you today?" in output_text
# Verify thinking content is not in output
assert "Let me think about this greeting..." not in output_text
assert "Let me think about this greeting..." not in output_text

@ -795,6 +795,7 @@ more context or rephrase your question? I'm here to help!"""
def test_environment_variable_enabled(self):
"""Test that environment variable is properly read when enabled."""
from core.workflow.nodes.llm.node import LLM_NODE_THINKING_TAGS_ENABLED
assert LLM_NODE_THINKING_TAGS_ENABLED is True
@mock.patch.dict("os.environ", {"LLM_NODE_THINKING_TAGS_ENABLED": "false"})
@ -802,13 +803,17 @@ more context or rephrase your question? I'm here to help!"""
"""Test that environment variable is properly read when disabled."""
# Need to reimport to get the updated value
import importlib
import core.workflow.nodes.llm.node
importlib.reload(core.workflow.nodes.llm.node)
from core.workflow.nodes.llm.node import LLM_NODE_THINKING_TAGS_ENABLED
assert LLM_NODE_THINKING_TAGS_ENABLED is False
def test_environment_variable_default(self):
"""Test that environment variable defaults to True."""
from core.workflow.nodes.llm.node import LLM_NODE_THINKING_TAGS_ENABLED
# Default should be True for backward compatibility
assert LLM_NODE_THINKING_TAGS_ENABLED is True

Loading…
Cancel
Save