Commit graph

1531 commits

Author SHA1 Message Date
David Shin
3120602d6a
feat: Add user icon in messages (#275)
* Update GPT4 model icon

* Add user icon support in messages
2023-05-15 11:51:58 -04:00
David Shin
9f36e195bc
Update GPT4 model icon (#274) 2023-05-15 10:08:30 -04:00
Danny Avila
6049c9e3ff
Fix react errors, max context tokens, and preset mobile view (#269)
* fix: react errors

* fix: max tokens issue

* fix: max tokens issue
2023-05-14 17:26:21 -04:00
Danny Avila
56ea9563b8
refactor(style.css): change font file paths (#268) 2023-05-14 12:12:56 -04:00
Anirudh
2cd6612620
Fonts (#261) 2023-05-14 12:06:53 -04:00
Anirudh
93dd1eb036
Add Popup Menu to Save Space in Sidebar (#260)
---------

Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
2023-05-14 11:42:17 -04:00
Anirudh
bf31b1fea0
Msg Clipboard to checkmark (optimistic UX) (#247)
* revert unintended package-lock.json change

* used default checkmark which is included in project

---------

Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
2023-05-14 09:00:20 -04:00
Danny Avila
3414690e42
Feat: PaLM 2 (#262)
* feat(api): add googleapis package to package.json
feat(api): add reqDemo.js file to make a request to Google Cloud AI Platform API to get a response from a chatbot model.

* feat: add PaLM2 support

* feat(conversationPreset.js): add support for topP and topK for google endpoint
feat(askGoogle.js): add support for topP and topK for google endpoint
feat(ask/index.js): add google endpoint
feat(endpoints.js): add google endpoint
feat(MessageHeader.jsx): add support for modelLabel for google endpoint
feat(PresetItem.jsx): add support for modelLabel for google endpoint
feat(HoverButtons.jsx): add support for google endpoint
feat(createPayload.ts): add google endpoint
feat(types.ts): add google endpoint
feat(store/endpoints.js): add google endpoint
feat(cleanupPreset.js): add support for topP and topK for google endpoint
feat(getDefaultConversation.js): add support for topP and topK for google endpoint
feat(handleSubmit.js): add support for topP and topK for google endpoint

* fix: messages payload

* refactor(GoogleClient.js): set maxContextTokens based on isTextModel value
feat(GoogleClient.js): add delay option to TextStream constructor
feat(getIcon.jsx): add support for google endpoint and PaLM2 model label

* feat: palm frontend changes

* feat(askGoogle.js): set default example to empty input and output
feat(Examples.jsx): add ability to add and remove examples
refactor(Settings.jsx): remove examples from props and setOption function

style(GoogleOptions): remove unnecessary whitespace after Settings2 import
feat(GoogleOptions): add addExample and removeExample functions to manage examples
fix(cleanupPreset): set default example to [{ input: '', output: ''}]
fix(getDefaultConversation): set default example to [{ input: '', output: ''}]
fix(handleSubmit): set default example to [{ input: '', output: ''}]

* style(client): adjust height of settings and examples components to 350px
fix(client): fix path to palm.png image in getIcon.jsx file

* style(EndpointOptionsPopover.jsx, Examples.jsx, Settings.jsx): improve button styles and update input placeholders

* feat (palm): finalize examples on the frontend

* feat(GoogleClient.js): filter out empty examples in options
feat(GoogleClient.js): add support for promptPrefix in buildPayload method
feat(GoogleClient.js): add support for examples in buildPayload method
feat(conversationPreset.js): add maxOutputTokens field to conversation preset schema
feat(presetSchema.js): add examples field to preset schema
feat(askGoogle.js): add support for examples and promptPrefix in endpointOption
feat(EditPresetDialog.jsx): add Examples component for Google endpoint
feat(EditPresetDialog.jsx): add button to show/hide Examples component
feat(EditPresetDialog.jsx): add functionality to add, remove, and edit examples in Examples component
feat(EndpointOptionsDialog.jsx): change endpoint name to PaLM for Google endpoint
feat(Settings.jsx): add maxHeight prop to limit height of Settings component in EditPresetDialog and EndpointOptionsDialog

fix(Settings.jsx): add examples prop to ChatGPTBrowser component
fix(EndpointItem.jsx): add alternate name for google endpoint
fix(MessageHeader.jsx): change title for google endpoint to PaLM
feat(endpoints.js): add google endpoint to endpointsConfig
fix(cleanupPreset.js): add missing comma in examples array

* chore: change endpoint order

* feat(PaLM 2): complete for testing

* fix(PaLM): handle blocked messages
2023-05-13 16:29:06 -04:00
Dan Orlando
3b4ed98c1d
fix browser refresh redirecting to /chat/new (#210) 2023-05-07 19:16:12 -04:00
Dan Orlando
dac19038a3
feat: Auth and User System (#205)
* server-side JWT auth implementation

* move oauth routes and strategies, fix bugs

* backend modifications for wiring up the frontend login and reg forms

* Add frontend data services for login and registration

* Add login and registration forms

* Implment auth context, functional client side auth

* protect routes with jwt auth

* finish local strategy (using local storage)

* Start setting up google auth

* disable token refresh, remove old auth middleware

* refactor client, add ApiErrorBoundary context

* disable google and facebook strategies

* fix: fix presets not displaying specific to user

* fix: fix issue with browser refresh

* fix: casing issue with User.js (#11)

* delete user.js to be renamed

* fix: fix casing issue with User.js

* comment out api error watcher temporarily

* fix: issue with api error watcher (#12)

* delete user.js to be renamed

* fix: fix casing issue with User.js

* comment out api error watcher temporarily

* feat: add google auth social login

* fix: make google login url dynamic based on dev/prod

* fix: bug where UI is briefly displayed before redirecting to login

* fix: fix cookie expires value for local auth

* Update README.md

* Update LOCAL_INSTALL structure

* Add local testing instructions

* Only load google strategy if client id and secret are provided

* Update .env.example files with new params

* fix issue with not redirecting to register form

* only show google login button if value is set in .env

* cleanup log messages

* Add label to button for google login on login form

* doc: fix client/server url values in .env.example

* feat: add error message details to registration failure

* Restore preventing paste on confirm password

* auto-login user after registering

* feat: forgot password (#24)

* make login/reg pages look like openai's

* add password reset data services

* new form designs similar to openai, add password reset pages

* add api's for password reset

* email utils for password reset

* remove bcrypt salt rounds from process.env

* refactor: restructure api auth code, consolidate routes (#25)

* add api's for password reset

* remove bcrypt salt rounds from process.env

* refactor: consolidate auth routes, use controller pattern

* refactor: code cleanup

* feat: migrate data to first user (#26)

* refactor: use /api for auth routes

* fix: use user id instead of username

* feat: migrate data to first user on register

* fix: fix social login routes after refactor (#27)

* refactor: use /api for auth routes

* fix: use user id instead of username

* feat: migrate data to first user on register

* fix: fix social login routes

* fix: issue with auto-login when logging out then logging in with new browser window (#28)

* refactor: use /api for auth routes

* fix: use user id instead of username

* feat: migrate data to first user on register

* fix: fix social login routes

* fix: fix issue with auto-login in new tab

* doc: Update README and .env.example files with user system information (#29)

* refactor: use /api for auth routes

* fix: use user id instead of username

* feat: migrate data to first user on register

* fix: fix social login routes

* fix: fix issue with auto-login in new tab

* doc: update README and .env.example files

* Fixup: LOCAL_INSTALL.md PS instructions (#200) (#30)

Co-authored-by: alfredo-f <alfredo.fomitchenko@mail.polimi.it>

* feat: send user with completion to protect against abuse (#31)

* Fixup: LOCAL_INSTALL.md PS instructions (#200)

* server-side JWT auth implementation

* move oauth routes and strategies, fix bugs

* backend modifications for wiring up the frontend login and reg forms

* Add frontend data services for login and registration

* Add login and registration forms

* Implment auth context, functional client side auth

* protect routes with jwt auth

* finish local strategy (using local storage)

* Start setting up google auth

* disable token refresh, remove old auth middleware

* refactor client, add ApiErrorBoundary context

* disable google and facebook strategies

* fix: fix presets not displaying specific to user

* fix: fix issue with browser refresh

* fix: casing issue with User.js (#11)

* delete user.js to be renamed

* fix: fix casing issue with User.js

* comment out api error watcher temporarily

* feat: add google auth social login

* fix: make google login url dynamic based on dev/prod

* fix: bug where UI is briefly displayed before redirecting to login

* fix: fix cookie expires value for local auth

* Only load google strategy if client id and secret are provided

* Update .env.example files with new params

* fix issue with not redirecting to register form

* only show google login button if value is set in .env

* cleanup log messages

* Add label to button for google login on login form

* doc: fix client/server url values in .env.example

* feat: add error message details to registration failure

* Restore preventing paste on confirm password

* auto-login user after registering

* feat: forgot password (#24)

* make login/reg pages look like openai's

* add password reset data services

* new form designs similar to openai, add password reset pages

* add api's for password reset

* email utils for password reset

* remove bcrypt salt rounds from process.env

* refactor: restructure api auth code, consolidate routes (#25)

* add api's for password reset

* remove bcrypt salt rounds from process.env

* refactor: consolidate auth routes, use controller pattern

* refactor: code cleanup

* feat: migrate data to first user (#26)

* refactor: use /api for auth routes

* fix: use user id instead of username

* feat: migrate data to first user on register

* fix: fix social login routes after refactor (#27)

* refactor: use /api for auth routes

* fix: use user id instead of username

* feat: migrate data to first user on register

* fix: fix social login routes

* fix: issue with auto-login when logging out then logging in with new browser window (#28)

* refactor: use /api for auth routes

* fix: use user id instead of username

* feat: migrate data to first user on register

* fix: fix social login routes

* fix: fix issue with auto-login in new tab

* doc: Update README and .env.example files with user system information (#29)

* refactor: use /api for auth routes

* fix: use user id instead of username

* feat: migrate data to first user on register

* fix: fix social login routes

* fix: fix issue with auto-login in new tab

* doc: update README and .env.example files

* Send user id to openai to protect against abuse

* add meilisearch to gitignore

* Remove webpack

---------

Co-authored-by: alfredo-f <alfredo.fomitchenko@mail.polimi.it>

---------

Co-authored-by: Danny Avila <110412045+danny-avila@users.noreply.github.com>
Co-authored-by: Alfredo Fomitchenko <alfredo.fomitchenko@mail.polimi.it>
2023-05-07 10:04:51 -07:00
Daniel Avila
2b7c1507ef style(Message.jsx): add whitespace-pre-wrap to the message editor to preserve line breaks 2023-04-21 23:12:45 -04:00
Danny Avila
3447137515
Merge pull request #179 from danny-avila/fix-unknown-conversationId
fix: fix infinite query failure when conversationId is not found
2023-04-11 19:52:42 -06:00
Daniel Avila
e68c163ef6 feat(Input/NewConversationMenu): save last selected model to localStorage
fix(getDefaultConversation.js): use last selected model from localStorage if available
2023-04-11 21:33:14 -04:00
Daniel Avila
5c5871afd8 style(endpoints.js): fix indentation and add semicolons
fix(tokenizer.js): add try-catch block and error handling
style(SetTokenDialog/index.jsx): fix typo in sentence
refactor(data-service.ts): change argument format to match server API
2023-04-11 10:28:11 -04:00
Daniel Avila
e0d5e75e73 fix: only give initialResponse unfinished true value when not a cancellable endpoint 2023-04-10 18:27:06 -04:00
Daniel D Orlando
fb7542c865 fix: fix infinite query failure when conversationId is not found 2023-04-10 14:55:39 -07:00
Daniel Avila
0bd240939a refactor(Message.jsx): remove cancelled message bubble and improve wording of unfinished message 2023-04-10 17:15:28 -04:00
Daniel Avila
78ae220f7e fix(Input): fix isNotAppendable condition to include isSubmitting variable
fix(Input): prevent submitting message when isSubmitting is true and Enter key is pressed
2023-04-10 17:03:11 -04:00
Wentao Lyu
fd0152e39f fix: typo 2023-04-11 03:50:37 +08:00
Wentao Lyu
f5f327e79e mark initial response as unfinished. 2023-04-11 03:42:05 +08:00
Wentao Lyu
9871127114 cleanup 2023-04-11 03:29:54 +08:00
Wentao Lyu
a5a0eab7f7 merge from dannya
feat: support unfinished messages.
2023-04-11 03:26:38 +08:00
Wentao Lyu
bbf2f8a6ca feat: support user-provided token to bingAI and chatgptBrowser 2023-04-10 14:51:38 +08:00
Daniel Avila
a953fc9f2b wip: feat: abort messages and continue conversation
fix(addToCache.js): remove unused variables and parameters
feat(addToCache.js): add message to cache with id, parentMessageId, role, and text
fix(askOpenAI.js): remove parentMessageId parameter from addToCache call
feat(MessageHandler.jsx): add latestMessage to store on cancel of submission, and generate messageId and parentMessageId for latestMessage
2023-04-09 22:21:27 -04:00
Daniel Avila
a81bd27b39 feat(api): add support for saving messages to database
fix(api): change arrowParens prettier option to always
fix(api): update addToCache to include endpointOption and latestMessage
fix(api): update askOpenAI to include endpointOption in abortControllers
fix(client): remove abortKey state and add currentParent state to MessageHandler
2023-04-09 11:17:08 -04:00
Daniel Avila
b59588c6ee refactor(messageHandler): sends all necessary data to cache/save unfinished response 2023-04-09 09:22:14 -04:00
Daniel Avila
828e438d53 feat(api-endpoints.ts): add abortRequest endpoint
feat(data-service.ts): add abortRequestWithMessage function
feat(react-query-service.ts): add useAbortRequestWithMessage hook
2023-04-09 09:21:04 -04:00
Daniel Avila
f946f90ef6 Merge branch 'main' into fix-sse 2023-04-09 07:54:06 -04:00
Daniel Avila
956d919751 fix(Messages/index.jsx): import lodash throttle function efficiently 2023-04-09 07:52:42 -04:00
Daniel Avila
83d0443c8a fix: page no longer refreshes on stop generating button 2023-04-09 07:32:07 -04:00
Daniel Avila
88aea81288 WIP: fix: fix abort messages and continue conversation on abort
feat(askOpenAI.js): add abort endpoint to cancel requests
feat(MessageHandler): add abort functionality to cancel requests
feat(submission.js): add lastResponse and source atoms to store
feat(handleSubmit.js): add stopGenerating function to cancel requests
2023-04-08 23:19:29 -04:00
Danny Avila
5fbefa15ce Merge pull request #171 from git-bruh/main
fix: replace various anchor tags with buttons to prevent text selection on repeated clicks
2023-04-08 08:38:41 -04:00
Daniel Avila
0f62be812a refactor(AdjustToneButton.jsx): replace svg icon with lucide-react Settings2 icon 2023-04-08 08:37:44 -04:00
Hyunggyu Jang
100be3b42f Make sydney tone adjustable 2023-04-08 13:29:08 +09:00
Daniel Avila
8b952be268 refactor(NewConversationMenu): remove unused imports and commented code
feat(NewConversationMenu): add support for deleting presets and creating new presets using data-provider
2023-04-07 22:11:28 -04:00
Daniel Avila
285351bb53 Merge branch 'main' into dano/react-query-typescript 2023-04-07 22:11:15 -04:00
Daniel D Orlando
bf4258c0a5 Add react query devtools 2023-04-07 16:13:00 -07:00
Daniel D Orlando
9a0e3804fa fix nav pagination 2023-04-07 10:16:53 -07:00
Wentao Lyu
96b004a696 feat: add animation to New Topic. 2023-04-08 00:14:15 +08:00
Danny Avila
5ea8f75f70 Merge branch 'main' into dano/react-query-typescript 2023-04-07 10:19:13 -04:00
git-bruh
fc91ed49bc fix: replace various anchor tags with buttons to prevent text selection on repeated clicks 2023-04-07 19:25:30 +05:30
Daniel D Orlando
c983670b9e Fix bug - when clicking on title in search results, was not switching to conversation 2023-04-07 06:02:28 -07:00
Daniel D Orlando
e0f9e92bfc fix bad setState warning in console 2023-04-07 05:20:14 -07:00
Wentao Lyu
ca720efde8 fix: remove use-screenshot
feat: displat file type
2023-04-07 13:21:20 +08:00
Danny Avila
644ff160fc Merge branch 'main' into dano/react-query-typescript 2023-04-06 19:47:36 -04:00
Danny Avila
e1c6517b8f Merge pull request #164 from danny-avila/workflow
ci(playwright.yml): add Playwright tests workflow
2023-04-06 19:43:36 -04:00
Daniel Avila
24cb6d4013 fix: formatting for user messages 2023-04-06 18:58:56 -04:00
Daniel D Orlando
dccd766d91 remove unused import 2023-04-06 15:50:15 -07:00
Daniel D Orlando
d24abf6a2a Cleanup App.jsx 2023-04-06 15:42:39 -07:00
Daniel D Orlando
7b7ba96786 Move createPayload and sse to data-provider, create TSubmission type 2023-04-06 14:56:33 -07:00