move tests

This commit is contained in:
Jason Liu
2023-12-15 12:44:32 -05:00
parent f96b74a50a
commit f4dab8aba0
2 changed files with 6 additions and 6 deletions
+6 -5
View File
@@ -122,12 +122,12 @@ class OpenAISchema(BaseModel):
Returns:
cls (OpenAISchema): An instance of the class
"""
if completion.choices[0].finish_reason == "length":
raise IncompleteOutputException()
if stream_multitask:
return cls.from_streaming_response(completion, mode)
if completion.choices[0].finish_reason == "length":
raise IncompleteOutputException()
message = completion.choices[0].message
if mode == Mode.FUNCTIONS:
@@ -183,12 +183,13 @@ class OpenAISchema(BaseModel):
Returns:
cls (OpenAISchema): An instance of the class
"""
if completion.choices[0].finish_reason == "length":
raise IncompleteOutputException()
if stream_multitask:
return await cls.from_streaming_response_async(completion, mode)
if completion.choices[0].finish_reason == "length":
raise IncompleteOutputException()
message = completion.choices[0].message
if mode == Mode.FUNCTIONS:
-1
View File
@@ -5,5 +5,4 @@ modes = [
instructor.Mode.FUNCTIONS,
instructor.Mode.JSON,
instructor.Mode.TOOLS,
instructor.Mode.MD_JSON,
]