bitswired / fuseai Goto Github PK
View Code? Open in Web Editor NEWSelf-Hosted and Open-Source web app to interact with OpenAI APIs. Currently supports ChatGPT, but DALLE and Whisper support is coming.
Self-Hosted and Open-Source web app to interact with OpenAI APIs. Currently supports ChatGPT, but DALLE and Whisper support is coming.
It is possible to delete the text inputted in the "Textarea-input" after clicking the submit button?
when clicking the Start By Visiting The Chat Page To Create A New Chat
button it redirects you to /chat
, which does not exists (should be /chats
), you probably are already aware of this but..
Docker image is not available in repository. When I'm trying to pull it, I'm getting error:
Error response from daemon: pull access denied for bitswiredpods/ai-chat-app, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
the new docker image produce this error on my side:
[next-auth][error][NO_SECRET]
https://next-auth.js.org/errors#no_secret
Warning: For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'yarn add sharp', and Next.js will use it automatically for Image Optimization.
Read more: https://nextjs.org/docs/messages/sharp-missing-in-production
[next-auth][error][NO_SECRET]
https://next-auth.js.org/errors#no_secret Please define a secret
in production. MissingSecret [MissingSecretError]: Please define a secret
in production.
at assertConfig (/app/node_modules/next-auth/core/lib/assert.js:42:12)
at AuthHandler (/app/node_modules/next-auth/core/index.js:70:52)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async NextAuthHandler (/app/node_modules/next-auth/next/index.js:24:19)
at async /app/node_modules/next-auth/next/index.js:60:32
at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:372:9)
at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:514:9)
at async Object.fn (/app/node_modules/next/dist/server/next-server.js:828:35)
at async Router.execute (/app/node_modules/next/dist/server/router.js:243:32)
at async NextNodeServer.runImpl (/app/node_modules/next/dist/server/base-server.js:432:29) {
code: 'NO_SECRET'
}
[next-auth][error][NO_SECRET]
https://next-auth.js.org/errors#no_secret
[next-auth][error][NO_SECRET]
https://next-auth.js.org/errors#no_secret
[next-auth][error][NO_SECRET]
https://next-auth.js.org/errors#no_secret
[next-auth][error][NO_SECRET]
https://next-auth.js.org/errors#no_secret Please define a secret
in production. MissingSecret [MissingSecretError]: Please define a secret
in production.
running the container with the following command results in chats not working, the API key saves, and when I click submit it thinks, but does nothing:
docker run -p 8113:3000 \
-e DATABASE_URL=file:./db.sqlite \
-e NEXTAUTH_SECRET=secret \
-e NEXTAUTH_URL=http://192.168.1.2:8113/ \
-e [email protected] \
-e ADMIN_PASSWORD=password \
bitswired/ai-chat-app:single-user-latest
same behaviour on unraid and an M1 MacBook
should note it used to work.
possible related error:
prisma:error
Invalid `prisma.user.findUniqueOrThrow()` invocation:
An operation failed because it depends on one or more records that were required but not found. Expected a record, found none.
full logs:
yarn run v1.22.19
$ /app/node_modules/.bin/prisma migrate deploy
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "db.sqlite" at "file:./db.sqlite"
SQLite database db.sqlite created at file:./db.sqlite
6 migrations found in prisma/migrations
Applying migration `20230302135639_init`
Applying migration `20230303145339_cascade_delete`
Applying migration `20230303183658_add_settings`
Applying migration `20230303235937_add_templates`
Applying migration `20230312154530_auth`
Applying migration `20230312205338_add_tenant_id`
The following migrations have been applied:
migrations/
└─ 20230302135639_init/
└─ migration.sql
└─ 20230303145339_cascade_delete/
└─ migration.sql
└─ 20230303183658_add_settings/
└─ migration.sql
└─ 20230303235937_add_templates/
└─ migration.sql
└─ 20230312154530_auth/
└─ migration.sql
└─ 20230312205338_add_tenant_id/
└─ migration.sql
All migrations have been successfully applied.
Done in 4.75s.
yarn run v1.22.19
$ next start
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
Warning: For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'yarn add sharp', and Next.js will use it automatically for Image Optimization.
Read more: https://nextjs.org/docs/messages/sharp-missing-in-production
prisma:error
Invalid `prisma.user.findUniqueOrThrow()` invocation:
An operation failed because it depends on one or more records that were required but not found. Expected a record, found none.
[next-auth][error][JWT_SESSION_ERROR]
https://next-auth.js.org/errors#jwt_session_error No User found {
message: 'No User found',
stack: 'NotFoundError: No User found\n' +
' at /app/node_modules/@prisma/client/runtime/library.js:164:6701\n' +
' at async /app/node_modules/@prisma/client/runtime/library.js:164:6641\n' +
' at async Object.session (/app/.next/server/chunks/887.js:122:30)\n' +
' at async Object.session (/app/node_modules/next-auth/core/routes/session.js:56:26)\n' +
' at async AuthHandler (/app/node_modules/next-auth/core/index.js:158:27)\n' +
' at async NextAuthHandler (/app/node_modules/next-auth/next/index.js:24:19)\n' +
' at async /app/node_modules/next-auth/next/index.js:60:32\n' +
' at async Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:372:9)\n' +
' at async NextNodeServer.runApi (/app/node_modules/next/dist/server/next-server.js:514:9)\n' +
' at async Object.fn (/app/node_modules/next/dist/server/next-server.js:828:35)',
name: 'NotFoundError'
}
[Object: null prototype] {
username: '[email protected]',
password: 'password',
callbackUrl: '/',
csrfToken: '3baf6d861c0b1c5ec1f7b98587874984b2ccf9409eb261b5f2696262ef38a825',
json: 'true'
} true true
JDDDDDDDIIIIDDD
[Object: null prototype] {
username: '[email protected]',
password: 'password',
callbackUrl: '/',
csrfToken: '12ddaa65f016860d5b00a21904d3b9d55d8ead83641375419328ce50f06d4a81',
json: 'true'
} true true
JDDDDDDDIIIIDDD
Add Link to this github repo in the footer or elsewhere. :)
Instead of the current design, a simple pencil icon next to the text or an ellipsis (...) menu with Delete and Rename options could be used.
Hi,
It's possible to have a mobile version with PWA?
Thanks
The auto-scrolling to the bottom of the chat whenever the browser tab is reactivated is frustrating, and gets in the way or referring to previous messages.
Thanks for considering!
Very good job! I have some friends that are located in areas where openai is banned, and I thought if the software had multi-user capabilities, I could make a client that would be easy for them to use.
I wonder if this is in the plan of the roadmap?
My suggestion is to handle the Enter key like ChatGPT:
Love the app--thanks for considering!
It isn't clear which chat is currently active without scrolling to the top.
From #8
Its API specification should be the same as OpenAI.
Hi! I really love this app so far, but I would love to contribute with some QOL improvements to make it a smoother experience for any users. I don't have much coding experience, but I hope this can help to improve the app greatly. I am currently running it on a Docker from my unraid server, just fyi.
Sorry if this is a bit much, but I think these are some amazing features and QOL to add to the app! I hope the list is useful and thanks for the amazing work you've put into it so far.
From #20
Use a simple pencil icon next to the text or an ellipsis (...) menu with Delete and Rename options could be used.
When hitting the submit button, it does not submit the text. It will load momentarily then stop and nothing changes. Fresh install.
Utilizing Unraid Docker.
Open AI just release ChatGPT API using "gpt-3.5-turbo" model. Not only because that is the actual ChatGPT, the popular one, but also it is much cheaper than "text-davinci-003".
"On Ai CHAT's chat page, the 'create new chat' button does not appear when there is no active chat present."
Hello,
I wasn't able to find a license associated with the project. Consequently, all right are reserved and the project is not Open Source. Would the authors consider adding an Open Source license?
Thanks
Hi,
It would be great, seeing as this is a self-hosted project anyway, to have it also give the ability to connect to the dalai service created by this project:
https://github.com/cocktailpeanut/dalai
The project is designed specifically for interaction with the Llama and Alpaca models, of all sizes. It has it's own web interface but it's more just for testing than actual production like ai-chat-app is.
It seems that the templates are now missing. I did a fresh install on my unraid server and while everything is working. There are no templates in either the [Manage Templates] or [Import Templates]. Was there a change that may have cause this?
Hey bro, you have worked hard
in chat tab,Need a "Create A New Chat" button on the Chat page
and when "Start Bisiting The Chat Page to Create A New Chat" button on the first page is pressed, and enter a wrong 404 page.
Proposed feature: reorder the chats on the sidebar by drag and dropping them. Would be nice to keep things orderly, maybe also include an archive feature where the chats appear in search but not on the base sidebar.
Deployed the container, added the api key, started a new chat, entered some text and nothing is displayed in the output... tried two different browsers same results.
the api key is marked as used on the admin pannel of open ai.
as i can't find a log file to help me figure out what is happening i am opening an issue :)
I have hundreds of chats I have saved in the json format supported by OpenAI in ChatGPT.
To transition to FuseAI I would need to be able to import my chat history from ChatGPT.
Even with my heavy use of ChatGPT if I was using the API for access for all my chats I think it would be significantly less the $20 + tax per month to run. It would be a killer product if it had this.
I don’t know if this is a bug or an issue on openai’s api side. After longer constant conversations going back and forth suddenly no responses come back. As soon as I open a new chat I am good to go again and can continue interacting with the api until it stops again. Can you give me a hint as to how I might be able to debug this and shed some more light onto this issue?
Alternatively some error messages in the UI might be helpful for the user to understand what’s going on.
Hello,
I have an add user button and can add an email; I do not see how to add a password for that user.
Chas
I saw you post on reddit and now I got time to check it out! This is really great. Thanks a lot for sharing! Unfortunately, I am illiterate in JavaScript, I only know Python so I am unable to contribute actively but was wondering if you could add the following features:
The "gpt-4" model is becoming available to some, it would be nice to be able to utilize the model here.
The ability to change the model per chat like on chat.openai.com would be ideal
Something that is missing from even the official ChatGPT page is the ability to edit all messages, not just the user messages. I'd like to be able to edit any message within the chat conversation, and all future requests would be updated with the other information. Specifically I'd like to see the ability to edit the 'system' message at the start of the chat to define how you want the AI to behave, as well as the user and AI response chats.
An easy to see use-case for this is having the AI generate code, but it uses a variable name that you don't like. Instead of going back and forth with it to fix it, you can just edit it's code to include the correct name, all future messages should use that variable name instead.
In addition it would be useful to be able to entirely delete messages. For instance you could have a couple of messages that setup the AI to do a task, then a message asking it to do a task, (generate a Jest test for a given function, for example), then when you want a new one you can just delete the response and your message and send another request without having to do all the setup messages.
Being able to manipulate the chat history seems extremely useful, and should be doable based on the OpenAI API.
From #8
Part of this might be similar to issue #39
Part 1:
When I add the env variable(NEXT_PUBLIC_MULTI_USER with 1) in unraid and try to login as the admin account it just clears the form and doesn't log me in. It also has a dead image logo icon instead of the orange robot.
When I remove the NEXT_PUBLIC_MULTI_USER variable, it lets me log into the container just fine.
Part 2:
When I try and send an invite by email for new user, the emails don't get sent.
This might be related to a missing env variable for TLS or STARTTLS.
I use Proton mail business account to use my website domain name for emails sent to people.
This works fine in all the dockers I have tried, just not this one.
The strange part is, I'm not getting any error when I do go to Accounts > Create New User. No email is sent to that user.
From #8
From #20
A feature request is to add an auto-naming feature using a GPT prompt:
After the first user input, a separate GPT call with a prompt (to be designed) can generate a name based on the initial user input.
Rename the chat from "New Chat" to the generated name.
A toggle in Settings can be added to turn this feature off, as it would save on tokens.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.