deep-chat

Fully customizable AI chatbot component for your website

MIT License

Downloads
93.7K
Stars
1.4K
Committers
5

Bot releases are visible (Hide)

deep-chat - 2.0.1 - OpenAI Assistant history order fix and Vite security fixes Latest Release

Published by OvidijusParsiunas 3 months ago

This is a quick patch release that addresses a bug in OpenAI Assistants where upon adding thread_id and load_thread_history properties would display the thread chat history in the wrong order. This has now been fixed.

Additionally, when users have been recently installing deep-chat or the deep-chat-react packages with npm, they would see 4 new security alerts in the console. These were not serious nor were they causing any issues with Deep Chat's functionality, however for good measure and to not alert our users, the dependencies that were causing these alerts have now been updated.

As always, huge thankyou to our sponsors!
The development of this project was greatly assisted by a number of very generous sponsors:
@matthiasamberg
@dorra
@techpeace
@aquarius-wing

deep-chat - 2.0.0 - API changes, new features, improvements and bug fixes

Published by OvidijusParsiunas 3 months ago

The long awaited release of Deep Chat 2.0 is finally here!

This release features a number of critical API changes, addition of multiple new features, improvements on the existing ones and a multitude of bug fixes. This would not have been made possible without the continuous support of our open source community and their eagerness to create the best AI chat experience for all! We hope that this version will make it easier for new and existing developers to embed Deep Chat into their website and most that their users would have the best possible chat experience.

API changes:

  • request has been renamed to connect
  • stream property has been moved to connect
  • InitialMessages property has been renamed to history
  • onNewMessage event has been renamed to onMessage. The isInitial property that is passed in the event body has been renamed to isHitory. When listening to event emission from the element, the new-message event name has been changed to message
  • request property in FilesServiceConfig interface has been renamed to connect

New features:

  • adding a new addMessage method which is used to programmatically add new messages into the chat.
  • adding a new setPlaceholderText method which is used to programmatically set the input's placeholder text.
  • the speechToText interface now has three new properties; stopAfterSubmit which is used to control whether the recording stops after user has submitted a message, submitAfterSilence which controls if a message is automatically submitted after a period of silence and events which is used to listen to events emitted by interactions with speech.
  • the openAI interface has been updated to reflect new features provided by the Open AI API.

UX improvements and multiple bug fixes:
When using the new Deep Chat component, you will notice multiple quality of life improvements, such as the ability to have line breaks for the outgoing user messages, better representation for uploaded files in the chat and many other benefits. This has all been realised and developed through consistent feedback from our Open Source community. Please checkout the issues section of our repo to find out how they were implemented.

Switching from v1 to v2:

All of the mentioned API changes are backwards compatible! So don't worry about having to update your configuration when switching to this version from a previous one. The browser console will also display warnings for properties that have been deprecated to help you switch to the new ones, however they can be ignored if they are not useful. If you are using TypeScript - the transition to the new version may introduce a couple of warnings in your build environment, they can be ignored if you want to keep using the old properties.

Thankyou to our sponsors!

The development of this project was greatly assisted by a number of very generous sponsors:

  • @matthiasamberg
  • @dorra
  • @techpeace
  • @eljefedelrodeodeljefe
deep-chat - 1.4.11 - Enhancements to OpenAI functionality and more

Published by OvidijusParsiunas 8 months ago

This release contains updates to OpenAI services and more:

  • When using OpenAI Assistants, you can now preload the chat history from OpenAI without having to store it locally.
  • OpenAI Chat responses for functions can now be streamed.
  • As well as responding with text or html in streams, you can now also respond with files.
  • htmlClassUtilities now support custom events.
  • websocket responses can now be used to update a previous message to facilitate a stream-like experience. Checkout the following issue for more info.
  • If you are using names or avatars for your messages; when there are multiple consecutive messages sent from the same role - they are no longer repeated.
  • Multiple other small bug fixes and improvements.

Big thankyou to @eljefedelrodeodeljefe for sponsoring the project!

deep-chat - 1.4.10 - create OpenAI Assistants and more

Published by OvidijusParsiunas 9 months ago

This release includes the following updates:

  • Create a new OpenAI Assistant by emitting the assistant_id property in the Assistant object and control the its details via newAsssistant object.
  • When the onComponentRender event is called, it now also passes the Deep Chat component reference. Be careful not to causes infinite event recursion if you assign new properties to the reference.
  • webModel now supports new RedPajama and TinyLlama models.
  • Other security and refactoring updates.

Huge shoutout to matthiasamberg for sponsoring the project!! 🎉 🎉

deep-chat - 1.4.7 - Web Model

Published by OvidijusParsiunas 9 months ago

This release introduces a big new feature - the ability to use llm models entirely on the browser. You can read more about this in the webModel section.

Other updates:

  • Images defined as base64 can now be downloaded by clicking on them
  • OpenAI Assistants can now handle images and produce csv and pdf files
  • The intro panel is not displayed when no valid connection values are configured
  • Better parsing and responseInterceptor editing capabilities for stream
  • Other small bug fixes
deep-chat - 1.4.6 - generic enhancements and bug fixes

Published by OvidijusParsiunas 10 months ago

This release contains a series of generic enhancements and multiple bug fixes:

Enhancements:

  • Ability to use the responseInterceptor for stream responses.
  • If request property is not set on the initial render, you are now able to set it on further renders.

Bug fixes:

  • The events methods no longer trigger a re-render.
  • Responses from a stream service no longer overwrites the user message.
  • Setting the OpenAI Assistant key via the insert key view now sets the correct request header when sending new messages.

Others:

  • addMessage method has been removed as it does not yield any direct benefit to Deep Chat component.
deep-chat - 1.4.5 - request and streaming updates

Published by OvidijusParsiunas 11 months ago

This release contains multiple updates for connecting to direct and custom services:

  1. You can now define a model for the OpenAI Images API.
  2. There are multiple new optional properties that you can use for Cohere APIs.
  3. StabilityAI API documentation has been updated.
  4. onNewMessage event now includes the actual uploaded file's reference using the MessageFile object type.
  5. Adding a new onError event that allows the parent app to monitor chat errors.

This update also includes streaming bug fixes and better console logging when the response format from the server is invalid.

deep-chat - 1.4.4 - updating message streaming and addMessage method

Published by OvidijusParsiunas 11 months ago

This release comes bundled with multiple updates for chat message functionality:

  • Introducing a new overwrite property which allows the contents of the new message to overwrite the previous message. This facilitates the capability to create status message bubbles and streaming will no longer require the response to contain incremental portions of the previous text.
  • Stream functionality has also been updated to allow html content to streamed. Additionally, the stream simulation functionality now splits the incoming text by characters instead of words to allow Chinese characters to be streamed individually.
  • The submitUserMessage method now uses a new argument type called UserMessage which is an object that accepts text and files.
  • addMessage is a new method used to add messages into the chat. The use-case this is targeting is to eventually populate the chat history once it has been fetched after the chat has loaded.
  • The request object has a new optional credentials property which will allow developers to configure what services the cookies can be sent to.

Deprecation:

  • The "deep-chat-update-message" HTML Class has now be removed in favour of using the overwrite in responses.

This release also contains multiple bug fixes for streaming and html messages.

deep-chat - 1.4.3 - chatStyle property

Published by OvidijusParsiunas 11 months ago

We are adding a new chatStyle property for setting the chat container styling. This property directly supplements the already existing style attribute which can only be set in the markup, hence chatStyle allows developers to set this property anywhere and it accepts a JSON object.

This release also contains some refactoring work for streaming.

deep-chat - 1.4.2 - custom roles

Published by OvidijusParsiunas 11 months ago

Deep Chat now supports the use of custom roles in your messages. This is particularly useful if your server communicates with multiple agents or users and you want to uniquely represent their message bubbles in the chat. This can be customized using messageStyles, avatars and names properties.

This update also includes bug fixes for controlling the submit button when streaming and simulating a stream whilst using websockets.

deep-chat - 1.4.1 - OpenAI assistants, vision, text to speech and function calling

Published by OvidijusParsiunas 11 months ago

The OpenAI DevDay 2023 conference introduced a variety of exciting new features into the AI ecosystem, all of which are now available in Deep Chat:

You can check all of these features in the Deep Chat's OpenAI documentation page or try them all out live in the Playground.

This release also saw the retirement of the OpenAI completions feature as it has now been moved to legacy status in the OpenAI documentation. The default character (token) limits for all OpenAI models have been removed as they vary by the model and are cumbersome to maintain, hence you will alternatively need to set them manually using the requestBodyLimits property.

deep-chat - 1.4.0 - enhancing the submit button API and fixing bugs

Published by OvidijusParsiunas 12 months ago

The Deep Chat submit button has been upgraded with new features:

  • A new disabled button state has been added to disable the button when the current user input cannot be sent out to the target service or the websocket connection is not established.
  • You can disable this state to have the submit button always enabled by toggling the alwaysEnabled property to true.
  • You can now manually set the disabled state via the use of the disableSubmitButton method. This is particularly useful for cases where there are other factors outside of the chat that would need to stop the user from being able to send out messages.
  • The validateMessageBeforeSending interceptor has now been renamed to validateInput as it is now triggered when the user changes text or uploads/deletes files.
  • The overall submitButtonStyles method has been refactored to require less repetitive styling values to achieve the same output.

This bug also contains a few bug fixes where the chat width was increased when the user had inserted long words and the background color used to bleed out from the chat container when the inputAreaStyle background was set.

deep-chat - 1.3.23 - ability to set message bubble line height

Published by OvidijusParsiunas 12 months ago

This release fixes an issue where the lineHeight in MessageElementStyles bubble property could previously not be set.

Additionally when using OpenAI or Cohere chat services via the directConnection property and there are files inside the initialMessages array, the file messages will be filtered out.

deep-chat - 1.3.22 - adding a deep-chat-update-message html class

Published by OvidijusParsiunas 12 months ago

We have added a new "deep-chat-update-message" class to the Deep Chat Classes that allows the same ai message bubble to be updated by multiple server responses when using websockets. This allows for the creation of status messages for better UX.

This update also includes code refactoring where the conversion of function based properties is no longer done via eval (which is now deprecated), but using new Function() instead.

deep-chat - 1.3.21 - bug fix for sending messages

Published by OvidijusParsiunas 12 months ago

Our previous release 1.3.19 introduced a minor bug which prevented JSON messages from being sent to a target custom service. This has now been fixed.

deep-chat - 1.3.19 - send files and stream responses

Published by OvidijusParsiunas 12 months ago

This release contains a bug fix where users could previously not send a file and stream (using server sent events) the response message. This has now been fixed.

deep-chat - 1.3.18 - inner message width refactoring

Published by OvidijusParsiunas 12 months ago

Inner message widths were previously set to 90% of the chat container width. This dimension did not scale well when the chat component was expanded for bigger screens. Hence it has now been changed to calc(97.5% - 24px) to scale much better.

This update also includes other code refactoring work.

deep-chat - 1.3.17 - updating MessageContent format

Published by OvidijusParsiunas about 1 year ago

Previously the MessageContent format allowed only one data type to be transferred and stored per message. This has now changed to allow multiple data types such as text and html in the same message.
The file property has also been changed to a files array. This is to allow multiple files to be stored within the same message and to be more consistent with the Response format.

deep-chat - 1.3.16 - updating dependency versions

Published by OvidijusParsiunas about 1 year ago

Updating all of the dependency package versions to the latest.

deep-chat - 1.3.15 - bug fix for the new style property

Published by OvidijusParsiunas about 1 year ago

This release contains a small bug fix for the new style property in the previous release where the chat did not have an overflow when there were too many messages inside the container.