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

Provide default model in local NIM mode #51

Merged
merged 6 commits into from
Jun 25, 2024
Merged

Conversation

raspawar
Copy link
Collaborator

@raspawar raspawar commented Jun 11, 2024

New implementation:

This can be simplified by using the first available model if none is provided, e.g.

llm = ChatNVIDIA(base_url="http://localhost:1234/v1")
llm.chat(...)

llm._client.model => default model => first available model in local NIM

Fixes:

  • Display of the lora variants in local NIM mode
  • _lint.yml workflow update for the failing lint checks

Copy link
Collaborator

@mattf mattf left a comment

Choose a reason for hiding this comment

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

looks like the right approach.

libs/ai-endpoints/langchain_nvidia_ai_endpoints/_common.py Outdated Show resolved Hide resolved
# set default model
name = values.get("client").default_model.id
values["model"] = name
warnings.warn(
Copy link
Collaborator

Choose a reason for hiding this comment

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

good that you're notifying the user about the action you're taking on their behalf.

@raspawar raspawar requested a review from mattf June 24, 2024 13:47
@raspawar raspawar force-pushed the raspawar/default-llm-model branch from 8929e9d to 834843e Compare June 25, 2024 04:54
@raspawar raspawar requested a review from mattf June 25, 2024 09:35
@raspawar raspawar force-pushed the raspawar/default-llm-model branch 2 times, most recently from 4eb3d46 to d553c9d Compare June 25, 2024 13:29
@raspawar raspawar requested a review from mattf June 25, 2024 14:47
@mattf mattf merged commit c16e959 into main Jun 25, 2024
12 checks passed
@mattf mattf deleted the raspawar/default-llm-model branch June 25, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants