1using System.Collections.Generic;
7 [CreateAssetMenu(fileName =
"GeneratedDiscussion", menuName =
"EchoTrio/GeneratedDiscussion")]
9 [Header(
"Generated Discussion Settings")]
10 [SerializeField, Range(1, 10)]
private int minTurns = 1;
11 [SerializeField, Range(1, 10)]
private int maxTurns = 3;
12 [SerializeField]
private List<Persona>
speakers =
new List<Persona>();
14 TextArea(minLines: 4, maxLines: 16),
15 Tooltip(
"The prompt to give to the model to generate a discussion. If left blank, it will default to the trigger topic.")]
19 if (
speakers.Count == 0) {
return new List<Persona>(); }
22 if (
speakers.Count == 1) {
return Enumerable.Repeat(
speakers[0], numTurns).ToList(); }
24 List<Persona> order =
new List<Persona>();
27 for (
int i = 0; i < numTurns; ++i) {
28 currIndex = UnityEngine.Random.Range(0,
speakers.Count);
30 currIndex = (currIndex == prevIndex) ? (currIndex + 1) % speakers.Count : currIndex;
31 prevIndex = currIndex;
Discussions are a way for the designers to create a way for the actors to interact beyond the standar...
GeneratedDiscussions allow the designer to request the actors to generate N responses based on a prom...
List< Persona > GenerateRandomSpeakerOrder()
string GetDiscussionPrompt()