Repository navigation
Add a command to list the available inference models #206
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,7 +6,6 @@ linters: | |
| - containedctx | ||
| - contextcheck | ||
| - errorlint | ||
| - goconst | ||
| - godot | ||
| - importas | ||
| - modernize | ||
|
|
||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| ## qcloud inference | ||
|
|
||
| Manage inference resources | ||
|
|
||
| ### Synopsis | ||
|
|
||
| Inspect the inference models offered by Qdrant Cloud. | ||
|
|
||
| Inference models turn text or images into dense, sparse or multi vectors directly | ||
| inside Qdrant Cloud, so a cluster can embed documents and queries without a | ||
| separate embedding service. Which models are offered depends on the cloud | ||
| provider and region a cluster runs in. | ||
|
|
||
| ### Examples | ||
|
|
||
| ``` | ||
| # List the inference models available in a region | ||
| qcloud inference models list --cloud-provider aws --cloud-region eu-central-1 | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| ``` | ||
| -h, --help help for inference | ||
| ``` | ||
|
|
||
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| --account-id string Qdrant Cloud Account ID (env: QDRANT_CLOUD_ACCOUNT_ID) | ||
| --api-key string Management API Key (env: QDRANT_CLOUD_API_KEY) | ||
| -c, --config string Config file path (env: QDRANT_CLOUD_CONFIG, default ~/.config/qcloud/config.yaml) | ||
| --console-url string Qdrant Cloud web console base URL (env: QDRANT_CLOUD_CONSOLE_URL, default https://cloud.qdrant.io) | ||
| --context string Override the active context (env: QDRANT_CLOUD_CONTEXT) | ||
| --debug Enable debug logging to stderr | ||
| --endpoint string gRPC API endpoint (env: QDRANT_CLOUD_ENDPOINT, default grpc.cloud.qdrant.io:443) | ||
| --json Output as JSON | ||
| ``` | ||
|
|
||
| ### SEE ALSO | ||
|
|
||
| * [qcloud](qcloud.md) - Qdrant Cloud CLI | ||
| * [qcloud inference models](qcloud_inference_models.md) - Manage inference models | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| ## qcloud inference models | ||
|
|
||
| Manage inference models | ||
|
|
||
| ### Synopsis | ||
|
|
||
| Inspect the individual inference models offered by Qdrant Cloud. | ||
|
|
||
| A model is identified by its name (for example "cohere/*"), and describes the | ||
| vectors it produces: the vector type, the modality of the input it accepts, and | ||
| the dimensionality of its output. | ||
|
|
||
| ### Examples | ||
|
|
||
| ``` | ||
| # List the inference models available in a region | ||
| qcloud inference models list --cloud-provider aws --cloud-region eu-central-1 | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| ``` | ||
| -h, --help help for models | ||
| ``` | ||
|
|
||
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| --account-id string Qdrant Cloud Account ID (env: QDRANT_CLOUD_ACCOUNT_ID) | ||
| --api-key string Management API Key (env: QDRANT_CLOUD_API_KEY) | ||
| -c, --config string Config file path (env: QDRANT_CLOUD_CONFIG, default ~/.config/qcloud/config.yaml) | ||
| --console-url string Qdrant Cloud web console base URL (env: QDRANT_CLOUD_CONSOLE_URL, default https://cloud.qdrant.io) | ||
| --context string Override the active context (env: QDRANT_CLOUD_CONTEXT) | ||
| --debug Enable debug logging to stderr | ||
| --endpoint string gRPC API endpoint (env: QDRANT_CLOUD_ENDPOINT, default grpc.cloud.qdrant.io:443) | ||
| --json Output as JSON | ||
| ``` | ||
|
|
||
| ### SEE ALSO | ||
|
|
||
| * [qcloud inference](qcloud_inference.md) - Manage inference resources | ||
| * [qcloud inference models list](qcloud_inference_models_list.md) - List available inference models | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| ## qcloud inference models list | ||
|
|
||
| List available inference models | ||
|
|
||
| ### Synopsis | ||
|
|
||
| List the inference models globally available for a cloud provider and region. | ||
|
|
||
| The listing is global, not account-specific: it shows every model Qdrant Cloud | ||
| offers in that region, together with the vector type and modality it produces, | ||
| its output dimensionality and per-request token limit, and its price per one | ||
| million processed tokens. External models are served by a third-party vendor and | ||
| require that vendor's API key to be configured on the cluster. | ||
|
|
||
| Inference is only offered on managed cloud, so unlike "qcloud package | ||
| list" this command cannot be used with hybrid cloud. | ||
|
|
||
| ``` | ||
| qcloud inference models list [flags] | ||
| ``` | ||
|
|
||
| ### Examples | ||
|
|
||
| ``` | ||
| # List inference models available on AWS in eu-central-1 | ||
| qcloud inference models list --cloud-provider aws --cloud-region eu-central-1 | ||
|
|
||
| # List inference models as JSON | ||
| qcloud inference models list --cloud-provider gcp --cloud-region us-east4 --json | ||
| ``` | ||
|
|
||
| ### Options | ||
|
|
||
| ``` | ||
| --cloud-provider string Cloud provider ID (required) | ||
| --cloud-region string Cloud provider region ID (required) | ||
| -h, --help help for list | ||
| --no-headers Do not print column headers | ||
| ``` | ||
|
|
||
| ### Options inherited from parent commands | ||
|
|
||
| ``` | ||
| --account-id string Qdrant Cloud Account ID (env: QDRANT_CLOUD_ACCOUNT_ID) | ||
| --api-key string Management API Key (env: QDRANT_CLOUD_API_KEY) | ||
| -c, --config string Config file path (env: QDRANT_CLOUD_CONFIG, default ~/.config/qcloud/config.yaml) | ||
| --console-url string Qdrant Cloud web console base URL (env: QDRANT_CLOUD_CONSOLE_URL, default https://cloud.qdrant.io) | ||
| --context string Override the active context (env: QDRANT_CLOUD_CONTEXT) | ||
| --debug Enable debug logging to stderr | ||
| --endpoint string gRPC API endpoint (env: QDRANT_CLOUD_ENDPOINT, default grpc.cloud.qdrant.io:443) | ||
| --json Output as JSON | ||
| ``` | ||
|
|
||
| ### SEE ALSO | ||
|
|
||
| * [qcloud inference models](qcloud_inference_models.md) - Manage inference models | ||
|
|
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| package inference | ||
|
|
||
| import ( | ||
| "github.com/spf13/cobra" | ||
|
|
||
| "github.com/qdrant/qcloud-cli/internal/state" | ||
| ) | ||
|
|
||
| // NewCommand creates the "inference" parent command and registers all subcommands. | ||
| func NewCommand(s *state.State) *cobra.Command { | ||
| cmd := &cobra.Command{ | ||
| Use: "inference", | ||
| Short: "Manage inference resources", | ||
| Long: `Inspect the inference models offered by Qdrant Cloud. | ||
|
|
||
| Inference models turn text or images into dense, sparse or multi vectors directly | ||
| inside Qdrant Cloud, so a cluster can embed documents and queries without a | ||
| separate embedding service. Which models are offered depends on the cloud | ||
| provider and region a cluster runs in.`, | ||
| Example: `# List the inference models available in a region | ||
| qcloud inference models list --cloud-provider aws --cloud-region eu-central-1`, | ||
| Args: cobra.NoArgs, | ||
| } | ||
| cmd.AddCommand(newModelsCommand(s)) | ||
| return cmd | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| package inference | ||
|
|
||
| import ( | ||
| "github.com/spf13/cobra" | ||
|
|
||
| "github.com/qdrant/qcloud-cli/internal/state" | ||
| ) | ||
|
|
||
| func newModelsCommand(s *state.State) *cobra.Command { | ||
| cmd := &cobra.Command{ | ||
| Use: "models", | ||
| Short: "Manage inference models", | ||
| Long: `Inspect the individual inference models offered by Qdrant Cloud. | ||
|
|
||
| A model is identified by its name (for example "cohere/*"), and describes the | ||
| vectors it produces: the vector type, the modality of the input it accepts, and | ||
| the dimensionality of its output.`, | ||
| Example: `# List the inference models available in a region | ||
| qcloud inference models list --cloud-provider aws --cloud-region eu-central-1`, | ||
| Args: cobra.NoArgs, | ||
| } | ||
| cmd.AddCommand(newModelsListCommand(s)) | ||
| return cmd | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's the reasoning for dropping goconst?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new version created tons of new warnings to extract strings into constants that were not helpful.