-
Notifications
You must be signed in to change notification settings - Fork 133
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
add multi-turn conversation support with a gen() method #1002
Comments
I think you can acheive the sample with const gen = prompt
const topics = await gen`gen 3 topics of joke.`.split(/\n/)
const jokes = []
for(let topic of topics){
const joke = await gen`gen a joke about ${topic}`
jokes.push(joke)
}
def("jokes", jokes)
$`which one is the best joke?` |
( |
Oh, I mean the gen method can execute the entire script's request, generating multi-turn continuous dialogue. |
So in your example, you expect the entire set messages created by |
add multi-turn conversation support with 'gen' method
|
Yes, I hope it is an accumulative dialogue record, which is very suitable for multi-step, interrelated conversations and can conveniently control the direction of the dialogue.
|
This is a head banger; maybe it's doable with async iterators. |
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() can execute multi-turn conversations within a script without the need for inline prompts.
The text was updated successfully, but these errors were encountered: