Spaces:
Running
Running
Commit History
-
[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
-
Expose sampling controls in assistants (#955) (#959)
Unverified signature* Expose sampling controls in assistants (#955) * Make sure all labels have the same font size * styling * Add better tooltips * better padding & wrapping * Revert "better padding & wrapping" This reverts commit 1b44086465040f2cb6bc906983cfc8d95820d6fe. * ui update * tooltip on mobile * lint * Update src/lib/components/AssistantSettings.svelte Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> --------- Co-authored-by: Victor Mustar <victor.mustar@gmail.com> Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>d4016bc
-
Dynamic system instructions (#949)
Unverified signature* Dynamic system instructions * disable tag rendering if the feature is disabled * make time & date tags bold * fix bug enabling dynamic prompt on assistant creation * Move fetching at prompt building time * get rid of date & time tags * use `url=` for tags * add env flag check * Add more detailed errors in prompt * wording * token counter * modal update * wording * hide disabled if dynamic prompt is enabled * add template variables parsing * regex update * same regex * regex again * sys prompt max height * rm unused * Always use absolute URL in links * trying something * Revert "trying something" This reverts commit e30ab33f801fad31cbcaa7b89c47c79d4aca86a6. * wording * remove debug log * last wording tweak --------- Co-authored-by: Victor Mustar <victor.mustar@gmail.com>6887755 -
[Websearch] change context schema (#944)
MishigUnverified signature2e2f16c
-
Count system prompt tokens (#850)
Mishig +1: nsarrazin Unverified signature* Count sysmte prompt tokens * show error only once * fix * fix css * simplify * fix * simplify * Revert "simplify" This reverts commit 61c0a2281f9795c4a4351d9ad473993a3c01c59f. * `model.tokenizer` config & fix reactivity issues * rm gated tokenizer * use `truncate` --------- Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>50d8483
-
Store user agent in conversation (#940)
Unverified signature* Store user agent on conversation creation * casing headerd196c64
-
Add websearch controls for assistants (#812)
Unverified signature* remove query modifiers from generateQuery * Add backend for assistant RAG * Add front-end for updating RAG assistant * enable web parser to return plaintext directly for matching headers * Update websearch flow for handling assistant rag preferences * Add our old blocklist to .env.template * Enable websearch to run on messages depending on assistant requirements * reorganized imports * Rename vars * use projection * Add environment variable for assistant rag * fix assistant rag on runwebsearch * fix styling if rag is disabled * make sure we always omit credentials when fetching web pages * Add new checks for SSRF, with a new env var `ENABLE_LOCAL_FETCH` * Use DNS to check if the links are local or not * Add a websearch indicator * Add more tags to parser * Add indicators * Display RAG options in settings view * ui * fix rag detection * bit more spacing * fix button position in assistant form * wording (mainly) …3f5871c
-
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 -
[Assistants] Filter on names (#841)
Mishig +3: Eliott C., nsarrazin, victor Unverified signature* [Assistants] Filter on names * Add `$text` index on `assistant.name` (#844) * add maxlength * better experience * use `$meta: "textScore"` * Update src/routes/assistants/+page.server.ts Co-authored-by: Eliott C. <coyotte508@gmail.com> * null, not undefined * [Assistants] Filter on names (using searchTokens) (#873) Filter with `searchTokens` * input * rm extra whitespace * hide UI before migration * rm ad-hoc migration --------- Co-authored-by: Eliott C. <coyotte508@gmail.com> Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com> Co-authored-by: Victor Mustar <victor.mustar@gmail.com>10dbbd6
-
Use `uuid` for message ID generation instead of crypto method (#882)
Unverified signatureBecause `crypto.randomUUID()` is not available on non-secure contexts (for example `http` versions of chat-ui), this would break on non-https deployments of chat-ui. This should fix #870 and fix #868d8e839e
-
Models page (#849)
Unverified signature* add models page * add logo * models discussion * add default hint * Update +page.svelte * mishig review * fix typecheck --------- Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>25c844d
-
✨ 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
-
Make compatible with Microsoft Entra (v1 and v2 tokens) (#821)
Unverified signature* Make the profile picture claim optional Some identity providers (such as Azure AD) do not provide or support the picture claim. This patch makes it optional. * Allow using Microsoft Entra v1 tokens --------- Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>6244c37
-
Conversation trees (#223) (#807)
Unverified signature* work on branching * branching * work on input field * wip * wip * helper stuff * pass tests * add type guards and clean up type requirements * fixed shared conv type * more helpers stuff * clean up code * addChildren helper * addSibling * add test for addSibling & refacto addChildren tests * backend work pt. 1 * backend done * add children property to messages for easier frontend rendering * fix message id type rail * front-end work on simple linear conversation * fix title generation * convert conversations on post * server side retry works with branching * clean up buttons * fix retry feature backend * Send new messages in any subtree * make edit previous prompts feature work * fix padding * revert unneeded changes * bring back pending message * fix front-end streaming * fix initial message * Revert "fix initial message" This reverts commit 6257fe8789c52a20e7506aa453efda55c16e95bb. * …e6addfc -
Ask for a reason when reporting assistants (#825)
Unverified signature* Show modal asking for assistant report reason * fix disabled button styling * parse with zod * Update src/routes/settings/assistants/[assistantId]/ReportModal.svelte Co-authored-by: Victor Muštar <victor.mustar@gmail.com> * use a text area with max-w --------- Co-authored-by: Victor Muštar <victor.mustar@gmail.com>3109a5e
-
Added support for SearXNG as a websearch source (#805)
Karlostavitch1 +1: nsarrazin Unverified signature* Created searchSearxng.ts for querying and parsing searxng instance. Added searxng to the searchWeb.ts to ensure inclusion in the search initialisation script. Added searxng to +layout.server.ts to ensure the search button is enabled if url provided in .env.local assignment Updated .env to include searxng configuration Updated README.md under Web Search Config to mention addition of searxng URL use in .env * Changes requested consolidated env variable to SEARXNG_QUERY_URL (felt considering the content the word QUERY was more relevant) refactored the searchSearxng.ts to generate the query with the new variable updated related references to variable (.env, searchWeb.ts and +layout.server.ts) Updated readme and variable comment on .env to reflect the same * urefectored to display SearXNG in search dialoge when used. * lint * types --------- Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>7c22da3
-
Bring back featured check on top assistants page (#765)
Unverified signature0b2a549
-
Top assistants page (#740)
Unverified signature* Basic top assistants page * remove featured check * fix edit * ui update * ui * mishig review * fix * move feedback link to settings * misc * Hide unlisted models in assistants flow * settings + public label * tweak * font-size * Hide top assistant page for soft release * always show author --------- Co-authored-by: Victor Mustar <victor.mustar@gmail.com>786115c
-
Assistants feature (#639)
Unverified signature* First push on assistants * push fixes * fix add assistant * Sign up works * lint * mobile layout fixes * design fixes * Merge branch 'main' into feature/assistants * fix copy button * add error feedback * hide duplicate feature * remove wrong comments * add autoredirect if assistant is missing * latest changes: - add edit feature - hash assistant avatar - get rid of ugly line - check for non existent avatar - make a better looking upload icon * Update src/routes/conversation/+server.ts Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> * reused type more cleanly * fix type in shared conversation * fixed feature * fix: share conv with an assistant * delete assistant avatars in db when deleting avatar * affordance on avatar upload * improve assistant conv start on mobile * settings modal fly in * better mobile intro * mobile padding * link affordance * Make assistants disabled by default, b…992a8de
-
Continue generation feature (#707)
Unverified signature* Initial work on continue feature * Move continue button * Fix websearch with continue * Make it work with every model * Update src/routes/conversation/[id]/+server.ts Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> * fixes * async all the things * add reduce comment * remove log * Only show loading indicator if not continuing --------- Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>77399ca
-
Mv embeddingEndpoints.ts (#688)
MishigUnverified signature* Mv embeddingEndpoints.ts * relative import41f8b74
-
Add embedding models configurable, from both transformers.js and TEI (#646)
Unverified signature* Add embedding models configurable, from both Xenova and TEI * fix lint and format * Fix bug in sentenceSimilarity * Batches for TEI using /info route * Fix web search disapear when finish searching * Fix lint and format * Add more options for better embedding model usage * Fixing CR issues * Fix websearch disapear in later PR * Fix lint * Fix more minor code CR * Valiadate embeddingModelName field in model config * Add embeddingModel into shared conversation * Fix lint and format * Add default embedding model, and more readme explanation * Fix minor embedding model readme detailed * Update settings.json * Update README.md Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> * Update README.md Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> * Apply suggestions from code review Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> * Resolved more issues * lint * Fix more issues …3a01622
-
Add feature to unlist a model (#625)
Unverified signature41f29a4
-
Reworked settings menu (#591)
Unverified signature* initial work on new settings page * new settings - fully working * tweak to settings layout * Added model links * lint * redirect on bad model * delete error page * fix links & reset button * add saving indicator * Make new settings work on mobile * small tweak mobile * Fix preprompt so it gets read correctly from the model.preprompt (#595) * 🔒️ Harden session ID generator (#599) * bump svelte & related to latest (#600) * Update dockerfile to node 20 (#601) * Only refresh cookie on post (#606) * Session management improvements: Multi sessions, renew on login/logout (#603) * 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 * r…2cb745f
-
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
-
Add support for tgi multimodal models (#531)
Unverified signature* wip: add support for tgi multimodal models * wip work on passing images to prompt * working idefics config! * rm allowed conv feature * lint * Add image resizing * fix ssr * add upload button * add delete button * misc formatting * lint * server file size check * optimistic update of images * retry with images * fix websearch button * lint * better error handling & max one image at a time * replace test image by blank one * disable loading on page change * Fix sharing of images * fix comments * Update filedropzone (#544) * Update src/lib/buildPrompt.ts Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> * small tweaks * Fix merge conflicts * lint * wildcard image mime type * fix lint and comment * added comments * added comment about file size * Readme update --------- Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> Co-authored-by: Victor Mustar <victor.mustar@g…0e5c445
-
add you.com integration (#514)
mrbean +2: David Li, MishigUnverified signature* add you.com integration * [Feat] Add types (#1) * feat: add types * feat: specify search provider * [Feat] add return values (#3) * feat: add types * feat: specify search provider * add values for ui * add idea to gitignore * lint and downgrade * Revert "lint and downgrade" This reverts commit fbfe012cf4d6aaf5ea00508ca0f99a408ce152e6. * Updates to you.com integration (#4) * `npm run format` * enable search when `YDC_API_KEY` is available * typing nit * enum WebSearchProvider * eslint-disable-next-line no-shadow * downgrade * You.com already provides text snippets (#5) * Order desc you.com results by text length * You.com already provides texts from webpages * add to env * Update .env Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> * Update src/lib/server/websearch/searchWeb.ts --------- Co-authored-by: David Li <david.li3100@gmail.com> Co-authored-by: Mishig <mishig.davaadorj@coloradocoll…4606755
-
Add checkbox for displaying emojis in sidebar (#520)
Unverified signature* Add settings for displaying emojis in sidebar * updated wording4e58dda
-
Title update occur when available (#512)
Unverified signature* wip: rename happens realtime * Make title change happen when available * remove debug log * rm commented out code * lint * replace queue by single value * remove .js * reset initial pending message after writingf249cfc
-
Update websearch prompting & summary prompting (#503)
Unverified signature* Use the task model for websearch query generation * summary with examples in chat format * Update to websearch prompting - Removed web search template - Added examples in `generateQuery` - Passed previous questions when generating the web search query - Added previous questions to the bottom of the context window in `buildPrompt` when using websearch * wait for model if needed * rm console.log * get rid of regex * added a few time related examples * Update src/lib/server/websearch/generateQuery.ts Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu> * reformat yesterday * test * fix whitespace * remove extra whitespace for mistral * removed mistral extra whitespace * Update src/lib/server/summarize.ts Co-authored-by: Victor Muštar <victor.mustar@gmail.com> * Update src/lib/server/summarize.ts Co-authored-by: Victor Muštar <victor.mustar@gmail.com> * add an emoji if none is found in the first three characters ----…1e5090f
-
Backend refactor for streaming endpoints (#444)
Unverified signature* wip: complete refactor of streaming backend * working refactoring * fix missing first token & perf regression in output quality * lint * Fix websearch loading from db * fix loading * fix invalidate * remove logs * fix SSR error * typo: paragraphs * fixed save on abort * lint * lint * remove debug log in console * lint for reale943a05
-
[Websearch] update (#427)

Mishig +2: julien-c, victor Unverified signature* Fix reuqest body * update webSearchQueryPromptTemplate * update generate google query parser * Add today's date to google search query creator * crawl top stories if exts; remove answer_box & knowledgeGraph * Create paragraph chunks from top articles * flattened paragprah chunks * update status texts * add gradio client * call gradio app for RAG * Web scrape only "p, li, span" els * add MAX_N_CHUNKS * gradio result typing * parse only <p> elements * rm dev change * update typing WebSearch * buld RAG prompt * Rm dev change * change websearch context msg from user to assisntat type * use hosted gradio app * fix lint * prompt engineering * more prompt engineering * MAX_N_PAGES_SCRAPE = 10 * better error msg * more prompt engineering * revert websearch prompt to previous * rm `top_stories` from websearch as the results are not good * Stop using gradio client, use regular fetch * chore * Rm websearch…ebac87f
-
Store IP in messageEvents
b8c0a1d
-
Support custom system prompts from the user (#399)
Unverified signature* Support custom system prompts from the user * linter * types & lintcd6894d -
Make all prompt templates configurable (#400)
Unverified signature* Make all prompt templates configurable This PR enables all prompts to be configurable using handlebar templates as described in #382. For backward compatibility the old hardcoded templates are reimplemented as the default templates. The old template parameters such as `preprompt`, `userMessageToken`, `userMessageEndToken`, `assistantMessageToken`, `assistantMessageEndToken` are now considered legacy. They still work as they are exposed as variables to the default template. However, new prompt configurations should not use these. And it is recommended that the legacy support is eventually removed. As an example, this is how the default chat prompt template is implemented: ``` {{preprompt}} {{#each messages}} {{#ifUser}}{{@root.userMessageToken}}{{content}}{{@root.userMessageEndToken}}{{/ifUser}} {{#ifAssistant}}{{@root.assistantMessageToken}}{{content}}{{@root.assistantMessageEndToken}}{{/ifAssistant}} {{/each}} {{assistantMessageToken}} ``` In addition, …447c0ca
-
Add ability to define custom model/dataset URLs (#347)
Unverified signature* Add ability to define custom model/dataset URLs * lint --------- Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>ce2231f
-
Add optional timestamps to messages (#294)
Unverified signature* add optional timestamp field to messages * Add a `hashConv` function that only uses a subset of the message for hashing1eff97d
-
very basic rate limiter (#320)
Unverified signature922b1b2
-
Added Serper.dev API as an alternative web search provider (#302)
rogerserperUnverified signature6f7b315
-
Fix typo in Settings.ts (#286)
Unverified signatureexplictly -> explicitlydf5a2eb
-
Refactor of websearch (#281)
Unverified signature* broke up websearch into multiple endpoints * Refactored loading to use the load function instead of client side fetching * lint * Chat Logo Home Screen Bookmark icons for iOS (#279) * prettier fix for #279 * fix eslint --------- Co-authored-by: Carolyn Marie <99927612+CarolynM8ri3@users.noreply.github.com>6434339
-
Add initial support for web browsing (#237)
Unverified signature* basic poc for web search * * Hide feature when serpapi_key is not defined * handle error case where serpapi failed * only use user queries for generating the query * Update src/lib/buildPrompt.ts Co-authored-by: Eliott C. <coyotte508@gmail.com> * Update src/routes/+layout.server.ts Co-authored-by: Eliott C. <coyotte508@gmail.com> * refactored getQueryFromPrompt * add jsdom to package.json * begin work on fetching webpage content * Update .env Co-authored-by: Eliott C. <coyotte508@gmail.com> * prettier fix * Add feature for scraping webpages * refactored search functionality - now gets triggered from a separate endpoint - results are stored in db - results can be displayed in their own endpoint * Added a stream to send updates from backend on web-search endpoint * made stream more reliable * Add front-end to web search feature * made sure the web results button appears on newly posted messages * close modal when message is don…0c4cf03
-
feat openid login with google (#250)
Unverified signatureCo-authored-by: coyotte508 <coyotte508@gmail.com>fa3b3b4
-
✨ add thumb up/down voting system for messages (#152)
Adrien Denat +1: coyotte508Unverified signature* add thumb up/down voting system for messages * make like/dislike buttons toggle + bind to server * refactor vote API to better endpoint structure * set score to undefined rather than 0 when toggled * throw if message is not found + refactor retry dispatch * fix undefined class * Only make the buttons invisible if there's no score Co-authored-by: Eliott C. <coyotte508@gmail.com> * only allow thumb up/down if user is the author of the messages * always show thumbs up/down when voted * use MongoDB instead of mutating messages array in code * fix typings * fix linting issue * refactor code to throw before ifs * add auth logic to vote API endpoint * lint fix after merge conflict * on mobile only show thumbs on top + increase spacing between messages * fix thumbs always showing on mobile --------- Co-authored-by: coyotte508 <coyotte508@gmail.com>5b779a6
-
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