Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the list type #1421

Closed
rlouf opened this issue Feb 17, 2025 · 1 comment · Fixed by #1441
Closed

Support the list type #1421

rlouf opened this issue Feb 17, 2025 · 1 comment · Fixed by #1441
Labels
enhancement impact/user interface Related to improving the user interface structured generation Linked to structured generation
Milestone

Comments

@rlouf
Copy link
Member

rlouf commented Feb 17, 2025

For instance to generate a list of integers:

model(prompt, list[int])

Linked to #1223

@rlouf rlouf added enhancement structured generation Linked to structured generation impact/user interface Related to improving the user interface labels Feb 17, 2025
@rlouf rlouf added this to the 1.0 milestone Feb 17, 2025
@rlouf rlouf mentioned this issue Feb 23, 2025
14 tasks
@rlouf rlouf linked a pull request Feb 23, 2025 that will close this issue
14 tasks
@Martins6
Copy link

hey @rlouf ,

the issued linked #1223 I believe to have solved via the creation of a BaseModel that encapsulated the specific schema into a list. So, just to be clear, this issue #1441 , wants a PR that automatically transforms schemas of type List[Any] into a valid schema such that it is going to create another schema that encapsulates that Any into a list, right?

In the #1223 , we would've List[Country] and then we would internally create CountryList that has the field of List[Country], is that correct?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement impact/user interface Related to improving the user interface structured generation Linked to structured generation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants