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

Various chat chain enhancements and fixes #144

Merged
merged 5 commits into from
May 5, 2023

Conversation

dlqqq
Copy link
Member

@dlqqq dlqqq commented May 4, 2023

Description

  • Fixes /clear-context command #142
  • Fixes AI messages include AI: or Jupyter AI: prefix #143
  • Compares models with their IDs rather than their class names, fixing a bug where chains were not being re-created when switching between models of the same provider
  • Improves system prompt template to include context on the language model being used
  • Fixes RTD workflow, fixing CI for the 3rd time this week 😵

Demo

Demos run on ai21:j2-jumbo-instruct.

Before

Screen.Recording.2023-05-04.at.3.52.17.PM.mov

After

Screen.Recording.2023-05-04.at.3.53.14.PM.mov

@dlqqq dlqqq added bug Something isn't working enhancement New feature or request labels May 4, 2023
@dlqqq
Copy link
Member Author

dlqqq commented May 4, 2023

CI failure doesn't appear to be related to this PR, but rather an upstream dependency of RTD. See: urllib3/urllib3#2168

@dlqqq
Copy link
Member Author

dlqqq commented May 4, 2023

Upstream issue on RTD: readthedocs/readthedocs.org#10290

@dlqqq
Copy link
Member Author

dlqqq commented May 4, 2023

The solution was to supply a RTD configuration file that explicitly specifies a recent Docker image. Without one, RTD defaults to using an older Docker image to build your project, which apparently doesn't work anymore.

@dlqqq dlqqq merged commit 94630c7 into jupyterlab:model-config May 5, 2023
@dlqqq dlqqq deleted the chain-fixes branch May 5, 2023 14:43
dlqqq added a commit that referenced this pull request May 5, 2023
* Refactored provider load, decompose logic, aded model provider list api

* Renamed model

* Sorted the provider names

* WIP: Embedding providers

* Added embeddings provider api

* Added missing import

* Moved providers to ray actor, added config actor

* Ability to load llm and embeddings from config

* Moved llm creation to specific actors

* Added apis for fetching, updating config. Fixed config update, error handling

* Updated as per PR feedback

* Fixes issue with cohere embeddings, api keys not working

* Added an error check when embedding change causes read error

* Delete and re-index docs when embedding model changes (#137)

* Added an error check when embedding change causes read error

* Refactored provider load, decompose logic, aded model provider list api

* Re-indexes dirs when embeddings change, learn list command

* Fixed typo, simplified adding metadata

* Moved index dir, metadata path to constants

* Chat settings UI (#141)

* remove unused div

* automatically create config if not present

* allow all-caps envvars in config

* implement basic chat settings UI

* hide API key text inputs

* limit popup size, show success banner

* show welcome message if no LM is selected

* fix buggy UI with no selected LM/EM

* exclude legacy OpenAI chat provider used in magics

* Added a button with welcome message

---------

Co-authored-by: Jain <[email protected]>

* Various chat chain enhancements and fixes (#144)

* fix /clear command

* use model IDs to compare LLMs instead

* specify stop sequence in chat chain

* add empty AI message, improve system prompt

* add RTD configuration

---------

Co-authored-by: Piyush Jain <[email protected]>
Co-authored-by: Jain <[email protected]>
@dlqqq dlqqq mentioned this pull request May 17, 2023
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
* Refactored provider load, decompose logic, aded model provider list api

* Renamed model

* Sorted the provider names

* WIP: Embedding providers

* Added embeddings provider api

* Added missing import

* Moved providers to ray actor, added config actor

* Ability to load llm and embeddings from config

* Moved llm creation to specific actors

* Added apis for fetching, updating config. Fixed config update, error handling

* Updated as per PR feedback

* Fixes issue with cohere embeddings, api keys not working

* Added an error check when embedding change causes read error

* Delete and re-index docs when embedding model changes (jupyterlab#137)

* Added an error check when embedding change causes read error

* Refactored provider load, decompose logic, aded model provider list api

* Re-indexes dirs when embeddings change, learn list command

* Fixed typo, simplified adding metadata

* Moved index dir, metadata path to constants

* Chat settings UI (jupyterlab#141)

* remove unused div

* automatically create config if not present

* allow all-caps envvars in config

* implement basic chat settings UI

* hide API key text inputs

* limit popup size, show success banner

* show welcome message if no LM is selected

* fix buggy UI with no selected LM/EM

* exclude legacy OpenAI chat provider used in magics

* Added a button with welcome message

---------

Co-authored-by: Jain <[email protected]>

* Various chat chain enhancements and fixes (jupyterlab#144)

* fix /clear command

* use model IDs to compare LLMs instead

* specify stop sequence in chat chain

* add empty AI message, improve system prompt

* add RTD configuration

---------

Co-authored-by: Piyush Jain <[email protected]>
Co-authored-by: Jain <[email protected]>
Marchlak pushed a commit to Marchlak/jupyter-ai that referenced this pull request Oct 28, 2024
* Refactored provider load, decompose logic, aded model provider list api

* Renamed model

* Sorted the provider names

* WIP: Embedding providers

* Added embeddings provider api

* Added missing import

* Moved providers to ray actor, added config actor

* Ability to load llm and embeddings from config

* Moved llm creation to specific actors

* Added apis for fetching, updating config. Fixed config update, error handling

* Updated as per PR feedback

* Fixes issue with cohere embeddings, api keys not working

* Added an error check when embedding change causes read error

* Delete and re-index docs when embedding model changes (jupyterlab#137)

* Added an error check when embedding change causes read error

* Refactored provider load, decompose logic, aded model provider list api

* Re-indexes dirs when embeddings change, learn list command

* Fixed typo, simplified adding metadata

* Moved index dir, metadata path to constants

* Chat settings UI (jupyterlab#141)

* remove unused div

* automatically create config if not present

* allow all-caps envvars in config

* implement basic chat settings UI

* hide API key text inputs

* limit popup size, show success banner

* show welcome message if no LM is selected

* fix buggy UI with no selected LM/EM

* exclude legacy OpenAI chat provider used in magics

* Added a button with welcome message

---------

Co-authored-by: Jain <[email protected]>

* Various chat chain enhancements and fixes (jupyterlab#144)

* fix /clear command

* use model IDs to compare LLMs instead

* specify stop sequence in chat chain

* add empty AI message, improve system prompt

* add RTD configuration

---------

Co-authored-by: Piyush Jain <[email protected]>
Co-authored-by: Jain <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant