Skip to content
Discussion options

You must be logged in to vote

The standard pattern is a wrapper class:

data class StarPersonList(val people: List)

Then:
val result = createObject(prompt, ...)
val people: List = result.people

The LLM returns JSON like:
{ "people": [ { "name": "...", "sign": "..." }, ... ] }

Thank you.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@tonny1983
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by jorander
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants