Skip to content

Commit

Permalink
fix(masterbots.ai): is_public set (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
TopETH authored and gaboesquivel committed Apr 9, 2024
1 parent bb054ed commit ab67184
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions apps/masterbots.ai/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ export function Chat({
const allMessages =
params.threadId || isNewChat
? uniqBy(initialMessages?.concat(messages), 'content').filter(
m => m.role !== 'system'
)
m => m.role !== 'system'
)
: uniqBy(threadAllMessages.concat(messages), 'content').filter(
m => m.role !== 'system'
)
m => m.role !== 'system'
)

const sendMessageFromResponse = async (bulletContent: string) => {
setIsNewResponse(true)
Expand Down Expand Up @@ -151,7 +151,7 @@ export function Chat({
chatbotId: chatbot.chatbotId,
jwt: session!.user?.hasuraJwt,
userId: session!.user.id,
isPublic: activeChatbot?.name === 'BlankBot'
isPublic: activeChatbot?.name !== 'BlankBot'
})
const thread = await getThread({
threadId,
Expand All @@ -177,11 +177,11 @@ export function Chat({
isNewChat
? userMessage
: {
...userMessage,
content: `First, think about the following questions and requests: [${getAllUserMessagesAsStringArray(
allMessages
)}]. Then answer this question: ${userMessage.content}`
}
...userMessage,
content: `First, think about the following questions and requests: [${getAllUserMessagesAsStringArray(
allMessages
)}]. Then answer this question: ${userMessage.content}`
}
)
}

Expand Down
2 changes: 1 addition & 1 deletion apps/masterbots.ai/components/new-chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function NewChat({
chatbotId: chatbot.chatbotId,
jwt: session!.user?.hasuraJwt,
userId: session!.user.id,
isPublic: chatbot?.name === 'BlankBot'
isPublic: chatbot?.name !== 'BlankBot'
})

// we do not await to make transition to chat url faster
Expand Down

0 comments on commit ab67184

Please sign in to comment.