Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelbaum committed May 10, 2024
1 parent 268ae95 commit c6e68b0
Show file tree
Hide file tree
Showing 11 changed files with 619 additions and 1,299 deletions.
1,543 changes: 573 additions & 970 deletions frontend/package-lock.json

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions frontend/src/api/api.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import { UserInfo, ConversationRequest, Conversation, ChatMessage, CosmosDBHealth, CosmosDBStatus } from "./models";
import { chatHistorySampleData } from "../constants/chatHistory";
import { Buffer } from 'buffer';

const storageAccountName = import.meta.env.VITE_STORAGE_ACCOUNT_NAME;
const sasToken = import.meta.env.VITE_SAS_TOKEN;
const apiUrl = `https://${storageAccountName}.blob.core.windows.net`;

export async function conversationApi(options: ConversationRequest, abortSignal: AbortSignal): Promise<Response> {
const response = await fetch('/conversation', {
Expand Down
17 changes: 2 additions & 15 deletions frontend/src/pages/chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,19 +285,6 @@ const Chat = () => {
date: new Date().toISOString()
}

const makeApiRequestWithCosmosDB = async (question: string, conversationId?: string) => {
setIsLoading(true);
setShowLoadingMessage(true);
const abortController = new AbortController();
abortFuncs.current.unshift(abortController);

const userMessage: ChatMessage = {
id: uuid(),
role: "user",
content: question,
date: new Date().toISOString(),
};

//api call params set here (generate)
let request: ConversationRequest
let conversation
Expand Down Expand Up @@ -710,7 +697,7 @@ const Chat = () => {
}

return (
<div className={styles.container} style={{color: '#A9A9A9'}} role="main">
<div className={styles.container} role="main">
{showAuthMessage ? (
<Stack className={styles.chatEmptyState}>
<ShieldLockRegular
Expand Down Expand Up @@ -939,4 +926,4 @@ const Chat = () => {
)
}

export default Chat
export default Chat
1 change: 0 additions & 1 deletion static/assets/index-0fcbd056.css

This file was deleted.

Loading

0 comments on commit c6e68b0

Please sign in to comment.