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

fix: model params settings local api server #4077

Merged
merged 2 commits into from
Nov 22, 2024

Conversation

urmauur
Copy link
Member

@urmauur urmauur commented Nov 21, 2024

Describe Your Changes

  1. Slider Component Enhancements:

    • Added twMerge from tailwind-merge to conditionally apply Tailwind CSS classes.
    • Modified the className prop of the SliderPrimitive.Root component to use twMerge for dynamic class names based on whether the slider is disabled.
  2. Slider Styles:

    • Added styles for a disabled state in styles.scss, making the cursor unavailable and reducing opacity when the slider is disabled.
  3. Atom Updates:

    • Added a new atom LocalAPIserverModelParamsAtom in LocalServer.atom.ts.
    • Updated imports and uses of serverEnabledAtom and selectedModelAtom across various components to ensure consistency and access to these atoms.
  4. Left Panel Enhancements:

    • Imported necessary types from @janhq/core for better type safety.
    • Used EngineManager and Model to manage model loading more effectively.
    • Enhanced the logic to handle overridden settings, specifically setting ctx_len to 4096 if it's greater than 2048.
  5. Right Panel Enhancements:

    • Added a new state management function onUpdateParams to update the LocalAPIserverModelParamsAtom.
    • Ensured that the disabled prop is passed down to ModelSetting and EngineSetting components to reflect the server's enabled status.

These changes aim to improve the user interface, enhance type safety, and provide more dynamic control over model settings in a local server environment.

Fixes Issues

Screenshot 2024-11-21 at 22 31 34

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@urmauur urmauur added the type: bug Something isn't working label Nov 21, 2024
@urmauur urmauur added this to the v0.5.10 milestone Nov 21, 2024
@urmauur urmauur requested a review from louis-jan November 21, 2024 15:37
@urmauur urmauur self-assigned this Nov 21, 2024
Copy link
Contributor

Barecheck - Code coverage report

Total: 69.27%

Your code coverage diff: 0.01% ▴

✅ All code changes are covered

Copy link
Contributor

@louis-jan louis-jan left a comment

Choose a reason for hiding this comment

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

LGTM

@urmauur urmauur changed the base branch from dev to main November 22, 2024 02:24
@urmauur urmauur merged commit 28e32df into main Nov 22, 2024
11 checks passed
@urmauur urmauur deleted the fix/model-params-local-api-server branch November 22, 2024 02:24
@github-actions github-actions bot modified the milestones: v0.5.10, v0.5.9 Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants