Commit Graph

667 Commits (main)

Author SHA1 Message Date
Nathan Sarrazin 7d0668d191
Deploy HuggingChat changes manually only (#993) 2024-04-08 17:00:11 +02:00
Nathan Sarrazin 8c1127f401
Bump version to 0.8.1 (#992) 2024-04-08 13:18:36 +02:00
Nathan Sarrazin 0676b381be
Use proper semver for major minor & patch releases in CI/CD (#991) 2024-04-08 13:06:43 +02:00
Nathan Sarrazin 66816911a9
Use raw for versioning (#990) 2024-04-08 12:51:49 +02:00
Nathan Sarrazin ff05f84b2e
Make sure CI/CD is the same for no DB image (#989)
* Make sure CI/CD is the same for no DB image

* get package version
2024-04-08 12:46:43 +02:00
Nathan Sarrazin ebac27c9f1
Publish docker images based on package.json version (#988)
* Publish docker images based on package.json version

* fix build image
2024-04-08 12:41:14 +02:00
Nathan Sarrazin 9437108347
Move default template so it doesn't override tokenizer (#987) 2024-04-08 12:39:20 +02:00
Zac Pullar-Strecker 896e0fea5b
Update package.json version (#983)
* Update package.json version

To correspond with v0.8 release.

* Update version in package-lock.json

---------

Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
2024-04-08 12:39:02 +02:00
Nathan Sarrazin 619722b036
Set ChatML as default chat prompt template (#985) 2024-04-08 08:57:37 +02:00
dependabot[bot] a9c711026b
Bump undici from 5.28.3 to 5.28.4 (#979)
Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.3...v5.28.4)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 08:32:39 +02:00
Nathan Sarrazin d323cb0acf
quick fix error message (#977) 2024-04-04 16:10:27 +02:00
Nathan Sarrazin a99cca3f95
Add support for cohere endpoints (#976)
* Add support for cohere endpoints

* readme update
2024-04-04 16:02:28 +02:00
Nathan Sarrazin 0819256ea4
Use jinja template for chat formatting (#730) (#744)
* Use jinja template for chat formatting

* Add support for transformers js chat template

* update to latest transformers version

* Make sure to `add_generation_prompt`

* unindent
2024-04-04 12:38:54 +02:00
dependabot[bot] e02792165b
Bump vite from 4.5.2 to 4.5.3 (#974)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.5.2 to 4.5.3.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v4.5.3/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.3/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-04 10:22:55 +02:00
Nathan Sarrazin cb000d3321
Implement Cloudflare Workers AI endpoint (#907) (#972)
* Implement Cloudflare Workers AI endpoint (#907)

* Renamed to Cloudflare Workers AI in docs

* Add note about sampling parameters

* clean up env example
2024-04-03 11:56:38 +02:00
Nathan Sarrazin a01ed5ac77
Group tokens randomly (#964)
* Group tokens together

* remove unused comment

* Send final buffer at the end if needed
2024-04-02 22:46:05 +02:00
Victor Muštar eb956bc775
User count update (#970)
* add more range

* display on assitant page too
2024-04-02 21:47:09 +02:00
Nathan Sarrazin df27d779de
Fix button placement on assistant edit/create form (#962)
* Fix button placement on assistant edit/create form

* rm unnecessary changes

* Fix alignment
2024-04-02 11:51:22 +02:00
Nathan Sarrazin 55af70d19d
Add share button for assistant intro page (#960) (#965)
* Add share button for assistant intro page

* Fix padding on share assistant

* gap

---------

Co-authored-by: Victor Mustar <victor.mustar@gmail.com>
2024-04-02 11:33:40 +02:00
Paul Piper 3ebd3a817e
Google Vertex API support (#950)
* Added Google Vertex API support

Google Application credentials can be set via

GOOGLE_APPLICATION_CREDENTIALS = clientid.json

* Updated the readme file

* Updated the package-lock file

* Updated the package-lock file
Fixed minor issues

* Moved "@google-cloud/vertexai" to optional dependencies

* Updated for lint checker
2024-04-02 09:08:10 +02:00
Mishig 9a4b7ace4b
[Trending assistants] make ui visible (#966) 2024-03-29 02:30:21 -07:00
Mishig a4c3fca542
[Assistants] trending feature (#938)
* [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>
2024-03-28 15:15:52 +01:00
dependabot[bot] 3bfcc016b0
Bump katex from 0.16.8 to 0.16.10 (#956)
Bumps [katex](https://github.com/KaTeX/KaTeX) from 0.16.8 to 0.16.10.
- [Release notes](https://github.com/KaTeX/KaTeX/releases)
- [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md)
- [Commits](https://github.com/KaTeX/KaTeX/compare/v0.16.8...v0.16.10)

---
updated-dependencies:
- dependency-name: katex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-28 08:50:35 +01:00
Nathan Sarrazin b0e461b56e
Remove commented out code in tailwind config (#957)
* User Inter as font

* Use latest inter as font

* remove inter in codebase
2024-03-27 16:06:02 +01:00
Nathan Sarrazin d4016bc810
Expose sampling controls in assistants (#955) (#959)
* 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 1b44086465.

* 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>
2024-03-27 15:17:46 +01:00
Nathan Sarrazin e9ad67e576
Limit number of fetched conversations in the API (#954)
* Limit number of fetched conversations in the API

* Add pagination

* use var
2024-03-25 15:41:34 +01:00
Nathan Sarrazin 6887755fab
Dynamic system instructions (#949)
* 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 e30ab33f80.

* wording

* remove debug log

* last wording tweak

---------

Co-authored-by: Victor Mustar <victor.mustar@gmail.com>
2024-03-25 14:39:27 +01:00
Mishig 2e2f16c198
[Websearch] change context schema (#944) 2024-03-25 03:57:40 -07:00
Eliott C 506e596feb
🚸 When a user signs up they're directly logged in (#952)
* 🚸 When a user signs up they're directly logged in

* lint

---------

Co-authored-by: coyotte508 <coyotte508@protonmail.com>
Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
2024-03-22 16:22:41 +01:00
Kevin CATHALY 5f6402409f
add api assistants endpoints (#951)
* add api assistants endpoints

* lint

---------

Co-authored-by: Kevin CATHALY <alakme@kevins-macbook-pro.home>
Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
2024-03-22 15:13:17 +01:00
Mishig 50d848350c
Count system prompt tokens (#850)
* Count sysmte prompt tokens

* show error only once

* fix

* fix css

* simplify

* fix

* simplify

* Revert "simplify"

This reverts commit 61c0a2281f.

* `model.tokenizer` config & fix reactivity issues

* rm gated tokenizer

* use `truncate`

---------

Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
2024-03-22 13:51:43 +01:00
Chang Chi, Meng c6129c38dc
Enhance Dynamic User Attribute Handling in OIDC Integration (#885)
* Refactor `updateUser` to Support Dynamic `nameClaim` Configuration

* style: run Prettier to fix lint errors

* Validate NAME_CLAIM in OIDConfig schema

* Refactor userData parsing

---------

Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
Co-authored-by: ‘XGungo’ <‘daniel2000890311g@gmail.com’>
2024-03-22 10:25:10 +01:00
Liam Dyer 8583cf1fe6
feat: smooth and combine token output (#936)
* feat: smooth and combine token output

* fix: stop generating button not triggering message updates abort
2024-03-22 09:40:58 +01:00
Victor Muštar 999407a7a8
Modals: dont close if text is selected (#943)
dont close if text is selected
2024-03-20 10:57:24 +01:00
Victor Muštar 2ce726fde1
Update AssistantSettings.svelte (#941) 2024-03-18 17:53:20 +01:00
Nathan Sarrazin 2a5cd757dd
make `@anthropic-ai/sdk` optional in `package-lock.json` (#939) 2024-03-18 15:23:49 +01:00
Nathan Sarrazin d196c64941
Store user agent in conversation (#940)
* Store user agent on conversation creation

* casing header
2024-03-18 15:17:40 +01:00
Aakash Roy 1d6151d0dd
fix: Update .env HF_Token Comment (#935) 2024-03-18 13:45:34 +01:00
Nathan Sarrazin 233d2a9923
Prepend domain filters in search query generation (#932) 2024-03-15 16:44:37 +01:00
Yacine Jernite 03d320000e
Update public disclaimer: personal data (#793)
Suggested edit to update the language of the disclaimer to cover health decisions and personal data.

Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
2024-03-15 15:46:11 +01:00
Zac Pullar-Strecker 7849c301b8
Fix model identification when creating conversations (#820)
PR #181 introduced a model ID field so that models could be switched out
without breaking existing conversations. However, the new conversation
endpoint incorrectly uses the model name instead of ID, so without this
fix it was not possible to have a model with a different ID and name.

Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
2024-03-15 15:22:46 +01:00
Nathan Sarrazin e04d4e8f40
Show error when webpage cannot be reached or parsed (#930) 2024-03-15 13:53:10 +01:00
Nathan Sarrazin cbf4205092
Fix multi domains for assistants (#929) 2024-03-15 13:50:05 +01:00
Nathan Sarrazin 89f9b29f53
Remove extra > in URLs (#931) 2024-03-15 13:36:38 +01:00
Liam Dyer 5a310184fd
Anthropic Endpoint Support (#923)
feat: anthropic endpoint
2024-03-15 10:40:21 +01:00
Nathan Sarrazin 3f5871cf15
Add websearch controls for assistants (#812)
* 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)

* reduce number of tags

* Bump max URLs from 3 to 10

* add ul and ol to parseWeb

* change splitting string

* link style

* wording

* add feedback link

* Update src/routes/settings/(nav)/assistants/[assistantId]/+page.svelte

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/routes/settings/(nav)/assistants/[assistantId]/+page.svelte

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/routes/assistants/+page.svelte

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/routes/settings/(nav)/assistants/[assistantId]/+page.svelte

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/lib/components/chat/ChatWindow.svelte

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/routes/settings/(nav)/assistants/[assistantId]/+page.svelte

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* Update src/lib/components/AssistantSettings.svelte

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>

* lint

* throw error if not a string

* simplify rag check

---------

Co-authored-by: Mishig <mishig.davaadorj@coloradocollege.edu>
Co-authored-by: Victor Mustar <victor.mustar@gmail.com>
2024-03-14 18:49:53 +01:00
reversebias eb071be4c9
Fix prompt caching on llama.cpp endpoints (#920)
Explicitly enable prompt caching on llama.cpp endpoints

Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
2024-03-11 09:20:09 +01:00
Kartik Shetty 2edb278870
fix: Prompt bypasses login (#921)
Fixes#879 checking login requirement in chat window
2024-03-11 09:09:01 +01:00
Martok88 f7db219266
Add openai embeddings (#915)
* Add OpenAI embedding compatibility

* Use OPENAI_API_KEY by default

* lint

* Add default OpenAI URL
replace `authorization` by `apiKey`

* Add a note in readme

---------

Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
2024-03-08 18:07:44 +01:00
Nathan Sarrazin 0081568dec
Remove double meta tags on models page (#918)
* Remove double meta tags

* Remove unknown property
2024-03-08 15:00:21 +01:00