File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
libs/core/langchain_core/language_models Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,9 @@ class FakeListChatModel(SimpleChatModel):
63
63
"""List of responses to **cycle** through in order."""
64
64
sleep : Optional [float ] = None
65
65
i : int = 0
66
- """List of responses to **cycle** through in order."""
67
- error_on_chunk_number : Optional [int ] = None
68
66
"""Internally incremented after every model invocation."""
67
+ error_on_chunk_number : Optional [int ] = None
68
+ """If set, raise an error on the specified chunk number during streaming."""
69
69
70
70
@property
71
71
@override
@@ -81,6 +81,8 @@ def _call(
81
81
** kwargs : Any ,
82
82
) -> str :
83
83
"""First try to lookup in queries, else return 'foo' or 'bar'."""
84
+ if self .sleep is not None :
85
+ time .sleep (self .sleep )
84
86
response = self .responses [self .i ]
85
87
if self .i < len (self .responses ) - 1 :
86
88
self .i += 1
You can’t perform that action at this time.
0 commit comments