quivr/frontend/lib/hooks/useAuthModes.ts
Stan Girard 0dd1d12e6a
Add config parameter to conversational_qa_chain (#2540)
This pull request adds a new config parameter to the
`conversational_qa_chain` function. The config parameter allows for
passing metadata, specifically the conversation ID, to the function.
This change ensures that the conversation ID is included in the metadata
when invoking the `conversational_qa_chain` function.
2024-05-04 11:05:29 -07:00

13 lines
371 B
TypeScript

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
export const useAuthModes = () => {
const authModes = process.env.NEXT_PUBLIC_AUTH_MODES?.split(",") ?? [
"password",
];
return {
magicLink: authModes.includes("magic_link"),
password: authModes.includes("password"),
googleSso: authModes.includes("google_sso"),
};
};