mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-25 13:07:58 +00:00
openai[patch]: enable streaming for o1 (#29823)
Verified streaming works for the `o1-2024-12-17` snapshot as well.
This commit is contained in:
@@ -1188,16 +1188,6 @@ def test_o1(use_max_completion_tokens: bool) -> None:
|
||||
assert response.content.upper() == response.content
|
||||
|
||||
|
||||
@pytest.mark.scheduled
|
||||
def test_o1_doesnt_stream() -> None:
|
||||
"""
|
||||
When this starts failing, remove the `disable_streaming` validator in
|
||||
`BaseChatOpenAI`
|
||||
"""
|
||||
with pytest.raises(openai.BadRequestError):
|
||||
list(ChatOpenAI(model="o1", disable_streaming=False).stream("how are you"))
|
||||
|
||||
|
||||
@pytest.mark.scheduled
|
||||
def test_o1_stream_default_works() -> None:
|
||||
result = list(ChatOpenAI(model="o1").stream("say 'hi'"))
|
||||
|
Reference in New Issue
Block a user