mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
move tests
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -5,5 +5,4 @@ modes = [
|
||||
instructor.Mode.FUNCTIONS,
|
||||
instructor.Mode.JSON,
|
||||
instructor.Mode.TOOLS,
|
||||
instructor.Mode.MD_JSON,
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user