참고소스 수정본
This commit is contained in:
18
참고/instructor-main/tests/test_multitask.py
Normal file
18
참고/instructor-main/tests/test_multitask.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from instructor import OpenAISchema
|
||||
from instructor.dsl import IterableModel
|
||||
from typing import cast
|
||||
|
||||
|
||||
def test_multi_task():
|
||||
class Search(OpenAISchema):
|
||||
"""This is the search docstring"""
|
||||
|
||||
id: int
|
||||
query: str
|
||||
|
||||
IterableSearch = cast(type[OpenAISchema], IterableModel(Search))
|
||||
assert IterableSearch.openai_schema["name"] == "IterableSearch"
|
||||
assert (
|
||||
IterableSearch.openai_schema["description"]
|
||||
== "Correct segmentation of `Search` tasks"
|
||||
)
|
||||
Reference in New Issue
Block a user