-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactor Stage 1 API and implement stage 2 API #26
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ssage type and improve error handling
…ersation handling in API routes
…ts; refactor group data handling
…for improved data integrity
…dling; introduce StudentSpeak type
… update endpoints to use GET and PUT methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 15 changed files in this pull request and generated 4 comments.
Files not reviewed (9)
- .env.example: Language not supported
- package.json: Language not supported
- src/routes/api/stt/+server.ts: Evaluated as low risk
- src/lib/schema/conversation.ts: Evaluated as low risk
- src/lib/server/prompt.ts: Evaluated as low risk
- src/lib/server/llm.ts: Evaluated as low risk
- scripts/pdf2text.ts: Evaluated as low risk
- src/routes/api/session/[id]/group/[group_number]/conversations/[conv_id]/summary/+server.ts: Evaluated as low risk
- src/lib/server/pdf.ts: Evaluated as low risk
Comments suppressed due to low confidence (1)
src/routes/api/session/[id]/group/[group_number]/add_discussion/+server.ts:29
- Ensure that 'discussions' is an array before spreading it to avoid potential runtime errors.
if (!data || !data.discussions) {
src/routes/api/session/[id]/group/[group_number]/add_discussion/+server.ts
Outdated
Show resolved
Hide resolved
src/routes/api/session/[id]/group/[group_number]/conversations/+server.ts
Outdated
Show resolved
Hide resolved
src/routes/api/session/[id]/group/[group_number]/conversations/[conv_id]/chat/+server.ts
Outdated
Show resolved
Hide resolved
src/routes/api/session/[id]/group/[group_number]/conversations/[conv_id]/chat/+server.ts
Show resolved
Hide resolved
…n/+server.ts Co-authored-by: Copilot <[email protected]>
…/+server.ts Co-authored-by: Copilot <[email protected]>
…/[conv_id]/chat/+server.ts Co-authored-by: Copilot <[email protected]>
…into stage-2-api
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support following endpoint API:
Create conversation
Method: POST
Endpoint: /api/session/[id]/group/[group_number]/conversations/+server.ts
RequestBody: {
task: string
subtasks: string[]
resources: string[]
}
Chat with LLM on conversation
Method: POST
Endpoint: /api/session/[id]/group/[group_number]/conversations/[conv_id]/chat/server.ts
RequestBody: {
content: string
audio: string // audio file id
}
Summary chat history for student in stage 1
Method: GET
Endpoint: /api/session/[id]/group/[group_number]/conversations/[conv_id]/summary/server.ts
Add one new discussion in group
Method: POST
Endpoint: /api/session/[id]/group/[group_number]/discussions/add/+server.ts
RequestBody: {
content: string
speaker: string // speaker name not id
}
Summary the group discussions
Method: GET
Endpoint: /api/session/[id]/group/[group_number]/discussions/summary/+server.ts
Update the group discussions summary
Method: PUT
Endpoint: /api/session/[id]/group/[group_number]/discussions/summary/+server.ts