synced with upstream

This commit is contained in:
ManishMadan2882
2024-07-26 15:36:27 +05:30
20 changed files with 611 additions and 527 deletions

View File

@@ -18,6 +18,8 @@ const embeddingsName =
type StatusType = 'loading' | 'idle' | 'fetched' | 'failed';
import conversationService from '../api/services/conversationService';
export const ShareConversationModal = ({
close,
conversationId,
@@ -100,13 +102,8 @@ export const ShareConversationModal = ({
payload.prompt_id = selectedPrompt.id;
sourcePath && (payload.source = sourcePath.value);
}
fetch(`${apiHost}/api/share?isPromptable=${isPromptable}`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
})
conversationService
.shareConversation(isPromptable, payload)
.then((res) => {
console.log(res.status);
return res.json();