Skip to content

Commit e484a9f

Browse files
committed
yoda assistant imporvements
1 parent c49b7a0 commit e484a9f

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

multichannel-app/frontend/app/api/link

Whitespace-only changes.

multichannel-app/frontend/app/api/ws-bot/assistant_bot.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ export async function toogleAssistantBot(convName:string) : Promise<{
5858
]
5959
});
6060
const leg_id = startCallRes.uuid;
61+
62+
try {
63+
const { _embedded: { user: { id: userId } } } = await csClient(`/legs/${leg_id}`, 'GET');
64+
65+
await csClient(`/users/${userId}`, 'PATCH', {
66+
name: 'assistant:ws',
67+
display_name: 'Yoda Assistant',
68+
image_url: 'https://avatarfiles.alphacoders.com/170/170909.jpg'
69+
});
70+
71+
} catch (e) {
72+
// if there's an error setting the user, we don't care, just log it
73+
logger.error('error setting assistant user', e);
74+
}
75+
6176
await kv.set(assistantKVKey, leg_id);
6277
return {
6378
leg_id,

multichannel-app/ws-bot-backend/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ app.ws('/assistant', async (ws, req) => {
103103
const messages: ChatCompletionMessageParam[] = [
104104
{
105105
role: 'system',
106-
content: 'You\'re an unhelpful assistant, You respond to questions with little information using yoda speak.'
106+
content: 'You\'re an insighfulassistant, You respond to questions using yoda speak and talk of the force, and encourage the others to trust in the force.'
107107
}
108108
];
109109
const gRecognizeStream = speechToTextClient

0 commit comments

Comments
 (0)