-
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
Add Speaker Diarization for Interview Analysis #59
base: main
Are you sure you want to change the base?
Conversation
…ai into feature/speaker_diarization
Remove unused files and components
…ai into feature/speaker_diarization
…ai into feature/speaker_diarization
Add role based redirection
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.
@Abhishek-Jain-1925 please check given suggestions and apply wherever used in the entire project.
app/src/app/record/page.tsx
Outdated
|
||
if (!user) return redirect("/signin"); | ||
|
||
if (!user) return redirect("/signin"); |
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.
Modify above to improve readability and also move this logic to Higher Order component instead of calling separately for each page.
app/src/components/AiCruitForm.tsx
Outdated
|
||
const form = useForm<AiCruitRequest>({ | ||
resolver: zodResolver(aiCruitRequestSchema), | ||
defaultValues: { |
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.
always use constants for default values and the constants should be defined in separate file.
name="candidate_name" | ||
render={({ field }) => ( | ||
<FormItem> | ||
<FormLabel>Candidate Name</FormLabel> |
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.
store form attributes and labels in constant and use that map it with FormField.
Remove inappropriate redirection Fix naming conventions Code optimization
<p>Overview -</p> | ||
<ReadMore | ||
summary={ | ||
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum." |
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.
remove static response messages
@@ -18,6 +18,21 @@ export const signupUserSchema = z.object({ | |||
|
|||
}); | |||
|
|||
export const aiCruitRequestSchema = z.object({ |
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.
have all the constants in a single file
interviewerName: interviewAnalysis.interviewerName, | ||
}) | ||
.from(interviewAnalysis) | ||
.limit(10) |
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.
avoid using numbers without context. Use constants to improve readability
if (error instanceof z.ZodError) { | ||
return new Response(error.message, { status: 422 }); | ||
} | ||
return new Response("Failed to fetch error analysis", { status: 500 }); |
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.
Store all the error/success messages in one file and then use.
No description provided.