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

If model_provider_id or embeddings_provider_id is not associated with models, set it to None #459

Merged
merged 6 commits into from
Nov 13, 2023

Conversation

andrii-i
Copy link
Collaborator

@andrii-i andrii-i commented Nov 10, 2023

If model_provider_id or embeddings_provider_id is not associated with available models, set it to None.

To test:

  1. get you data dir path by running echo "$(jupyter --data-dir)/jupyter_ai/config.json"
  2. open config.json in your data dir and change model_provider_id and/or embeddings_provider_id to one not provided by the server

Before:
image

After:
image

@andrii-i andrii-i added the bug Something isn't working label Nov 10, 2023
@JasonWeill
Copy link
Collaborator

We have a test file in packages/jupyter-ai/jupyter_ai/tests/test_config_manager.py. Could you please add a test to verify this functionality?

@andrii-i
Copy link
Collaborator Author

andrii-i commented Nov 11, 2023

@JasonWeill Thank you for looking into this PR. Added a test.

@andrii-i andrii-i merged commit a710af8 into jupyterlab:main Nov 13, 2023
7 checks passed
@andrii-i andrii-i deleted the bad_prodiver_or_embedding_id branch November 13, 2023 20:40
@andrii-i
Copy link
Collaborator Author

@meeseeksdev please backport to 1.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyter-ai that referenced this pull request Nov 13, 2023
…er_id is not associated with models, set it to None
andrii-i added a commit that referenced this pull request Nov 13, 2023
…ot associated with models, set it to None (#467)

Co-authored-by: Andrii Ieroshenko <aieroshe@amazon.com>
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
… models, set it to None (jupyterlab#459)

* if ids are not getting associated with models, set them to None

* add test_handle_bad_provider_ids

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix tests

* Add docstrings

* adjust docstrings

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No recourse when previously selected model is not present
3 participants