enforce_stop_tokens#

langchain_aws.llms.sagemaker_endpoint.enforce_stop_tokens(
text: str,
stop: List[str],
) str[source]#

Cut off the text as soon as any stop words occur.

Parameters:
  • text (str)

  • stop (List[str])

Return type:

str