Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a websocket for streaming from the chat UI #679

Merged
merged 32 commits into from Apr 3, 2024

Commits on Mar 11, 2024

  1. Initial pass at backend changes to support agents

    - Add a db model for Agents, attaching them to conversations
    - When an agent is added to a conversation, override the system prompt to tweak the instructions
    - Agents can be configured with prompt modification, model specification, a profile picture, and other things
    - Admin-configured models will not be editable by individual users
    - Add unit tests to verify agent behavior. Unit tests demonstrate imperfect adherence to prompt specifications
    sabaimran committed Mar 11, 2024
    Configuration menu
    Copy the full SHA
    9b88976 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    352168d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6ab6493 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8e1445b View commit details
    Browse the repository at this point in the history

Commits on Mar 13, 2024

  1. Add web UI views for agents

    - Add a page to view all agents
    - Add slugs to manage agents
    - Add a view to view single agent
    - Display active agent when in chat window
    - Fix post-login redirect issue
    sabaimran committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    290712c View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2024

  1. Fix agent view

    sabaimran committed Mar 14, 2024
    Configuration menu
    Copy the full SHA
    c45030a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3caf0a7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    345afec View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2024

  1. Configuration menu
    Copy the full SHA
    d734be6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1b3fc68 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    416feb1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7fc484b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    724557f View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2024

  1. Configuration menu
    Copy the full SHA
    36af977 View commit details
    Browse the repository at this point in the history
  2. Add support for chatting via the web socket connection

    - Convert to a model of calling the search API directly with a function call (rather than using the API method)
    - Gracefully handle websocket connection disconnects
    - Ensure that the rest of the response is still saved, as it is currently, if the user disconects from the client
    - Setup unchangeable context at the beginning of the session when the connection is established (like location, username, etc)
    sabaimran committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    a346f79 View commit details
    Browse the repository at this point in the history
  3. Update the web UI for the chat interface to establish a connection vi…

    …a a socket to the server
    
    - Move some common methods into separate functions to make the UI components more efficient
    - The normal HTTP-based chat connection will still work and serves as a fallback if the websocket is unavailable
    sabaimran committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    d4e83b0 View commit details
    Browse the repository at this point in the history
  4. Use a common method for sending a generic message to the client from …

    …the server in the ws connection
    sabaimran committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    70ad789 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d84188b View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    255b69d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    6ba0d8e View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2024

  1. Merge with origin

    sabaimran committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    d38089a View commit details
    Browse the repository at this point in the history
  2. Merge migrations

    sabaimran committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    2399d91 View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2024

  1. Merge branch 'features/customize-chat-with-agents' of github.com:khoj…

    …-ai/khoj into features/add-agents-ui
    sabaimran committed Mar 23, 2024
    Configuration menu
    Copy the full SHA
    2061761 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'features/add-agents-ui' of github.com:khoj-ai/khoj into…

    … features/chat-socket-streaming
    sabaimran committed Mar 23, 2024
    Configuration menu
    Copy the full SHA
    6b4c4f1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8edbd70 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'features/add-agents-ui' of github.com:khoj-ai/khoj into…

    … features/chat-socket-streaming
    sabaimran committed Mar 23, 2024
    Configuration menu
    Copy the full SHA
    4deb849 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2024

  1. Rebase with matser

    sabaimran committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    47fc7e1 View commit details
    Browse the repository at this point in the history
  2. Merge with origin/master

    sabaimran committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    228ad68 View commit details
    Browse the repository at this point in the history
  3. Remove superfluous newline

    sabaimran committed Apr 2, 2024
    Configuration menu
    Copy the full SHA
    867e100 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bf1187f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f484266 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b4f71e0 View commit details
    Browse the repository at this point in the history