Spaces:
Running
Running
Commit History
-
Move vars to dynamic, add metrics (#1085)
Unverified signature* Add healthcheck route * Add prom client with basic metrics * wip: serve metrics on a different port * exclude server from tsconfig * latest * refacto(all): use class & singleton * refacto(all): use class & singleton * refacto(all): add request logs * Make all the env vars dynamic (#1092) * Add truncate to task model (#1090) * retry text area height (#1091) * Make all the env vars dynamic * only check for db at runtime * remove secret from build step * improve dockerfile * Wrap db in singleton * add .env.local to dockerignore * changes to dockerfile * lint * aborted generations * move collections build check * Use a single dockerfile * lint * fixes * lint * don't return db during building * remove dev --------- Co-authored-by: Victor Muštar <victor.mustar@gmail.com> * refacto(all): update default metrics port * fix recursion error * add version check * revert vite preview * Move request …98b1c51
-
Use pino for logs (#1086)
Unverified signature* Use pino for logs * Use logger for info * Add errorId to the logsddbe7d2
-
[Assistants] trending feature (#938)
Mishig +1: coyotte508Unverified signature* [Assistants] trending feature * cleaner sort query * create & use `AssistantStats` collection * fix grouping * rm usage of migration * ♻️ Refacto lock usage / AssistantStat * 🩹 Fix last24HoursCount.count => last24HoursCount * 🐛 Fix collection name * 🐛 Fix DB query * 🐛 Fix rate limit on assitant creation * 🐛 Fix aggregation query * ✨ Only run refreshAssistants if assistants are enabled * hide UI until we have enough stats collection --------- Co-authored-by: coyotte508 <coyotte508@gmail.com>a4c3fca
-
Automated migration setup (#897)
Unverified signature* Initial migration setup for chat-ui * refresh the lock regularly while the migrations are running * add index for migrationResults * clean up code a bit * Don't try to run migrations when sveltekit is building * simplified lock code * Add early check for migrations being done Reduce timer for lock * migration use `generateSearchTokens` * Update src/lib/migrations/migrations.spec.ts Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> --------- Co-authored-by: Mishig Davaadorj <dmishig@gmail.com> Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>4dbcbb6
-
✨ Add stats on conversations (#828)
Eliott C +1: nsarrazin Unverified signature* ✨ Add stats on conversations * 🩹 Fix conversation stats compute * ⚡️ Slightly better index * 🔊 * 🩹 Some fixes * 🐛 Fix aggregation query * 🐛 Fix $merge stage of query * 🐛 Fix query on sessionId * ✨ Compute weekly/monthly unique users * 🩹 Final tweaks * ⚡️ Split aggregations for better perf No need to recompute DAUs / WAUs and so on * ♻️ Deprecate PARQUET_EXPORT_SECRET & fix sec vuln * Add ADMIN_API_SECRET to CD action --------- Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>634bd69
-
Add an endpoints to expose models and conversations (#694)
Kevin CATHALY +3: Kevin CATHALY, nsarrazin, Eliott C. Unverified signature* Add an endpoint to expose available models * Add a route to list conversations history * use authCondition to filter current user's conversations * map models object to only keep needed params and also change the route path to /api/models * Put API feature behind feature flag (#695) * Puts the API behind a feature flag * Update src/hooks.server.ts Co-authored-by: Eliott C. <coyotte508@gmail.com> --------- Co-authored-by: Eliott C. <coyotte508@gmail.com> * add a better error when session's cookie is missing * rename error to message to be consistent --------- Co-authored-by: Kevin CATHALY <alakme@kevins-mbp.home> Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com> Co-authored-by: Eliott C. <coyotte508@gmail.com>c30d191
-
Session management improvements: Multi sessions, renew on login/logout (#603)
Unverified signature* wip: update sessionId on every login * comment out object.freeze * only refresh cookies on post * Add support for multiple sessions per user * fix tests * 🛂 Hash sessionId in DB * 🐛 do not forget about event.locals.sessionId * Update src/lib/server/auth.ts Co-authored-by: Eliott C. <coyotte508@gmail.com> * Add `expiresAt` field * remove index causing errors * Fix bug where sessions were not properly being deleted on logout * Moved session refresh outside of form content check --------- Co-authored-by: coyotte508 <coyotte508@gmail.com>e4a770a -
Only refresh cookie on post (#606)
Unverified signatureb1c120f
-
🔒️ Harden session ID generator (#599)
Eliott CUnverified signature265abf1
-
Misc julien tweaks (#525)
Unverified signature* Fix formatting (whitespace) * typo * i think we can remove this now39fde06
-
Reopen: Feature/disable login for n messages (#356)
Unverified signature* disable login on first message * update banner here too * modal wording tweaks * prevent NaN * fix login wall * fix flicker * lint * put modal text behind login check * fix bug with sending messages without login * fix misalignment between ui and api * fix data update on disable login --------- Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>7c4fdc9
-
Revert "Option to disable login on first N messages (#352)"
This reverts commit 6183fe78b431f3b8319fa5b271ed017d2bdf47b4.0a662b7 -
Option to disable login on first N messages (#352)
Unverified signature* disable login on first message * update banner here too * modal wording tweaks * prevent NaN --------- Co-authored-by: Victor Mustar <victor.mustar@gmail.com>6183fe7
-
Added ChatUI branding & put theming behind an env variable (#298)
Unverified signature* Moved all huggingchat branding behind an env variable * Refactored branding to use multiple env variables * pr review * prettier * move the ethics modal behind the flag PUBLIC_APP_DISCLAIMER * inline chat ui logo so it would take the color * flex-none5d07536
-
🐛 Fix "signin with HF" within space + CSRF (#236)
Eliott CUnverified signature767afa7
-
Login flow (#193)
Adrien Denat +2: Eliott C., victor Unverified signature* replace EthicsModal by LoginModal and start binding auth logic * start implementing login modal + give a try to @auth/sveltekit using Github oauth as a test * start custom auth implementation instead of auth.js for consistency with moon-landing * fetch user data from provider * add migration from anonymous to user + bind frontend * add missing auth secret + only migrate conversations for pre-existing users * remove email scope as it's not needed Co-authored-by: Eliott C. <coyotte508@gmail.com> * no need to define .well-known path Co-authored-by: Eliott C. <coyotte508@gmail.com> * use env var for hf hub website url * move sessionId to signature on csrf token exchange * remove ethic modal check and set default settings on new users * anonymous users can read only + modal on write tries * refresh session cookie when existing user signin again rather than use the old one * allow users to keep using the app without loging-in if env var is no…64d3841
-
✨ Backend preparation for "Sign in with HF" (#190)
Eliott CUnverified signature2e28042
-
Export to parquet (#151)
Eliott C +3: Eliott C., julien-c, victor Unverified signatureCo-authored-by: Eliott C. <coyotte508@gmail.com> Co-authored-by: Julien Chaumond <julien@huggingface.co> Co-authored-by: Victor Mustar <victor.mustar@gmail.com>3da7ec7 -
🛂 Prevent API calls without accepting ethics modal (#174)
Eliott CUnverified signatureb9f029b
-
🗃️ Store model inside conversation instead (#165)
Eliott CUnverified signature* 🗃️ Store model inside conversation instead * fixup! 🗃️ Store model inside conversation instead06e879d
-
🧑💻 Fix cookie settings for some devs
coyotte508e518a94
-
Fix gtm loading (#139)
Adrien DenatUnverified signature* try to get GA env to load * rollback to injection from the server hook * remove dead code184689c
-
🐛 Fix convos in spaces
coyotte508fff76f9 -
only set cookie as secure in production as it breaks Safari in development (#87)
Adrien DenatUnverified signatureeb6d216
-
Prettier update (#54)
Unverified signature* Update .prettierrc * prettify everthing prettify everything5da61b4
-
🔧 Change cookie name
coyotte50841b9769 -
🩹 Fix proxified headers + remove guard in hook (#27)
Eliott CUnverified signature3ddb8c6