M96820 commited on
Commit
9ce3e81
·
unverified ·
1 Parent(s): 3853f2f

feat: Sarah makes decisions in context of the story

Browse files
Files changed (1) hide show
  1. client/src/pages/game/App.jsx +1 -1
client/src/pages/game/App.jsx CHANGED
@@ -191,7 +191,7 @@ function App() {
191
  const currentChoiceIds = currentChoices.map(choice => choice.id).join(',');
192
  await conversation.startSession({
193
  agentId: AGENT_ID,
194
- initialContext: `Available choices: ${currentChoiceIds}. Use the makeDecision tool with one of these IDs to make a choice.`
195
  });
196
  console.log('ElevenLabs WebSocket connected');
197
  } catch (error) {
 
191
  const currentChoiceIds = currentChoices.map(choice => choice.id).join(',');
192
  await conversation.startSession({
193
  agentId: AGENT_ID,
194
+ initialContext: `This is the current context : ${storySegments[storySegments.length - 1].text}. Those are your possibilities : ${currentChoices.map((choice, index) => `${index + 1}: ${choice.text}`).join(', ')}`
195
  });
196
  console.log('ElevenLabs WebSocket connected');
197
  } catch (error) {