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

Refactor Stage 1 API and implement stage 2 API #26

Merged
merged 15 commits into from
Dec 19, 2024
Merged

Conversation

TakalaWang
Copy link
Contributor

@TakalaWang TakalaWang commented Dec 19, 2024

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

Copy link
Contributor

@Copilot Copilot AI left a 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) {

@JacobLinCool JacobLinCool removed their request for review December 19, 2024 09:49
@TakalaWang TakalaWang merged commit 999055e into main Dec 19, 2024
1 check passed
@TakalaWang TakalaWang deleted the stage-2-api branch December 19, 2024 16:07
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.

1 participant