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

Update completion model fields immediately on save #1137

Merged
merged 5 commits into from
Dec 5, 2024
Merged

Conversation

dlqqq
Copy link
Member

@dlqqq dlqqq commented Dec 4, 2024

Description

Testing instructions

  1. Checkout this branch, and make the following changes near line 459 in config_manager.py to mimic the existing behavior on main:

            # get config fields (e.g. base API URL, etc.)
    -       if completions:
    -           fields = config.completions_fields.get(model_uid, {})
    -       else:
    -           fields = config.fields.get(model_uid, {})
    +       fields = config.fields.get(model_uid, {})
  2. Run pytest, verify that the new unit test fails.

  3. Revert your local changes, re-run pytest, and verify that the new unit test passes.

@dlqqq dlqqq added the bug Something isn't working label Dec 4, 2024
@dlqqq dlqqq requested a review from krassowski December 4, 2024 21:32
@dlqqq dlqqq force-pushed the fix-completion-fields branch from 387c5e0 to 18c6c6e Compare December 4, 2024 21:35
@dlqqq dlqqq changed the title Set completion model fields immediately on save Update completion model fields immediately on save Dec 4, 2024
Copy link
Collaborator

@srdas srdas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the changes to config_manager.py -- tests pass after the change.

Code changes LGTM.

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you @dlqqq!

@dlqqq dlqqq merged commit 37558cd into main Dec 5, 2024
11 checks passed
@dlqqq
Copy link
Member Author

dlqqq commented Dec 5, 2024

@meeseeksdev please backport to v3-dev

meeseeksmachine pushed a commit to meeseeksmachine/jupyter-ai that referenced this pull request Dec 5, 2024
dlqqq added a commit that referenced this pull request Dec 5, 2024
@dlqqq dlqqq deleted the fix-completion-fields branch December 6, 2024 01:02
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.

3 participants