From a9ab9887c2cb36a8cda53472993e9933a2e99cb5 Mon Sep 17 00:00:00 2001 From: Omer Lachish Date: Thu, 28 Aug 2025 14:58:42 +0200 Subject: [PATCH] update sdk --- .codegen/_openapi_sha | 2 +- .gitattributes | 6 +++++ NEXT_CHANGELOG.md | 13 +++++++++ service/cleanrooms/model.go | 4 +-- service/dashboards/model.go | 8 +++--- service/database/model.go | 10 +++++++ service/iam/api.go | 8 ++++-- service/iam/impl.go | 8 ++++-- service/iam/interface.go | 4 ++- service/jobs/model.go | 45 +++++++++++++++++++++++++++++++ service/ml/model.go | 42 ++++++++++++++--------------- service/pipelines/model.go | 51 +++++++++++++++++++++++++++++++++++ service/pkg.go | 4 +-- service/settings/model.go | 18 ++++++++++++- service/vectorsearch/model.go | 41 +++++++++++++++++++++++++++- 15 files changed, 227 insertions(+), 37 deletions(-) diff --git a/.codegen/_openapi_sha b/.codegen/_openapi_sha index 3461bf684..8af35ea49 100644 --- a/.codegen/_openapi_sha +++ b/.codegen/_openapi_sha @@ -1 +1 @@ -6701524136501ef070774942ef5d6e01cfaafb88 \ No newline at end of file +b95c2c6e21bec9551ec7d7d51ddf2dfe390b4522 \ No newline at end of file diff --git a/.gitattributes b/.gitattributes index ee0a72c57..b53cc51ef 100644 --- a/.gitattributes +++ b/.gitattributes @@ -6,6 +6,7 @@ experimental/mocks/mock_account_client.go linguist-generated=true experimental/mocks/mock_workspace_client.go linguist-generated=true experimental/mocks/service/agentbricks/mock_agent_bricks_interface.go linguist-generated=true experimental/mocks/service/apps/mock_apps_interface.go linguist-generated=true +experimental/mocks/service/apps/mock_apps_settings_interface.go linguist-generated=true experimental/mocks/service/billing/mock_billable_usage_interface.go linguist-generated=true experimental/mocks/service/billing/mock_budget_policy_interface.go linguist-generated=true experimental/mocks/service/billing/mock_budgets_interface.go linguist-generated=true @@ -18,6 +19,7 @@ experimental/mocks/service/catalog/mock_artifact_allowlists_interface.go linguis experimental/mocks/service/catalog/mock_catalogs_interface.go linguist-generated=true experimental/mocks/service/catalog/mock_connections_interface.go linguist-generated=true experimental/mocks/service/catalog/mock_credentials_interface.go linguist-generated=true +experimental/mocks/service/catalog/mock_entity_tag_assignments_interface.go linguist-generated=true experimental/mocks/service/catalog/mock_external_lineage_interface.go linguist-generated=true experimental/mocks/service/catalog/mock_external_locations_interface.go linguist-generated=true experimental/mocks/service/catalog/mock_external_metadata_interface.go linguist-generated=true @@ -30,6 +32,7 @@ experimental/mocks/service/catalog/mock_policies_interface.go linguist-generated experimental/mocks/service/catalog/mock_quality_monitors_interface.go linguist-generated=true experimental/mocks/service/catalog/mock_registered_models_interface.go linguist-generated=true experimental/mocks/service/catalog/mock_resource_quotas_interface.go linguist-generated=true +experimental/mocks/service/catalog/mock_rfa_interface.go linguist-generated=true experimental/mocks/service/catalog/mock_schemas_interface.go linguist-generated=true experimental/mocks/service/catalog/mock_storage_credentials_interface.go linguist-generated=true experimental/mocks/service/catalog/mock_system_schemas_interface.go linguist-generated=true @@ -144,6 +147,8 @@ experimental/mocks/service/settings/mock_token_management_interface.go linguist- experimental/mocks/service/settings/mock_tokens_interface.go linguist-generated=true experimental/mocks/service/settings/mock_workspace_conf_interface.go linguist-generated=true experimental/mocks/service/settings/mock_workspace_network_configuration_interface.go linguist-generated=true +experimental/mocks/service/settingsv2/mock_account_settings_v2_interface.go linguist-generated=true +experimental/mocks/service/settingsv2/mock_workspace_settings_v2_interface.go linguist-generated=true experimental/mocks/service/sharing/mock_providers_interface.go linguist-generated=true experimental/mocks/service/sharing/mock_recipient_activation_interface.go linguist-generated=true experimental/mocks/service/sharing/mock_recipient_federation_policies_interface.go linguist-generated=true @@ -164,6 +169,7 @@ experimental/mocks/service/sql/mock_query_visualizations_legacy_interface.go lin experimental/mocks/service/sql/mock_redash_config_interface.go linguist-generated=true experimental/mocks/service/sql/mock_statement_execution_interface.go linguist-generated=true experimental/mocks/service/sql/mock_warehouses_interface.go linguist-generated=true +experimental/mocks/service/tags/mock_tag_policies_interface.go linguist-generated=true experimental/mocks/service/vectorsearch/mock_vector_search_endpoints_interface.go linguist-generated=true experimental/mocks/service/vectorsearch/mock_vector_search_indexes_interface.go linguist-generated=true experimental/mocks/service/workspace/mock_git_credentials_interface.go linguist-generated=true diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 2accf1c61..ec9896b10 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -11,3 +11,16 @@ ### Internal Changes ### API Changes +* Added `Comment` field for [dashboards.GenieSendMessageFeedbackRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieSendMessageFeedbackRequest). +* [Breaking] Added `Rating` field for [dashboards.GenieSendMessageFeedbackRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieSendMessageFeedbackRequest). +* Added `EffectiveEnablePgNativeLogin` and `EnablePgNativeLogin` fields for [database.DatabaseInstance](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/database#DatabaseInstance). +* Added `TaskRetryMode` field for [jobs.Continuous](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/jobs#Continuous). +* Added `SourceConfigurations` field for [pipelines.IngestionPipelineDefinition](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/pipelines#IngestionPipelineDefinition). +* Added `AppId`, `AppIdSet`, `AuthSecret`, `AuthSecretSet`, `ChannelUrl`, `ChannelUrlSet`, `TenantId` and `TenantIdSet` fields for [settings.MicrosoftTeamsConfig](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/settings#MicrosoftTeamsConfig). +* Added `EnsureRerankerCompatible` field for [vectorsearch.GetIndexRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#GetIndexRequest). +* Added `Reranker` field for [vectorsearch.QueryVectorIndexRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/vectorsearch#QueryVectorIndexRequest). +* [Breaking] Changed `CreateCleanRoomAssetReview` method for [w.CleanRoomAssets](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CleanRoomAssetsAPI) workspace-level service with new required argument order. +* [Breaking] Changed `SendMessageFeedback` method for [w.Genie](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieAPI) workspace-level service with new required argument order. +* Changed `NotebookReview` field for [cleanrooms.CreateCleanRoomAssetReviewRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/cleanrooms#CreateCleanRoomAssetReviewRequest) to no longer be required. +* [Breaking] Changed `Features` field for [ml.FeatureList](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#FeatureList) to type [][ml.LinkedFeature](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/ml#LinkedFeature). +* [Breaking] Removed `FeedbackRating` and `FeedbackText` fields for [dashboards.GenieSendMessageFeedbackRequest](https://pkg.go.dev/github.com/databricks/databricks-sdk-go/service/dashboards#GenieSendMessageFeedbackRequest). \ No newline at end of file diff --git a/service/cleanrooms/model.go b/service/cleanrooms/model.go index 9fd0bf74e..042dc7f71 100755 --- a/service/cleanrooms/model.go +++ b/service/cleanrooms/model.go @@ -733,14 +733,14 @@ type CreateCleanRoomAssetRequest struct { } type CreateCleanRoomAssetReviewRequest struct { - // Asset type. Can only be NOTEBOOK_FILE. + // Asset type. Can either be NOTEBOOK_FILE or JAR_ANALYSIS. AssetType CleanRoomAssetAssetType `json:"-" url:"-"` // Name of the clean room CleanRoomName string `json:"-" url:"-"` // Name of the asset Name string `json:"-" url:"-"` - NotebookReview NotebookVersionReview `json:"notebook_review"` + NotebookReview *NotebookVersionReview `json:"notebook_review,omitempty"` } type CreateCleanRoomAssetReviewResponse struct { diff --git a/service/dashboards/model.go b/service/dashboards/model.go index fa600a770..f2336cf1a 100755 --- a/service/dashboards/model.go +++ b/service/dashboards/model.go @@ -597,14 +597,14 @@ func (s GenieResultMetadata) MarshalJSON() ([]byte, error) { } type GenieSendMessageFeedbackRequest struct { + // Optional text feedback that will be stored as a comment. + Comment string `json:"comment,omitempty"` // The ID associated with the conversation. ConversationId string `json:"-" url:"-"` - // The rating (POSITIVE, NEGATIVE, or NONE). - FeedbackRating GenieFeedbackRating `json:"feedback_rating"` - // Optional text feedback that will be stored as a comment. - FeedbackText string `json:"feedback_text,omitempty"` // The ID associated with the message to provide feedback for. MessageId string `json:"-" url:"-"` + // The rating (POSITIVE, NEGATIVE, or NONE). + Rating GenieFeedbackRating `json:"rating"` // The ID associated with the Genie space where the message is located. SpaceId string `json:"-" url:"-"` diff --git a/service/database/model.go b/service/database/model.go index fe92f97cd..4d32ac958 100755 --- a/service/database/model.go +++ b/service/database/model.go @@ -81,6 +81,13 @@ type DatabaseInstance struct { CreationTime string `json:"creation_time,omitempty"` // The email of the creator of the instance. Creator string `json:"creator,omitempty"` + // xref AIP-129. `enable_pg_native_login` is owned by the client, while + // `effective_enable_pg_native_login` is owned by the server. + // `enable_pg_native_login` will only be set in Create/Update response + // messages if and only if the user provides the field via the request. + // `effective_enable_pg_native_login` on the other hand will always bet set + // in all response messages (Create/Update/Get/List). + EffectiveEnablePgNativeLogin bool `json:"effective_enable_pg_native_login,omitempty"` // xref AIP-129. `enable_readable_secondaries` is owned by the client, while // `effective_enable_readable_secondaries` is owned by the server. // `enable_readable_secondaries` will only be set in Create/Update response @@ -107,6 +114,9 @@ type DatabaseInstance struct { // request. `effective_stopped` on the other hand will always bet set in all // response messages (Create/Update/Get/List). EffectiveStopped bool `json:"effective_stopped,omitempty"` + // Whether the instance has PG native password login enabled. Defaults to + // true. + EnablePgNativeLogin bool `json:"enable_pg_native_login,omitempty"` // Whether to enable secondaries to serve read-only traffic. Defaults to // false. EnableReadableSecondaries bool `json:"enable_readable_secondaries,omitempty"` diff --git a/service/iam/api.go b/service/iam/api.go index edabb3d05..820e2ce6d 100755 --- a/service/iam/api.go +++ b/service/iam/api.go @@ -116,12 +116,16 @@ type AccountGroupsInterface interface { // Gets the information for a specific group in the Databricks account. GetById(ctx context.Context, id string) (*Group, error) - // Gets all details of the groups associated with the Databricks account. + // Gets all details of the groups associated with the Databricks account. As of + // 08/22/2025, this endpoint will not return members. Instead, members should be + // retrieved by iterating through `Get group details`. // // This method is generated by Databricks SDK Code Generator. List(ctx context.Context, request ListAccountGroupsRequest) listing.Iterator[Group] - // Gets all details of the groups associated with the Databricks account. + // Gets all details of the groups associated with the Databricks account. As of + // 08/22/2025, this endpoint will not return members. Instead, members should be + // retrieved by iterating through `Get group details`. // // This method is generated by Databricks SDK Code Generator. ListAll(ctx context.Context, request ListAccountGroupsRequest) ([]Group, error) diff --git a/service/iam/impl.go b/service/iam/impl.go index 9565b03a9..a593516c0 100755 --- a/service/iam/impl.go +++ b/service/iam/impl.go @@ -133,7 +133,9 @@ func (a *accountGroupsImpl) Get(ctx context.Context, request GetAccountGroupRequ return &group, err } -// Gets all details of the groups associated with the Databricks account. +// Gets all details of the groups associated with the Databricks account. As of +// 08/22/2025, this endpoint will not return members. Instead, members should be +// retrieved by iterating through `Get group details`. func (a *accountGroupsImpl) List(ctx context.Context, request ListAccountGroupsRequest) listing.Iterator[Group] { request.StartIndex = 1 // SCIM offset starts from 1 @@ -167,7 +169,9 @@ func (a *accountGroupsImpl) List(ctx context.Context, request ListAccountGroupsR return dedupedIterator } -// Gets all details of the groups associated with the Databricks account. +// Gets all details of the groups associated with the Databricks account. As of +// 08/22/2025, this endpoint will not return members. Instead, members should be +// retrieved by iterating through `Get group details`. func (a *accountGroupsImpl) ListAll(ctx context.Context, request ListAccountGroupsRequest) ([]Group, error) { iterator := a.List(ctx, request) return listing.ToSliceN[Group, int64](ctx, iterator, request.Count) diff --git a/service/iam/interface.go b/service/iam/interface.go index 805e37f1e..051cc5550 100755 --- a/service/iam/interface.go +++ b/service/iam/interface.go @@ -83,7 +83,9 @@ type AccountGroupsService interface { // Gets the information for a specific group in the Databricks account. Get(ctx context.Context, request GetAccountGroupRequest) (*Group, error) - // Gets all details of the groups associated with the Databricks account. + // Gets all details of the groups associated with the Databricks account. As + // of 08/22/2025, this endpoint will not return members. Instead, members + // should be retrieved by iterating through `Get group details`. List(ctx context.Context, request ListAccountGroupsRequest) (*ListGroupsResponse, error) // Partially updates the details of a group. diff --git a/service/jobs/model.go b/service/jobs/model.go index eb8e6e3c7..925776d80 100755 --- a/service/jobs/model.go +++ b/service/jobs/model.go @@ -634,6 +634,9 @@ type Continuous struct { // Indicate whether the continuous execution of the job is paused or not. // Defaults to UNPAUSED. PauseStatus PauseStatus `json:"pause_status,omitempty"` + // Indicate whether the continuous job is applying task level retries or + // not. Defaults to NEVER. + TaskRetryMode TaskRetryMode `json:"task_retry_mode,omitempty"` } type CreateJob struct { @@ -5467,6 +5470,48 @@ func (s TaskNotificationSettings) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// task retry mode of the continuous job * NEVER: The failed task will not be +// retried. * ON_FAILURE: Retry a failed task if at least one other task in the +// job is still running its first attempt. When this condition is no longer met +// or the retry limit is reached, the job run is cancelled and a new run is +// started. +type TaskRetryMode string + +const TaskRetryModeNever TaskRetryMode = `NEVER` + +const TaskRetryModeOnFailure TaskRetryMode = `ON_FAILURE` + +// String representation for [fmt.Print] +func (f *TaskRetryMode) String() string { + return string(*f) +} + +// Set raw string value and validate it against allowed values +func (f *TaskRetryMode) Set(v string) error { + switch v { + case `NEVER`, `ON_FAILURE`: + *f = TaskRetryMode(v) + return nil + default: + return fmt.Errorf(`value "%s" is not one of "NEVER", "ON_FAILURE"`, v) + } +} + +// Values returns all possible values for TaskRetryMode. +// +// There is no guarantee on the order of the values in the slice. +func (f *TaskRetryMode) Values() []TaskRetryMode { + return []TaskRetryMode{ + TaskRetryModeNever, + TaskRetryModeOnFailure, + } +} + +// Type always returns TaskRetryMode to satisfy [pflag.Value] interface +func (f *TaskRetryMode) Type() string { + return "TaskRetryMode" +} + // The code indicates why the run was terminated. Additional codes might be // introduced in future releases. * `SUCCESS`: The run was completed // successfully. * `SUCCESS_WITH_FAILURES`: The run was completed successfully diff --git a/service/ml/model.go b/service/ml/model.go index 48020df24..f58c8c7fe 100755 --- a/service/ml/model.go +++ b/service/ml/model.go @@ -1099,26 +1099,6 @@ func (s ExperimentTag) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } -// Feature for model version. -type Feature struct { - // Feature name - FeatureName string `json:"feature_name,omitempty"` - // Feature table id - FeatureTableId string `json:"feature_table_id,omitempty"` - // Feature table name - FeatureTableName string `json:"feature_table_name,omitempty"` - - ForceSendFields []string `json:"-" url:"-"` -} - -func (s *Feature) UnmarshalJSON(b []byte) error { - return marshal.Unmarshal(b, s) -} - -func (s Feature) MarshalJSON() ([]byte, error) { - return marshal.Marshal(s) -} - type FeatureLineage struct { // List of feature specs that contain this feature. FeatureSpecs []FeatureLineageFeatureSpec `json:"feature_specs,omitempty"` @@ -1179,7 +1159,7 @@ func (s FeatureLineageOnlineFeature) MarshalJSON() ([]byte, error) { // Feature list wrap all the features for a model version type FeatureList struct { - Features []Feature `json:"features,omitempty"` + Features []LinkedFeature `json:"features,omitempty"` } // Represents a tag on a feature in a feature table. @@ -1616,6 +1596,26 @@ func (s JobSpecWithoutSecret) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// Feature for model version. ([ML-57150] Renamed from Feature to LinkedFeature) +type LinkedFeature struct { + // Feature name + FeatureName string `json:"feature_name,omitempty"` + // Feature table id + FeatureTableId string `json:"feature_table_id,omitempty"` + // Feature table name + FeatureTableName string `json:"feature_table_name,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *LinkedFeature) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s LinkedFeature) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type ListArtifactsRequest struct { // The token indicating the page of artifact results to fetch. `page_token` // is not supported when listing artifacts in UC Volumes. A maximum of 1000 diff --git a/service/pipelines/model.go b/service/pipelines/model.go index 34b17d54c..9b4804e8a 100755 --- a/service/pipelines/model.go +++ b/service/pipelines/model.go @@ -599,6 +599,8 @@ type IngestionPipelineDefinition struct { // Required. Settings specifying tables to replicate and the destination for // the replicated tables. Objects []IngestionConfig `json:"objects,omitempty"` + // Top-level source configurations + SourceConfigurations []SourceConfig `json:"source_configurations,omitempty"` // The type of the foreign source. The source type will be inferred from the // source connection or ingestion gateway. This field is output only and // will be ignored if provided. @@ -1639,6 +1641,31 @@ type PipelinesEnvironment struct { Dependencies []string `json:"dependencies,omitempty"` } +// PG-specific catalog-level configuration parameters +type PostgresCatalogConfig struct { + // Optional. The Postgres slot configuration to use for logical replication + SlotConfig *PostgresSlotConfig `json:"slot_config,omitempty"` +} + +// PostgresSlotConfig contains the configuration for a Postgres logical +// replication slot +type PostgresSlotConfig struct { + // The name of the publication to use for the Postgres source + PublicationName string `json:"publication_name,omitempty"` + // The name of the logical replication slot to use for the Postgres source + SlotName string `json:"slot_name,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *PostgresSlotConfig) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s PostgresSlotConfig) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + type ReportSpec struct { // Required. Destination catalog to store table. DestinationCatalog string `json:"destination_catalog"` @@ -1779,6 +1806,30 @@ func (s SerializedException) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +// SourceCatalogConfig contains catalog-level custom configuration parameters +// for each source +type SourceCatalogConfig struct { + // Postgres-specific catalog-level configuration parameters + Postgres *PostgresCatalogConfig `json:"postgres,omitempty"` + // Source catalog name + SourceCatalog string `json:"source_catalog,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *SourceCatalogConfig) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s SourceCatalogConfig) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type SourceConfig struct { + // Catalog-level source configuration parameters + Catalog *SourceCatalogConfig `json:"catalog,omitempty"` +} + type StackFrame struct { // Class from which the method call originated DeclaringClass string `json:"declaring_class,omitempty"` diff --git a/service/pkg.go b/service/pkg.go index 109371b59..b808e16a1 100644 --- a/service/pkg.go +++ b/service/pkg.go @@ -64,10 +64,10 @@ // // - [marketplace.ConsumerProvidersAPI]: Providers are the entities that publish listings to the Marketplace. // -// - [provisioning.CredentialsAPI]: These APIs manage credential configurations for this workspace. -// // - [catalog.CredentialsAPI]: A credential represents an authentication and authorization mechanism for accessing services on your cloud tenant. // +// - [provisioning.CredentialsAPI]: These APIs manage credential configurations for this workspace. +// // - [settings.CredentialsManagerAPI]: Credentials manager interacts with with Identity Providers to to perform token exchanges using stored credentials and refresh tokens. // // - [settings.CspEnablementAccountAPI]: The compliance security profile settings at the account level control whether to enable it for new workspaces. diff --git a/service/settings/model.go b/service/settings/model.go index c90ae4022..bce586b03 100755 --- a/service/settings/model.go +++ b/service/settings/model.go @@ -3206,7 +3206,23 @@ func (s LlmProxyPartnerPoweredWorkspace) MarshalJSON() ([]byte, error) { } type MicrosoftTeamsConfig struct { - // [Input-Only] URL for Microsoft Teams. + // [Input-Only] App ID for Microsoft Teams App. + AppId string `json:"app_id,omitempty"` + // [Output-Only] Whether App ID is set. + AppIdSet bool `json:"app_id_set,omitempty"` + // [Input-Only] Secret for Microsoft Teams App authentication. + AuthSecret string `json:"auth_secret,omitempty"` + // [Output-Only] Whether secret is set. + AuthSecretSet bool `json:"auth_secret_set,omitempty"` + // [Input-Only] Channel URL for Microsoft Teams App. + ChannelUrl string `json:"channel_url,omitempty"` + // [Output-Only] Whether Channel URL is set. + ChannelUrlSet bool `json:"channel_url_set,omitempty"` + // [Input-Only] Tenant ID for Microsoft Teams App. + TenantId string `json:"tenant_id,omitempty"` + // [Output-Only] Whether Tenant ID is set. + TenantIdSet bool `json:"tenant_id_set,omitempty"` + // [Input-Only] URL for Microsoft Teams webhook. Url string `json:"url,omitempty"` // [Output-Only] Whether URL is set. UrlSet bool `json:"url_set,omitempty"` diff --git a/service/vectorsearch/model.go b/service/vectorsearch/model.go index 9afd655b2..2e8076edd 100755 --- a/service/vectorsearch/model.go +++ b/service/vectorsearch/model.go @@ -421,8 +421,24 @@ type GetEndpointRequest struct { } type GetIndexRequest struct { + // If true, the URL returned for the index is guaranteed to be compatible + // with the reranker. Currently this means we return the CP URL regardless + // of how the index is being accessed. If not set or set to false, the URL + // may still be compatible with the reranker depending on what URL we + // return. + EnsureRerankerCompatible bool `json:"-" url:"ensure_reranker_compatible,omitempty"` // Name of the index IndexName string `json:"-" url:"-"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *GetIndexRequest) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s GetIndexRequest) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) } type ListEndpointResponse struct { @@ -540,7 +556,8 @@ func (s MiniVectorIndex) MarshalJSON() ([]byte, error) { } type PatchEndpointBudgetPolicyRequest struct { - // The budget policy id to be applied + // The budget policy id to be applied (hima-sheth) TODO: remove this once + // we've migrated to usage policies BudgetPolicyId string `json:"budget_policy_id"` // Name of the vector search endpoint EndpointName string `json:"-" url:"-"` @@ -656,6 +673,8 @@ type QueryVectorIndexRequest struct { // Query vector. Required for Direct Vector Access Index and Delta Sync // Index using self-managed vectors. QueryVector []float64 `json:"query_vector,omitempty"` + + Reranker *RerankerConfig `json:"reranker,omitempty"` // Threshold for the approximate nearest neighbor search. Defaults to 0.0. ScoreThreshold float64 `json:"score_threshold,omitempty"` @@ -692,6 +711,26 @@ func (s QueryVectorIndexResponse) MarshalJSON() ([]byte, error) { return marshal.Marshal(s) } +type RerankerConfig struct { + Model string `json:"model,omitempty"` + + Parameters *RerankerConfigRerankerParameters `json:"parameters,omitempty"` + + ForceSendFields []string `json:"-" url:"-"` +} + +func (s *RerankerConfig) UnmarshalJSON(b []byte) error { + return marshal.Unmarshal(b, s) +} + +func (s RerankerConfig) MarshalJSON() ([]byte, error) { + return marshal.Marshal(s) +} + +type RerankerConfigRerankerParameters struct { + ColumnsToRerank []string `json:"columns_to_rerank,omitempty"` +} + // Data returned in the query result. type ResultData struct { // Data rows returned in the query.