Skip to content

add multi-turn conversation support with a gen() method #1002

Open
@anrgct

Description

@anrgct

I found an interesting library appl that is somewhat similar to genaiscript. I think there is a method called gen() that is great for conducting multi-turn conversations within a script. Can it be added to genai? For example, using it like this.

$`gen 3 topics of joke.`
let topics = await gen();
let jokes = []
for(let topic of topics){
  $`gen a joke about ${topic}`
  jokes.push(await gen())
}
def("jokes", jokes)

$`which one is the best joke?`

gen() can execute multi-turn conversations within a script without the need for inline prompts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions