This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Merged
Conversation
cd5bc49 to
83d5204
Compare
add a dedicated function Inspect to Desktop Client which return a Model struct, used it in run command Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
83d5204 to
faf86f8
Compare
doringeman
approved these changes
Apr 23, 2025
commands/inspect.go
Outdated
| return c | ||
| } | ||
|
|
||
| func inpsectModel(args []string, openai bool, desktopClient *desktop.Client) (string, error) { |
Collaborator
There was a problem hiding this comment.
Suggested change
| func inpsectModel(args []string, openai bool, desktopClient *desktop.Client) (string, error) { | |
| func inspectModel(args []string, openai bool, desktopClient *desktop.Client) (string, error) { |
commands/inspect.go
Outdated
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| model := args[0] | ||
| model, err := desktopClient.List(false, openai, false, model) | ||
| inspectedModel, err := inpsectModel(args, openai, desktopClient) |
Collaborator
There was a problem hiding this comment.
Suggested change
| inspectedModel, err := inpsectModel(args, openai, desktopClient) | |
| inspectedModel, err := inspectModel(args, openai, desktopClient) |
desktop/desktop.go
Outdated
Comment on lines
232
to
233
| if model, err = c.fullModelID(model); err != nil { | ||
| return Model{}, fmt.Errorf("invalid model name: %s", model) |
Collaborator
There was a problem hiding this comment.
Suggested change
| if model, err = c.fullModelID(model); err != nil { | |
| return Model{}, fmt.Errorf("invalid model name: %s", model) | |
| receivedModel := model | |
| if model, err = c.fullModelID(model); err != nil { | |
| return Model{}, fmt.Errorf("invalid model name: %s", receivedModel) |
Otherwise I won't see the received/queried model in the error:
$ docker model run 436bb
Failed to list models: invalid model name:
1d11ab0 to
39287c7
Compare
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
39287c7 to
8a0af40
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added the capability to run a model from its ID
Splited
Client.Listfunction to apply separation of concerns: