mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 14:50:16 +00:00
18 lines
448 B
Python
18 lines
448 B
Python
from instructor import OpenAISchema
|
|
from instructor.dsl import IterableModel
|
|
|
|
|
|
def test_multi_task():
|
|
class Search(OpenAISchema):
|
|
"""This is the search docstring"""
|
|
|
|
id: int
|
|
query: str
|
|
|
|
IterableSearch = IterableModel(Search)
|
|
assert IterableSearch.openai_schema["name"] == "IterableSearch"
|
|
assert (
|
|
IterableSearch.openai_schema["description"]
|
|
== "Correct segmentation of `Search` tasks"
|
|
)
|