@@ -651,9 +651,12 @@ def _generate(
651651
652652 Args:
653653 prompts: The prompts to generate from.
654- stop: Stop words to use when generating. Model output is cut off at the
655- first occurrence of any of the stop substrings.
656- If stop tokens are not supported consider raising NotImplementedError.
654+ stop: Stop words to use when generating.
655+
656+ Model output is cut off at the first occurrence of any of these
657+ substrings.
658+
659+ If stop tokens are not supported consider raising `NotImplementedError`.
657660 run_manager: Callback manager for the run.
658661
659662 Returns:
@@ -671,9 +674,12 @@ async def _agenerate(
671674
672675 Args:
673676 prompts: The prompts to generate from.
674- stop: Stop words to use when generating. Model output is cut off at the
675- first occurrence of any of the stop substrings.
676- If stop tokens are not supported consider raising NotImplementedError.
677+ stop: Stop words to use when generating.
678+
679+ Model output is cut off at the first occurrence of any of these
680+ substrings.
681+
682+ If stop tokens are not supported consider raising `NotImplementedError`.
677683 run_manager: Callback manager for the run.
678684
679685 Returns:
@@ -705,11 +711,14 @@ def _stream(
705711
706712 Args:
707713 prompt: The prompt to generate from.
708- stop: Stop words to use when generating. Model output is cut off at the
709- first occurrence of any of these substrings.
714+ stop: Stop words to use when generating.
715+
716+ Model output is cut off at the first occurrence of any of these
717+ substrings.
710718 run_manager: Callback manager for the run.
711- **kwargs: Arbitrary additional keyword arguments. These are usually passed
712- to the model provider API call.
719+ **kwargs: Arbitrary additional keyword arguments.
720+
721+ These are usually passed to the model provider API call.
713722
714723 Yields:
715724 Generation chunks.
@@ -731,11 +740,14 @@ async def _astream(
731740
732741 Args:
733742 prompt: The prompt to generate from.
734- stop: Stop words to use when generating. Model output is cut off at the
735- first occurrence of any of these substrings.
743+ stop: Stop words to use when generating.
744+
745+ Model output is cut off at the first occurrence of any of these
746+ substrings.
736747 run_manager: Callback manager for the run.
737- **kwargs: Arbitrary additional keyword arguments. These are usually passed
738- to the model provider API call.
748+ **kwargs: Arbitrary additional keyword arguments.
749+
750+ These are usually passed to the model provider API call.
739751
740752 Yields:
741753 Generation chunks.
@@ -846,10 +858,14 @@ def generate(
846858
847859 Args:
848860 prompts: List of string prompts.
849- stop: Stop words to use when generating. Model output is cut off at the
850- first occurrence of any of these substrings.
851- callbacks: `Callbacks` to pass through. Used for executing additional
852- functionality, such as logging or streaming, throughout generation.
861+ stop: Stop words to use when generating.
862+
863+ Model output is cut off at the first occurrence of any of these
864+ substrings.
865+ callbacks: `Callbacks` to pass through.
866+
867+ Used for executing additional functionality, such as logging or
868+ streaming, throughout generation.
853869 tags: List of tags to associate with each prompt. If provided, the length
854870 of the list must match the length of the prompts list.
855871 metadata: List of metadata dictionaries to associate with each prompt. If
@@ -859,8 +875,9 @@ def generate(
859875 length of the list must match the length of the prompts list.
860876 run_id: List of run IDs to associate with each prompt. If provided, the
861877 length of the list must match the length of the prompts list.
862- **kwargs: Arbitrary additional keyword arguments. These are usually passed
863- to the model provider API call.
878+ **kwargs: Arbitrary additional keyword arguments.
879+
880+ These are usually passed to the model provider API call.
864881
865882 Raises:
866883 ValueError: If prompts is not a list.
@@ -1116,10 +1133,14 @@ async def agenerate(
11161133
11171134 Args:
11181135 prompts: List of string prompts.
1119- stop: Stop words to use when generating. Model output is cut off at the
1120- first occurrence of any of these substrings.
1121- callbacks: `Callbacks` to pass through. Used for executing additional
1122- functionality, such as logging or streaming, throughout generation.
1136+ stop: Stop words to use when generating.
1137+
1138+ Model output is cut off at the first occurrence of any of these
1139+ substrings.
1140+ callbacks: `Callbacks` to pass through.
1141+
1142+ Used for executing additional functionality, such as logging or
1143+ streaming, throughout generation.
11231144 tags: List of tags to associate with each prompt. If provided, the length
11241145 of the list must match the length of the prompts list.
11251146 metadata: List of metadata dictionaries to associate with each prompt. If
@@ -1129,8 +1150,9 @@ async def agenerate(
11291150 length of the list must match the length of the prompts list.
11301151 run_id: List of run IDs to associate with each prompt. If provided, the
11311152 length of the list must match the length of the prompts list.
1132- **kwargs: Arbitrary additional keyword arguments. These are usually passed
1133- to the model provider API call.
1153+ **kwargs: Arbitrary additional keyword arguments.
1154+
1155+ These are usually passed to the model provider API call.
11341156
11351157 Raises:
11361158 ValueError: If the length of `callbacks`, `tags`, `metadata`, or
@@ -1410,12 +1432,16 @@ def _call(
14101432
14111433 Args:
14121434 prompt: The prompt to generate from.
1413- stop: Stop words to use when generating. Model output is cut off at the
1414- first occurrence of any of the stop substrings.
1415- If stop tokens are not supported consider raising NotImplementedError.
1435+ stop: Stop words to use when generating.
1436+
1437+ Model output is cut off at the first occurrence of any of these
1438+ substrings.
1439+
1440+ If stop tokens are not supported consider raising `NotImplementedError`.
14161441 run_manager: Callback manager for the run.
1417- **kwargs: Arbitrary additional keyword arguments. These are usually passed
1418- to the model provider API call.
1442+ **kwargs: Arbitrary additional keyword arguments.
1443+
1444+ These are usually passed to the model provider API call.
14191445
14201446 Returns:
14211447 The model output as a string. SHOULD NOT include the prompt.
@@ -1436,12 +1462,16 @@ async def _acall(
14361462
14371463 Args:
14381464 prompt: The prompt to generate from.
1439- stop: Stop words to use when generating. Model output is cut off at the
1440- first occurrence of any of the stop substrings.
1441- If stop tokens are not supported consider raising NotImplementedError.
1465+ stop: Stop words to use when generating.
1466+
1467+ Model output is cut off at the first occurrence of any of these
1468+ substrings.
1469+
1470+ If stop tokens are not supported consider raising `NotImplementedError`.
14421471 run_manager: Callback manager for the run.
1443- **kwargs: Arbitrary additional keyword arguments. These are usually passed
1444- to the model provider API call.
1472+ **kwargs: Arbitrary additional keyword arguments.
1473+
1474+ These are usually passed to the model provider API call.
14451475
14461476 Returns:
14471477 The model output as a string. SHOULD NOT include the prompt.
0 commit comments