Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Separate API Service for Web Interface #174

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

VVoruganti
Copy link
Collaborator

No description provided.

Copy link

vercel bot commented Nov 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tutor-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 4:17am

Copy link
Contributor

@bLopata bLopata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few nits/comments. Functionally seems there though.
EDIT: Do we want to remove /api with this also?

Comment on lines +40 to +45
// useEffect(async () => {
// const newConv = await createConversation();
// setConversationId(newConv?.conversationId);
// mutateConversations([newConv!]);
// }, [conversations]);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// useEffect(async () => {
// const newConv = await createConversation();
// setConversationId(newConv?.conversationId);
// mutateConversations([newConv!]);
// }, [conversations]);

Comment on lines +366 to +389
responseReader.releaseLock();
responseReader = null;

mutateMessages();
} catch (error) {
console.error('Chat error:', error);
setCanSend(true);
} finally {
// Cleanup
if (thoughtReader) {
try {
thoughtReader.releaseLock();
} catch (e) {
console.error('Error releasing thought reader:', e);
}
}
if (responseReader) {
try {
responseReader.releaseLock();
} catch (e) {
console.error('Error releasing response reader:', e);
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: release the responseReader lock in the finally clause.

throw new Error(`No response body for ${type} stream`);
}

console.log(`${type} stream connected successfully`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
console.log(`${type} stream connected successfully`);

@@ -73,17 +83,18 @@ export default function Sidebar({
});

if (isConfirmed) {
await conversation.delete();
await deleteConversation(conversation.conversationId);
// await conversation.delete();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// await conversation.delete();

@@ -20,11 +21,14 @@
"@stripe/stripe-js": "^4.9.0",
"@supabase/ssr": "^0.5.2",
"@supabase/supabase-js": "^2.45.6",
"ai": "^4.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using this? I didn't see any references to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants