hadadrjt's picture
SearchGPT: Enhance. #3
2a85ae5
raw
history blame contribute delete
456 Bytes
#
# SPDX-FileCopyrightText: Hadad <hadad@linuxmail.org>
# SPDX-License-Identifier: Apache-2.0
#
def reasoning_interfaces(text, current_length=0):
if current_length < len(text):
reasoning_steps = text[:current_length]
if current_length > 0 and not reasoning_steps.endswith((
'<br>',
'<br><br>'
)):
reasoning_steps += '...'
return reasoning_steps
return text