GithubHelp home page GithubHelp logo

marcolivierbouch / openassistantgpt Goto Github PK

View Code? Open in Web Editor NEW
227.0 8.0 85.0 9.76 MB

An Open-Source Saas for Crafting/Building/Creating Chatbots with OpenAI's Assistant API that you can add to your website.

Home Page: https://openassistantgpt.io

License: GNU Affero General Public License v3.0

TypeScript 80.07% CSS 12.11% JavaScript 1.58% HTML 1.46% MDX 4.79%
ai chatbot customgpt js openai-api openaai artificial-intelligence assistant assistant-chat-bots web

openassistantgpt's Introduction

Welcome to OpenAssistantGPT

Vercel Build Status GitHub Last Commit GitHub Issues GitHub Pull Requests

OpenAssistantGPT is an open source platform for building chatbot assistants using OpenAI's Assistant. It offers features like easy website integration, low cost, and an open source codebase available on GitHub.

Users can build their chatbot with minimal coding required, and OpenAssistantGPT supports direct billing through OpenAI without extra charges. The platform is particularly user-friendly and cost-effective, appealing to those seeking to integrate AI chatbot functionalities into their websites.

For more detailed information and implementation guidelines, you can visit our website.

image

How to create my Chatbot

  1. Open OpenAI and create an account.
  2. Open OpenAssistantGPT and create an account.
  3. Set your OpenAI API key in your OpenAssistantGPT dashboard.
  4. Create a crawler or upload your own file.
  5. Create your chatbot with the file you uploaded.
  6. Test your chatbot!

Documentation

For full documentation, visit our documentation

Contributing

We love our contributors! Here's the list of who contributed:

Tech Stack

Next.js – framework

TypeScript – language

Tailwind – CSS

Supabase – database

NextAuth.js – auth

Stripe – payments

Resend – emails

Vercel – deployments

Repo Activity

OpenAssistantGPT repo activity

openassistantgpt's People

Contributors

eltociear avatar marcolivierbouch avatar snyk-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openassistantgpt's Issues

Instructions for installing and deploying

hi, I would really appreciate if there is a guide on how we can set up the app ourselves after forking it.

I tried everything but it is still giving me errors when deploying locally and on vercel. Please provide detailed instructions on how to setup the database and everything else if possible.

Thank you.

Image uploading

With GPT 4o there are a ton of use cases for this. Would be really great to have. Put it in a premium product.

Some way to deal with and format document references in V2 replies.

These are currently not formatting at all and look like "【4:0†source】". I have not had any luck prompting to strip these out. Ideally we could have an option to 1st) Strip them out 2nd) Link to the actual document.

When they are displayed they should look like [1] [2] [3] etc

Is ChatWindow.js script not working?

Describe the bug
When trying to use chatwindow.js, nothing appears on Next.js page

To Reproduce
Steps to reproduce the behavior:

  1. On a Nextjs page, load the the normal chatbot by following instructions and it works fine and loads the following below
return (
        <main className={styles.centerDiv}>
            <Script
                src="https://www.openassistantgpt.io/chatbot.js"
                strategy="afterInteractive"
            />
            <div
                className={styles.chatOverlay}
                id="openassistantgpt-chatbot"
            ></div>
        </main>
    )
drawing
  1. However, attempting to use ChatWindow.js results in nothing appearing
return (
        <main className={styles.centerDiv}>
            <Script
                src="https://www.openassistantgpt.io/chatwindow.js"
                strategy="afterInteractive"
            />
            <div
                className={styles.chatOverlay}
                id="openassistantgpt-chatbot"
            ></div>
        </main>
    )

Expected behavior
I expect a chatWindow widget similar to the OpenAssistant website
image

Screenshots
See above

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome, Firefox

Additional context
Currently using Next.js 14 App router and trying to add the widget in a client component page

Thanks in advanced!!

Auto Scroll on Chat Widget

Is your feature request related to a problem? Please describe.
We have the OpenAsssistantGPT in a production environment and it appears that when communication with the bot, the chat UI does not automatically scroll down to the most recent message.

Describe the solution you'd like
As the problem describes, I believe he solution would be to have that chatUI automatically scroll down to the most recent message in the chat.

Describe alternatives you've considered
I think an alternative option is that a web developer can edit the Chat Widget code to create this autoscroll feature

Styling Response Text

Is your feature request related to a problem? Please describe.
This is probably the easiest and most fairly-priced implementation of an OpenAI assistant chatbot. Appreciate your work on this.

The text in the embedded iframe chatbot is really spaced out. There is padding and margins that make a short answer look very long. Since my assistant returns items as a list, the spacing is even more of an issue due to a gap before the ul starts. Here's an example: https://capture.dropbox.com/bpdti55tzvCoHid8

Describe the solution you'd like
I'd love to see some kind of CSS documentation where I can modify the margins/padding/space between elements

Describe alternatives you've considered
Since it's an iframe embed, my own stylesheet doesn't work. (Or could it, somehow?)The non-standard classes in the responses also make it hard to pin down styling. There are gaps I can't seem to find using the dev tools in my browser – gaps between elements or maybe something to do with the flex.

Additional context
Add any other context or screenshots about the feature request here.

Thanks!

Title: Add Continuous Testing for Project

Is your feature request related to a problem? Please describe.
We don't have a way to check if our code is good enough before we put it out for everyone to use. Sometimes, mistakes slip through and cause problems later on.

Describe the solution you'd like
We should set up something called "continuous integration" (CI) for our project. It's like having a robot check our code every time we make a change to make sure it's okay. This will help us catch mistakes early and make sure everything works smoothly.

Describe alternatives you've considered
Right now, we mostly rely on ourselves to test our code before sharing it. But this can be slow and we might miss things. With CI, the computer does a lot of this work for us, saving time and reducing errors.

Additional context
Setting up CI means we'll use tools like Jenkins, Travis CI, or GitHub Actions to automatically test our code and make sure it's up to scratch. It'll make our development process smoother and our final product more reliable for users.

Tried to deploy

It worked on vercel, however I cannot make a bot even after scraping . Says no models available even after setting key in settings main config.

image

Config on Vercel

Hello,

I try to deploy on Vercel with default configuration but I have an issue during building. I try to override the command but it doesn't work. Can you share some details about how to deploy ? Thanks for the work !

User Inquiry chats aren't scrollable

Describe the bug
When viewing user inquiries, the chat history isn't scrollable.

To Reproduce
Steps to reproduce the behavior:

  1. Go 'here'
  2. Click on the ellipses for a chatbot
  3. Click "User Inquiries"
  4. Select an inquiry

Expected behavior
Ideally this would scroll so that I can view the entire chat history without it getting cut off.

Desktop (please complete the following information):

  • OS: MacOS
  • Browser: Arc
  • Version: 1.41.0

Error: Failed. `An error occurred. Please try again later.`

Describe the bug
A clear and concise description of what the bug is.
When I go to chatbot and start chatting, anything I ask it gives this reply An error occurred. Please try again later. I think it might be due the the waitForRun function in /api/chatbots/[chatbotId]/chat/route.ts is returning run status as failed.

But how can I fix it?

To Reproduce
Steps to reproduce the behavior:

  1. Go tohttps://www.openassistantgpt.io/dashboard/chatbots/
  2. Click on a Chatbot
  3. Start Chatting with it, ask any question
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.
Should return the response of the question asked

Screenshots
If applicable, add screenshots to help explain your problem.
image

Response Message

Apologies, this is more of a question and we are unsure if this response below we are receiving is coming from OpenAssistantGPT or from OpenAI:

For Context:
We had a lot of people test our bot at once and we are aware of the rate limits, however, everyone received this message during that rate limit freeze:

“Oops! An error has occurred. Please ensure that your OpenAI account is configured correctly with a valid credit card. If the issue persists, feel free to reach out to our support team for assistance. We're here to help!”

Thanks for any confirmation!

Fill chat input message or execute send-button via javascript

GenAI and Chatbots are often intended to help us automate dedicated tasks. In your OpenAI Assistant interface for chatbots users can ask questions, but they cannot execute more elaborated tasks easily, e.g. giving a longer context to the question or letting GPT generate some output documents/tables.

For that it would be appreciable to send some arbitrary text to the input-box "message" to pre-fill it. Or even allow to hit the send-button from hosting website (i.e. from outside).

InvalidCharacterError

InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided ('rose-pine dark') contains HTML space characters, which are not valid in tokens.

Any idea why this is happening?

Can not add API KEY

Describe the bug
When typing our OPEN AI key, the save logo is stuck at loading

Expected behavior
Can expect a toast that it has been accepted

Screenshots
image

Desktop (please complete the following information):

  • OS: [Windows]
  • Browser [Brave]

Links not properly marked up

Links from GPT Assistants are specified like this: [Link Text] (https://urlgoeshere.com/). The link rendered in the chatbot shows both the link text and URL, but it's all run together like this: Link Texthttps://urlgoeshere.com (the entire string is underlined and run together).

Screenshot 2024-05-14 at 10 27 54 PM

I'm using gpt-4-turbo.

Desktop (please complete the following information):

  • OS: MacOS 14.4.1
  • Browser : Chrome
  • Version 124.0.6367.207

I'm using the free version right now and am LOVING it!!
Thanks

Add Internationalization (i18n) Support to the Project

Is your feature request related to a problem? Please describe.
The project is currently only available in English, which limits its accessibility to non-English speakers. I'm always frustrated when projects do not support multiple languages, as it restricts the user base and excludes potential contributors who are more comfortable working in their native language.

Describe the solution you'd like
I would like to propose adding internationalization (i18n) support to the OpenAssistantGPT project. This would involve:

Integrating an i18n library (e.g., react-i18next).
Creating translation files for multiple languages, starting with English (en), Portuguese (pt-br) Spanish (es) and others.
Implementing language switch functionality in the UI.
Updating the documentation to include instructions on how to add new translations.
Describe alternatives you've considered
An alternative solution could be to manually translate the content and hard-code the translations, but this would not be scalable or maintainable. Using a dedicated i18n library will provide a more flexible and efficient way to manage multiple languages.

Additional context
Adding i18n support will:

Expand the user base by making the project accessible to a wider audience.
Improve accessibility for non-English speakers.
Encourage contributions from developers around the world.
I am willing to contribute to this feature by implementing the changes outlined above. I will start by setting up the initial structure and creating translation files for Portuguese and Spanish. Other contributors can then add more languages as needed.

I would appreciate any feedback or suggestions on this proposal, especially regarding preferred i18n libraries or patterns that should be followed. Are there any additional languages that should be prioritized?

Thank you for considering this suggestion. I look forward to your feedback and hope to contribute to the project's growth.

Feel free to adjust this as needed!

Copy button on embedded chatbot not working

Hi, I have deployed my own dashboard for personal use, when I embed my chatbot into a website, the copy button seems to not work, I have also tried the same thing with the official site and embedded the chatbot and tested it, but it is not working. The button is visible but not functional.

Using OpenAI own API KEY

Hello
I have 2 questions:

  1. Is it possible with minimal changes to use my own OpenAI key so all my users to use mine?
    Of course the other restrictions related to the plans will remain in place.
    As for me i consider that will be easier for my users to use my own api key

  2. I created 2-3, etc chatbots but i want to offer access to them to my users, part of some subscription plans.

If it can be done via custom coding and payment I am eagerly to discuss

Max Token/Message Control

A big reason why the pickup on the Assistants API has been so slow, is the token use can get out of control. With the new V2 support you added, this can be addressed.

"Context window management
The Assistants API automatically manages the truncation to ensure it stays within the model's maximum context length. You can customize this behavior by specifying the maximum tokens you'd like a run to utilize and/or the maximum number of recent messages you'd like to include in a run."

So some UI to let us set the max messages, and tokens a run will use. It will also fix another issue where in very long conversations the bots tend to go off message. With a maximum number of recent messages, we can limit this.

Is there any plan to switch to assistant v2?

Hi,

firstly I would like to thank you for such a great job. I am able to run this repo locally and make it interactive via the OpenAI api. Recently, OpenAI imports the v2 version for assistant and a separate vectorStore is imported. I would like to know is there any plan to switch the v2 version? or provides an option for user to enable v2 version in a new chatbot?

Thanks

Max Tokens not set correctly.

When setting the tokens, whatever you set for the input tokens, shows up (after saving, leaving, and returning to the settings) as the value for both the input and output tokens. I'm not sure if just a UI issue, or if the value is being set incorrectly as well.

Downloadable response file remains in OpenAI storage

Describe the bug
We have a pro-account and tested the feature of file-upload and download of a generated response. In our connected OpenAI account we found out that the uploaded files are cleaned afterwards correctly but the generated response files (with purpose type "assistants_output") remain in the file storage, which we consider a leak and therefore a bug.

To Reproduce
Steps to reproduce the behavior:

  1. Activate file upload in your chat bot.
  2. Start a chat
  3. Ask a question to generate some output file, e.g. an Excel table.
  4. Await the response, download the result.
  5. Go to your OpenAI account and check the storage area "files" for the generated file
    => a) it is still there and b) is contains the whole linux-path as name instead only the part after the last slash.

Expected behavior
Output-files from OpenAI should be cleanly removed after the response as well.

Track chat input for enhanced user experience

Is your feature request related to a problem? Please describe.
We are hosting a chatbot using your framework and would like to know what our customers/users are asking for to be able to react on their requirements and pains.

Describe the solution you'd like
We'd like to be able to see and export the entered questions of users to the chatbot, be it from the dashboard or via some API call.

Describe alternatives you've considered
Hook into the chat's input form and store the entered questions in some file or data base.

Hello, I want to know the OpenAssistantGPT When will support for mobile devices be available?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

API Setup: Error running assistant

I finally was able to set up everything locally, but When creating and running the bot locally, the API key is getting set up okay, but when I type in any messages it gives me an error, I have attached the screenshots.

filepath: \chatbotjs\src\Chat.tsx
error chatassistant code
error chatassistant
image

Hello, I want to know Can OpenAssistantGPT be independently deployed as our own service?

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Allow multi-file upload to the chat

In the PRO settings of a chat-bot we can currently only enable the single-file upload to a chat. However, the underlying OpenAI assistants API supports adding multiple files at the same time, which would come in handy here as well.

contentlayer not available for Next 14? Is there a Suggested workarouind?

Describe the bug
During npm install I get the following error:

npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/next
npm ERR! next@"^14.2.2" from the root project
npm ERR! peer next@"^13.0.0 || ^14.0.0" from @next/[email protected]
npm ERR! node_modules/@next/third-parties
npm ERR! @next/third-parties@"^14.1.3" from the root project
npm ERR! 3 more (@sentry/nextjs, next-auth, next-themes)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^12 || ^13" from [email protected]
npm ERR! node_modules/next-contentlayer
npm ERR! next-contentlayer@"^0.3.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/next
npm ERR! peer next@"^12 || ^13" from [email protected]
npm ERR! node_modules/next-contentlayer
npm ERR! next-contentlayer@"^0.3.4" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

A clear and concise description of what the bug is:

I'm pretty sure this is because contentlayer doesn't work on Next 14?
I guess I'll give --legacy-peer-deps a try...

To Reproduce
git clone
npm install

Expected behavior
No errors

Additional context
Add any other context about the problem here.

Vercel Deployment issue: Builder returned invalid maxDuration value

So I have finally figured out how to deploy OpenAssistantGPT locally, and it works great, kudos to you, creator!

I am using vercel for deploying my app, but when I deploy it, I have solved all the build errors except this one where vercel tells me to set the maxDuration according to my plan. Now, I understand the need for this, but I am not sure where and which functions I am supposed to limit the maxDuration for.
image
image

Configurable chat input textbox

Currently the textbox for the user's chat input is only single-line and uses not more than a max-width, even if the chat-windows is defined much larger.

As a customer I would like to configure even multiline textbox and the relative width of the chat-window.

instructions

hello, could you please just in short tell us instructions on what we need to do in order to fork it

  1. fork it
  2. create a env file with exactly what keys?
  3. npm install?

i cant get it to work i tried 10 times, the problem is that the models are not being fetched, the api key is being set because it works to upload files etc, but it doesnt work to fetch any models so i cant create any bot succesfully

Getting empty array in api/models api

Hi I just connected to this repo with my local postgres but the issues is in this api/model always getting [] array as response. But in the production mode https://www.openassistantgpt.io/dashboard/new/chatbot its giving the model name. Have you added those in DB by hand or this suppose to added when a user will add a gpt key?

Also I can see there is one api available to get all the models available associated with my gpt key but why its showing only the 2 model?

When will you support gpt-4o?

I tried to manually select the model at platform.openai.com but that results in an error when using the assistant. Thanks!

Copying and pasting text with breaks

When you paste text into the chatbot message field and click send, it does not retain the breaks in the blocks of texts.

For example, if you were to copy and paste this and press enter...
Lorem ipsum dolor sit amet:

  1. Consectetur adipiscing elit
  2. Vivamus ut lacinia leo
  3. Maecenas volutpat
  4. Nisi in gravida hendrerit diam

Mi tempus quam, eu iaculis turpis erat eget augue. Mauris at tortor eget felis mollis posuere quis non turpis. Quisque semper odio vel enim sollicitudin.

Vitae volutpat odio lacinia. Fusce at ligula ligula. Cras eu tincidunt elit. Sed nec dolor fringilla, efficitur nibh ac, faucibus felis.

You would get this as your message sent:
Lorem ipsum dolor sit amet: 1) Consectetur adipiscing elit 2) Vivamus ut lacinia leo 3) Maecenas volutpat 4) Nisi in gravida hendrerit diam Mi tempus quam, eu iaculis turpis erat eget augue. Mauris at tortor eget felis mollis posuere quis non turpis. Quisque semper odio vel enim sollicitudin.Vitae volutpat odio lacinia. Fusce at ligula ligula. Cras eu tincidunt elit. Sed nec dolor fringilla, efficitur nibh ac, faucibus felis.

Screenshots
Screenshot 2024-07-01 at 4 39 22 PM
Screenshot 2024-07-01 at 4 39 30 PM
Screenshot 2024-07-01 at 4 40 09 PM

Thank you!

Significant difference comparing embedded chatbot with native OpenAI assistant using file-upload

We are using an assistant from OpenAI with quite detailed configuration, i.e. we have defined specific instructions ("context"), file_search and code_interpreter and changed the default temperature parameter.

However, when we submit the very same prompts plus attached PDF documents in your embedded chatbot and in the OpenAI assistant playground (or another Python hosting) we get a significant different result.

It seems like the attached document is only uploaded to OpenAI storage but not attached to the message-thread so that the chatbot could incorporate it's content. Or maybe you overwrite some predefined parameters of our assistant, like the context or the temperature.

Mind parameter "attachments" in following example:

msg_attachments.append( { "file_id": myfile.id, "tools": [ { "type": "file_search" } ] } )

client.beta.threads.messages.create(
            thread_id=mythread_id,
            role="user",
            content=prompt,
            attachments=msg_attachments
        )

Please check on your side and report back.

Allow chats to be saved automatically

Having chats save automatically instead of only when the user submits an inquiry would allow me to improve the chatbot prompt more effectively.

Love this project. Hope to support development soon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.