Skip to content

Commit 21df7b3

Browse files
committed
Add tone param to bing
1 parent f9fb8e4 commit 21df7b3

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/app/bots/bing/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,17 @@ export class BingWebBot extends AbstractBot {
5151

5252
private buildChatRequest(conversation: ConversationInfo, message: string, imageUrl?: string) {
5353
const requestId = uuid()
54-
const optionsSets = OPTIONS_SETS
54+
55+
const optionsSets = [...OPTIONS_SETS]
56+
let tone = 'Balanced'
5557
if (conversation.conversationStyle === BingConversationStyle.Precise) {
5658
optionsSets.push('h3precise')
59+
tone = 'Precise'
5760
} else if (conversation.conversationStyle === BingConversationStyle.Creative) {
5861
optionsSets.push('h3imaginative')
62+
tone = 'Creative'
5963
}
64+
6065
return {
6166
arguments: [
6267
{
@@ -91,6 +96,7 @@ export class BingWebBot extends AbstractBot {
9196
conversationId: conversation.conversationId,
9297
conversationSignature: conversation.conversationSignature,
9398
participant: { id: conversation.clientId },
99+
tone,
94100
},
95101
],
96102
invocationId: conversation.invocationId.toString(),

0 commit comments

Comments
 (0)