Documentation
¶
Index ¶
- type Client
- func (c *Client) CreateEndpoint(ctx context.Context, req CreateEndpointRequest, opts ...call.Option) (*CreateEndpointWaiter, error)
- func (c *Client) CreateVectorIndex(ctx context.Context, req CreateVectorIndexRequest, opts ...call.Option) (*VectorIndex, error)
- func (c *Client) DeleteDataVectorIndex(ctx context.Context, req DeleteDataVectorIndexRequest, opts ...call.Option) (*DeleteDataVectorIndexResponse, error)
- func (c *Client) DeleteEndpoint(ctx context.Context, req DeleteEndpointRequest, opts ...call.Option) (*DeleteEndpointResponse, error)
- func (c *Client) DeleteVectorIndex(ctx context.Context, req DeleteVectorIndexRequest, opts ...call.Option) (*DeleteVectorIndexResponse, error)
- func (c *Client) GetEndpoint(ctx context.Context, req GetEndpointRequest, opts ...call.Option) (*Endpoint, error)
- func (c *Client) GetVectorIndex(ctx context.Context, req GetVectorIndexRequest, opts ...call.Option) (*VectorIndex, error)
- func (c *Client) ListEndpoints(ctx context.Context, req ListEndpointsRequest, opts ...call.Option) (*ListEndpointResponse, error)
- func (c *Client) ListEndpointsIter(ctx context.Context, req ListEndpointsRequest, opts ...call.Option) iter.Seq2[*Endpoint, error]
- func (c *Client) ListVectorIndex(ctx context.Context, req ListVectorIndexRequest, opts ...call.Option) (*ListVectorIndexResponse, error)
- func (c *Client) ListVectorIndexIter(ctx context.Context, req ListVectorIndexRequest, opts ...call.Option) iter.Seq2[*MiniVectorIndex, error]
- func (c *Client) PatchEndpoint(ctx context.Context, req PatchEndpointRequest, opts ...call.Option) (*Endpoint, error)
- func (c *Client) PatchEndpointBudgetPolicy(ctx context.Context, req PatchEndpointBudgetPolicyRequest, opts ...call.Option) (*PatchEndpointBudgetPolicyResponse, error)
- func (c *Client) QueryVectorIndex(ctx context.Context, req QueryVectorIndexRequest, opts ...call.Option) (*QueryVectorIndexResponse, error)
- func (c *Client) QueryVectorIndexNextPage(ctx context.Context, req QueryVectorIndexNextPageRequest, opts ...call.Option) (*QueryVectorIndexResponse, error)
- func (c *Client) RetrieveUserVisibleMetrics(ctx context.Context, req RetrieveUserVisibleMetricsRequest, ...) (*RetrieveUserVisibleMetricsResponse, error)
- func (c *Client) ScanVectorIndex(ctx context.Context, req ScanVectorIndexRequest, opts ...call.Option) (*ScanVectorIndexResponse, error)
- func (c *Client) SyncVectorIndex(ctx context.Context, req SyncVectorIndexRequest, opts ...call.Option) (*SyncVectorIndexResponse, error)
- func (c *Client) UpdateEndpointCustomTags(ctx context.Context, req UpdateEndpointCustomTagsRequest, opts ...call.Option) (*UpdateEndpointCustomTagsResponse, error)
- func (c *Client) UpsertDataVectorIndex(ctx context.Context, req UpsertDataVectorIndexRequest, opts ...call.Option) (*UpsertDataVectorIndexResponse, error)
- type ColumnInfo
- type CreateEndpointRequest
- type CreateEndpointWaiter
- type CreateVectorIndexRequest
- type CreateVectorIndexRequest_IndexSpec_DeltaSyncIndexSpec
- type CreateVectorIndexRequest_IndexSpec_DirectAccessIndexSpec
- type CustomTag
- type DeleteDataVectorIndexRequest
- type DeleteDataVectorIndexResponse
- type DeleteEndpointRequest
- type DeleteEndpointResponse
- type DeleteVectorIndexRequest
- type DeleteVectorIndexResponse
- type DeltaSyncVectorIndexSpec
- type DeltaSyncVectorIndexSpecRequest
- type DirectAccessVectorIndexSpec
- type EmbeddingSourceColumn
- type EmbeddingSourceColumn_EmbeddingConfig_EmbeddingModelEndpointName
- type EmbeddingVectorColumn
- type Endpoint
- type EndpointScalingInfo
- type EndpointStatus
- type EndpointStatus_State
- type EndpointType
- type FacetResultData
- type GetEndpointRequest
- type GetVectorIndexRequest
- type IndexSubtype
- type ListEndpointResponse
- type ListEndpointsRequest
- type ListValue
- type ListVectorIndexRequest
- type ListVectorIndexResponse
- type MapStringValueEntry
- type Metric
- type MetricLabel
- type MetricValue
- type MetricValues
- type MiniVectorIndex
- type MiniVectorIndex_IndexSpec_DeltaSyncIndexSpec
- type MiniVectorIndex_IndexSpec_DirectAccessIndexSpec
- type PatchEndpointBudgetPolicyRequest
- type PatchEndpointBudgetPolicyResponse
- type PatchEndpointRequest
- type PipelineType
- type QueryVectorIndexNextPageRequest
- type QueryVectorIndexRequest
- type QueryVectorIndexResponse
- type RerankerConfig
- type RerankerConfig_RerankerParameters
- type ResultData
- type ResultManifest
- type RetrieveUserVisibleMetricsRequest
- type RetrieveUserVisibleMetricsResponse
- type ScalingChangeState
- type ScanVectorIndexRequest
- type ScanVectorIndexResponse
- type Struct
- type SyncVectorIndexRequest
- type SyncVectorIndexResponse
- type UpdateEndpointCustomTagsRequest
- type UpdateEndpointCustomTagsResponse
- type UpsertDataVectorIndexRequest
- type UpsertDataVectorIndexResponse
- type UpsertDeleteDataResult
- type UpsertDeleteDataStatus
- type Value
- type Value_Kind_BoolValue
- type Value_Kind_ListValue
- type Value_Kind_NumberValue
- type Value_Kind_StringValue
- type Value_Kind_StructValue
- type VectorIndex
- type VectorIndexStatus
- type VectorIndexType
- type VectorIndex_IndexSpec_DeltaSyncIndexSpec
- type VectorIndex_IndexSpec_DirectAccessIndexSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateEndpoint ¶
func (c *Client) CreateEndpoint(ctx context.Context, req CreateEndpointRequest, opts ...call.Option) (*CreateEndpointWaiter, error)
Create a new endpoint.
func (*Client) CreateVectorIndex ¶
func (c *Client) CreateVectorIndex(ctx context.Context, req CreateVectorIndexRequest, opts ...call.Option) (*VectorIndex, error)
Create a new index.
func (*Client) DeleteDataVectorIndex ¶
func (c *Client) DeleteDataVectorIndex(ctx context.Context, req DeleteDataVectorIndexRequest, opts ...call.Option) (*DeleteDataVectorIndexResponse, error)
Handles the deletion of data from a specified vector index.
func (*Client) DeleteEndpoint ¶
func (c *Client) DeleteEndpoint(ctx context.Context, req DeleteEndpointRequest, opts ...call.Option) (*DeleteEndpointResponse, error)
Delete an AI Search endpoint.
func (*Client) DeleteVectorIndex ¶
func (c *Client) DeleteVectorIndex(ctx context.Context, req DeleteVectorIndexRequest, opts ...call.Option) (*DeleteVectorIndexResponse, error)
Delete an index.
func (*Client) GetEndpoint ¶
func (c *Client) GetEndpoint(ctx context.Context, req GetEndpointRequest, opts ...call.Option) (*Endpoint, error)
Get details for a single AI Search endpoint.
func (*Client) GetVectorIndex ¶
func (c *Client) GetVectorIndex(ctx context.Context, req GetVectorIndexRequest, opts ...call.Option) (*VectorIndex, error)
Get an index.
func (*Client) ListEndpoints ¶
func (c *Client) ListEndpoints(ctx context.Context, req ListEndpointsRequest, opts ...call.Option) (*ListEndpointResponse, error)
List all AI Search endpoints in the workspace.
func (*Client) ListEndpointsIter ¶
func (c *Client) ListEndpointsIter(ctx context.Context, req ListEndpointsRequest, opts ...call.Option) iter.Seq2[*Endpoint, error]
ListEndpointsIter returns an iterator that iterates over the results of ListEndpoints.
For example:
for item, err := range c.ListEndpointsIter(ctx, ListEndpointsRequest{}) {
if err != nil {
return err
}
fmt.Println(item)
}
Options opts are passed to each ListEndpoints call made by the iterator under the hood.
Callers who need custom pagination logic should use ListEndpoints directly.
func (*Client) ListVectorIndex ¶
func (c *Client) ListVectorIndex(ctx context.Context, req ListVectorIndexRequest, opts ...call.Option) (*ListVectorIndexResponse, error)
List all indexes in the given endpoint.
func (*Client) ListVectorIndexIter ¶
func (c *Client) ListVectorIndexIter(ctx context.Context, req ListVectorIndexRequest, opts ...call.Option) iter.Seq2[*MiniVectorIndex, error]
ListVectorIndexIter returns an iterator that iterates over the results of ListVectorIndex.
For example:
for item, err := range c.ListVectorIndexIter(ctx, ListVectorIndexRequest{}) {
if err != nil {
return err
}
fmt.Println(item)
}
Options opts are passed to each ListVectorIndex call made by the iterator under the hood.
Callers who need custom pagination logic should use ListVectorIndex directly.
func (*Client) PatchEndpoint ¶
func (c *Client) PatchEndpoint(ctx context.Context, req PatchEndpointRequest, opts ...call.Option) (*Endpoint, error)
Update an endpoint
func (*Client) PatchEndpointBudgetPolicy ¶
func (c *Client) PatchEndpointBudgetPolicy(ctx context.Context, req PatchEndpointBudgetPolicyRequest, opts ...call.Option) (*PatchEndpointBudgetPolicyResponse, error)
Update the budget policy of an endpoint
func (*Client) QueryVectorIndex ¶
func (c *Client) QueryVectorIndex(ctx context.Context, req QueryVectorIndexRequest, opts ...call.Option) (*QueryVectorIndexResponse, error)
Query the specified vector index.
func (*Client) QueryVectorIndexNextPage ¶
func (c *Client) QueryVectorIndexNextPage(ctx context.Context, req QueryVectorIndexNextPageRequest, opts ...call.Option) (*QueryVectorIndexResponse, error)
Use `next_page_token` returned from previous `QueryVectorIndex` or `QueryVectorIndexNextPage` request to fetch next page of results.
func (*Client) RetrieveUserVisibleMetrics ¶
func (c *Client) RetrieveUserVisibleMetrics(ctx context.Context, req RetrieveUserVisibleMetricsRequest, opts ...call.Option) (*RetrieveUserVisibleMetricsResponse, error)
Retrieve user-visible metrics for an endpoint
func (*Client) ScanVectorIndex ¶
func (c *Client) ScanVectorIndex(ctx context.Context, req ScanVectorIndexRequest, opts ...call.Option) (*ScanVectorIndexResponse, error)
Scan the specified vector index and return the first `num_results` entries after the exclusive `primary_key`.
func (*Client) SyncVectorIndex ¶
func (c *Client) SyncVectorIndex(ctx context.Context, req SyncVectorIndexRequest, opts ...call.Option) (*SyncVectorIndexResponse, error)
Triggers a synchronization process for a specified vector index.
func (*Client) UpdateEndpointCustomTags ¶
func (c *Client) UpdateEndpointCustomTags(ctx context.Context, req UpdateEndpointCustomTagsRequest, opts ...call.Option) (*UpdateEndpointCustomTagsResponse, error)
Update the custom tags of an endpoint.
func (*Client) UpsertDataVectorIndex ¶
func (c *Client) UpsertDataVectorIndex(ctx context.Context, req UpsertDataVectorIndexRequest, opts ...call.Option) (*UpsertDataVectorIndexResponse, error)
Handles the upserting of data into a specified vector index.
type ColumnInfo ¶
type CreateEndpointRequest ¶
type CreateEndpointRequest struct {
// Name of the AI Search endpoint
Name *string
// Type of endpoint
EndpointType EndpointType
// The budget policy id to be applied
BudgetPolicyId *string
// The usage policy id to be applied once we've migrated to usage policies
UsagePolicyId *string
// Target QPS for the endpoint. Mutually exclusive with num_replicas. The actual
// replica count is calculated at index creation/sync time based on this value.
// Best-effort target; the system does not guarantee this QPS will be achieved.
TargetQps *int64
}
type CreateEndpointWaiter ¶
type CreateEndpointWaiter struct {
// contains filtered or unexported fields
}
CreateEndpointWaiter tracks the state of the operation started by CreateEndpoint.
func (*CreateEndpointWaiter) Done ¶
Done polls once and reports whether the operation has reached a terminal state.
func (*CreateEndpointWaiter) GetName ¶
func (w *CreateEndpointWaiter) GetName() string
GetName returns the Name value used to identify the operation.
type CreateVectorIndexRequest ¶
type CreateVectorIndexRequest struct {
// Name of the index
Name *string
// Name of the endpoint to be used for serving the index
EndpointName *string
// Primary key of the index
PrimaryKey *string
IndexType VectorIndexType
IndexSpec isCreateVectorIndexRequest_IndexSpec
// The subtype of the index. Use `HYBRID` or `FULL_TEXT`. `VECTOR` is not
// supported.
IndexSubtype IndexSubtype
}
type CreateVectorIndexRequest_IndexSpec_DeltaSyncIndexSpec ¶
type CreateVectorIndexRequest_IndexSpec_DeltaSyncIndexSpec struct {
DeltaSyncIndexSpec DeltaSyncVectorIndexSpecRequest
}
CreateVectorIndexRequest_IndexSpec_DeltaSyncIndexSpec selects DeltaSyncIndexSpec for CreateVectorIndexRequest.IndexSpec. Specification for Delta Sync Index. Required if `index_type` is `DELTA_SYNC`.
type CreateVectorIndexRequest_IndexSpec_DirectAccessIndexSpec ¶
type CreateVectorIndexRequest_IndexSpec_DirectAccessIndexSpec struct {
DirectAccessIndexSpec DirectAccessVectorIndexSpec
}
CreateVectorIndexRequest_IndexSpec_DirectAccessIndexSpec selects DirectAccessIndexSpec for CreateVectorIndexRequest.IndexSpec. Specification for Direct Vector Access Index. Required if `index_type` is `DIRECT_ACCESS`.
type DeleteDataVectorIndexRequest ¶
type DeleteDataVectorIndexRequest struct {
// Name of the vector index where data is to be deleted. Must be a Direct Vector
// Access Index.
Name *string
// List of primary keys for the data to be deleted.
PrimaryKeys []string
}
Request payload for deleting data from a vector index..
type DeleteDataVectorIndexResponse ¶
type DeleteDataVectorIndexResponse struct {
// Status of the delete operation.
Status UpsertDeleteDataStatus
// Result of the upsert or delete operation.
Result *UpsertDeleteDataResult
}
type DeleteEndpointRequest ¶
type DeleteEndpointRequest struct {
// Name of the AI Search endpoint
Name *string
}
type DeleteEndpointResponse ¶
type DeleteEndpointResponse struct {
}
type DeleteVectorIndexRequest ¶
type DeleteVectorIndexRequest struct {
// Name of the index
Name *string
}
type DeleteVectorIndexResponse ¶
type DeleteVectorIndexResponse struct {
}
type DeltaSyncVectorIndexSpec ¶
type DeltaSyncVectorIndexSpec struct {
// The name of the source table.
SourceTable *string
// The columns that contain the embedding source.
EmbeddingSourceColumns []EmbeddingSourceColumn
// The columns that contain the embedding vectors.
EmbeddingVectorColumns []EmbeddingVectorColumn
// Pipeline execution mode. - `TRIGGERED`: If the pipeline uses the triggered
// execution mode, the system stops processing after successfully refreshing the
// source table in the pipeline once, ensuring the table is updated based on the
// data available when the update started. - `CONTINUOUS`: If the pipeline uses
// continuous execution, the pipeline processes new data as it arrives in the
// source table to keep vector index fresh.
PipelineType PipelineType
// The ID of the pipeline that is used to sync the index.
PipelineId *string
// [Optional] Name of the Delta table to sync the vector index contents and
// computed embeddings to.
EmbeddingWritebackTable *string
// [Optional] Select the columns to sync with the vector index. If you leave
// this field blank, all columns from the source table are synced with the
// index. The primary key column and embedding source column or embedding vector
// column are always synced.
ColumnsToSync []string
// [Optional] Alias for columns_to_sync. Select the columns to include in the
// vector index. If you leave this field blank, all columns from the source
// table are included. The primary key column and embedding source column or
// embedding vector column are always included. Only one of columns_to_sync or
// columns_to_index may be specified.
ColumnsToIndex []string
}
type DeltaSyncVectorIndexSpecRequest ¶
type DeltaSyncVectorIndexSpecRequest struct {
// The name of the source table.
SourceTable *string
// The columns that contain the embedding source.
EmbeddingSourceColumns []EmbeddingSourceColumn
// The columns that contain the embedding vectors.
EmbeddingVectorColumns []EmbeddingVectorColumn
// Pipeline execution mode. - `TRIGGERED`: If the pipeline uses the triggered
// execution mode, the system stops processing after successfully refreshing the
// source table in the pipeline once, ensuring the table is updated based on the
// data available when the update started. - `CONTINUOUS`: If the pipeline uses
// continuous execution, the pipeline processes new data as it arrives in the
// source table to keep vector index fresh.
PipelineType PipelineType
// The ID of the pipeline that is used to sync the index.
PipelineId *string
// [Optional] Name of the Delta table to sync the vector index contents and
// computed embeddings to.
EmbeddingWritebackTable *string
// [Optional] Select the columns to sync with the vector index. If you leave
// this field blank, all columns from the source table are synced with the
// index. The primary key column and embedding source column or embedding vector
// column are always synced.
ColumnsToSync []string
// [Optional] Alias for columns_to_sync. Select the columns to include in the
// vector index. If you leave this field blank, all columns from the source
// table are included. The primary key column and embedding source column or
// embedding vector column are always included. Only one of columns_to_sync or
// columns_to_index may be specified.
ColumnsToIndex []string
}
type DirectAccessVectorIndexSpec ¶
type DirectAccessVectorIndexSpec struct {
// The columns that contain the embedding vectors. The format should be
// array[double].
EmbeddingVectorColumns []EmbeddingVectorColumn
// The schema of the index in JSON format. Supported types are `integer`,
// `long`, `float`, `double`, `boolean`, `string`, `date`, `timestamp`.
// Supported types for vector column: `array<float>`, `array<double>`,`.
SchemaJson *string
// The columns that contain the embedding source. The format should be
// array[double].
EmbeddingSourceColumns []EmbeddingSourceColumn
}
type EmbeddingSourceColumn ¶
type EmbeddingSourceColumn struct {
// Name of the column
Name *string
// TODO: clean up ai gateway related code. It's deprecated on ModelServing side.
EmbeddingConfig isEmbeddingSourceColumn_EmbeddingConfig
// Name of the embedding model endpoint which, if specified, is used for
// querying (not ingestion).
ModelEndpointNameForQuery *string
}
type EmbeddingSourceColumn_EmbeddingConfig_EmbeddingModelEndpointName ¶
type EmbeddingSourceColumn_EmbeddingConfig_EmbeddingModelEndpointName struct {
EmbeddingModelEndpointName string
}
EmbeddingSourceColumn_EmbeddingConfig_EmbeddingModelEndpointName selects EmbeddingModelEndpointName for EmbeddingSourceColumn.EmbeddingConfig. Name of the embedding model endpoint, used by default for both ingestion and querying.
type EmbeddingVectorColumn ¶
type Endpoint ¶
type Endpoint struct {
// Name of the AI Search endpoint
Name *string
// Creator of the endpoint
Creator *string
// Timestamp of endpoint creation
CreationTimestamp *int64
// Timestamp of last update to the endpoint
LastUpdatedTimestamp *int64
// Type of endpoint
EndpointType EndpointType
// User who last updated the endpoint
LastUpdatedUser *string
// Unique identifier of the endpoint
Id *string
// Current status of the endpoint
EndpointStatus *EndpointStatus
// Number of indexes on the endpoint
NumIndexes *int
// The user-selected budget policy id for the endpoint.
BudgetPolicyId *string
// The budget policy id applied to the endpoint
EffectiveBudgetPolicyId *string
// The custom tags assigned to the endpoint
CustomTags []CustomTag
// Scaling information for the endpoint
ScalingInfo *EndpointScalingInfo
}
type EndpointScalingInfo ¶
type EndpointScalingInfo struct {
// The current state of the scaling change request.
State ScalingChangeState
// The requested QPS target for the endpoint. Best-effort; the system does not
// guarantee this QPS will be achieved.
RequestedTargetQps *int64
}
type EndpointStatus ¶
type EndpointStatus struct {
// Current state of the endpoint
State EndpointStatus_State
// Additional status message
Message *string
}
Status information of an endpoint.
type EndpointStatus_State ¶
type EndpointStatus_State string
Current state of the endpoint
const ( EndpointStatus_State_Unspecified EndpointStatus_State = "" EndpointStatus_State_Online EndpointStatus_State = "ONLINE" EndpointStatus_State_Offline EndpointStatus_State = "OFFLINE" // After the endpoint is ready, it can be in one of the following states: - // RED_STATE: The endpoint is unhealthy and needs to be investigated. - // YELLOW_STATE: The endpoint is healthy but needs to be monitored. - ONLINE: // The endpoint is healthy and ready to serve traffic. EndpointStatus_State_RedState EndpointStatus_State = "RED_STATE" EndpointStatus_State_YellowState EndpointStatus_State = "YELLOW_STATE" // The endpoint is being deleted or has been deleted. Associated resources are // being cleaned up; once cleanup completes the endpoint will no longer be // retrievable. EndpointStatus_State_Deleted EndpointStatus_State = "DELETED" )
type EndpointType ¶
type EndpointType string
Type of endpoint.
const ( EndpointType_Unspecified EndpointType = "" EndpointType_StorageOptimized EndpointType = "STORAGE_OPTIMIZED" EndpointType_Standard EndpointType = "STANDARD" )
type FacetResultData ¶
type FacetResultData struct {
// Number of facet rows returned.
FacetRowCount *int
// Facet rows. Each row is `[facet_column_name, value_or_range, count]`.
FacetArray [][]json.RawMessage
}
Facet aggregation rows returned by a query..
type GetEndpointRequest ¶
type GetEndpointRequest struct {
// Name of the endpoint
Name *string
}
type GetVectorIndexRequest ¶
type GetVectorIndexRequest struct {
// Name of the index
Name *string
// 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
}
type IndexSubtype ¶
type IndexSubtype string
The subtype of the AI Search index, determining the indexing and retrieval strategy. - `VECTOR`: Not supported. Use `HYBRID` instead. - `FULL_TEXT`: An index that uses full-text search without vector embeddings. - `HYBRID`: An index that uses vector embeddings for similarity search and hybrid search.
const ( IndexSubtype_Unspecified IndexSubtype = "" IndexSubtype_FullText IndexSubtype = "FULL_TEXT" IndexSubtype_Hybrid IndexSubtype = "HYBRID" )
type ListEndpointResponse ¶
type ListEndpointsRequest ¶
type ListEndpointsRequest struct {
// Token for pagination
PageToken *string
}
type ListValue ¶
type ListValue struct {
// Repeated field of dynamically typed values.
Values []Value
}
type ListVectorIndexRequest ¶
type ListVectorIndexResponse ¶
type ListVectorIndexResponse struct {
VectorIndexes []MiniVectorIndex
// A token that can be used to get the next page of results. If not present,
// there are no more results to show.
NextPageToken *string
}
type MapStringValueEntry ¶
type MapStringValueEntry struct {
// Column name.
Key *string
// Column value, nullable.
Value *Value
}
Key-value pair..
type Metric ¶
type Metric struct {
// Metric name
Name *string
// Metric labels
Labels []MetricLabel
// Percentile for the metric
Percentile *float64
}
Metric specification.
type MetricLabel ¶
Label for a metric.
type MetricValue ¶
type MetricValue struct {
// Timestamp of the metric value (milliseconds since epoch)
Timestamp *int64
// Metric value
Value *float64
}
Single metric value at a specific timestamp.
type MetricValues ¶
type MetricValues struct {
// Metric specification
Metric *Metric
// Time series of metric values
Values []MetricValue
}
Collection of metric values for a specific metric.
type MiniVectorIndex ¶
type MiniVectorIndex struct {
// Name of the index
Name *string
// Name of the endpoint associated with the index
EndpointName *string
// Primary key of the index
PrimaryKey *string
IndexType VectorIndexType
IndexSpec isMiniVectorIndex_IndexSpec
Status *VectorIndexStatus
// The user who created the index.
Creator *string
// The subtype of the index.
IndexSubtype IndexSubtype
// ID of the endpoint associated with the index.
EndpointId *string
}
type MiniVectorIndex_IndexSpec_DeltaSyncIndexSpec ¶
type MiniVectorIndex_IndexSpec_DeltaSyncIndexSpec struct {
DeltaSyncIndexSpec DeltaSyncVectorIndexSpec
}
MiniVectorIndex_IndexSpec_DeltaSyncIndexSpec selects DeltaSyncIndexSpec for MiniVectorIndex.IndexSpec.
type MiniVectorIndex_IndexSpec_DirectAccessIndexSpec ¶
type MiniVectorIndex_IndexSpec_DirectAccessIndexSpec struct {
DirectAccessIndexSpec DirectAccessVectorIndexSpec
}
MiniVectorIndex_IndexSpec_DirectAccessIndexSpec selects DirectAccessIndexSpec for MiniVectorIndex.IndexSpec.
type PatchEndpointRequest ¶
type PipelineType ¶
type PipelineType string
Pipeline execution mode. - `TRIGGERED`: If the pipeline uses the triggered execution mode, the system stops processing after successfully refreshing the source table in the pipeline once, ensuring the table is updated based on the data available when the update started. - `CONTINUOUS`: If the pipeline uses continuous execution, the pipeline processes new data as it arrives in the source table to keep vector index fresh.
const ( PipelineType_Unspecified PipelineType = "" PipelineType_Continuous PipelineType = "CONTINUOUS" )
type QueryVectorIndexNextPageRequest ¶
type QueryVectorIndexNextPageRequest struct {
// Name of the vector index to query.
Name *string
// Name of the endpoint.
EndpointName *string
// Page token returned from previous `QueryVectorIndex` or
// `QueryVectorIndexNextPage` API.
PageToken *string
}
Request payload for getting next page of results..
type QueryVectorIndexRequest ¶
type QueryVectorIndexRequest struct {
// Name of the vector index to query.
Name *string
// Number of results to return. Defaults to 10.
NumResults *int
// List of column names to include in the response.
Columns []string
// JSON string representing query filters.
//
// Example filters:
//
// - `{"id <": 5}`: Filter for id less than 5. - `{"id >": 5}`: Filter for id
// greater than 5. - `{"id <=": 5}`: Filter for id less than equal to 5. - `{"id
// >=": 5}`: Filter for id greater than equal to 5. - `{"id": 5}`: Filter for id
// equal to 5.
FiltersJson *string
// Query vector. Required for Direct Vector Access Index and Delta Sync Index
// using self-managed vectors.
QueryVector []float32
// Query text. Required for Delta Sync Index using model endpoint.
QueryText *string
// Threshold for the approximate nearest neighbor search. Defaults to 0.0.
ScoreThreshold *float32
// The query type to use. Choices are `ANN` and `HYBRID` and `FULL_TEXT`.
// Defaults to `ANN`.
QueryType *string
// Column names used to retrieve data to send to the reranker.
ColumnsToRerank []string
// If set, the top 50 results are reranked with the Databricks Reranker model
// before returning the `num_results` results to the user. The setting
// `columns_to_rerank` selects which columns are used for reranking. For each
// datapoint, the columns selected are concatenated before being sent to the
// reranking model. See
// https://docs.databricks.com/aws/en/vector-search/query-vector-search#rerank
// for more information.
Reranker *RerankerConfig
// Text columns to search for `query_text`. When empty, all text columns are
// searched.
QueryColumns []string
// Sort results by column values instead of the default relevance ordering. Each
// clause has the form `"<column> ASC"` or `"<column> DESC"`, for example
// `["rating DESC", "price ASC"]`.
SortColumns []string
// Facets to compute over the matched results. Each entry has one of these
// forms: `"<column>"` - top 10 distinct values by count `"<column> TOP <n>"` -
// top n distinct values, where n > 0 `"<column> BUCKETS [[from,to],...]"` -
// inclusive numeric ranges `TOP` and `BUCKETS` are case-insensitive. A column
// may appear at most once.
Facets []string
}
type QueryVectorIndexResponse ¶
type QueryVectorIndexResponse struct {
// Metadata about the result set.
Manifest *ResultManifest
// Data returned in the query result.
Result *ResultData
// [Optional] Token that can be used in `QueryVectorIndexNextPage` API to get
// next page of results. If more than 1000 results satisfy the query, they are
// returned in groups of 1000. Empty value means no more results. The maximum
// number of results that can be returned is 10,000.
NextPageToken *string
// Facet aggregation rows returned by a query.
FacetResult *FacetResultData
}
type RerankerConfig ¶
type RerankerConfig struct {
// Reranker identifier: - When model_type=BASE/UNSPECIFIED: must be
// "databricks_reranker". - When model_type=FINETUNED: the Model Serving
// endpoint name hosting a finetuned reranker.
Model *string
// Parameters that control how the reranker processes the query results.
Parameters *RerankerConfig_RerankerParameters
}
type RerankerConfig_RerankerParameters ¶
type RerankerConfig_RerankerParameters struct {
ColumnsToRerank []string
}
type ResultData ¶
type ResultData struct {
// Number of rows in the result set.
RowCount *int
// Data rows returned in the query.
DataArray [][]json.RawMessage
}
Data returned in the query result..
type ResultManifest ¶
type ResultManifest struct {
// Number of columns in the result set.
ColumnCount *int
// Information about each column in the result set.
Columns []ColumnInfo
// Number of columns in `facet_result`.
FacetColumnCount *int
// Information about each column in `facet_result`.
FacetColumns []ColumnInfo
}
Metadata about the result set..
type RetrieveUserVisibleMetricsRequest ¶
type RetrieveUserVisibleMetricsRequest struct {
// AI Search endpoint name
Name *string
// Start time for metrics query
StartTime *types.Time
// End time for metrics query
EndTime *types.Time
// Granularity in seconds
GranularityInSeconds *int
// List of metrics to retrieve
Metrics []Metric
// Token for pagination
PageToken *string
}
Request to retrieve user-visible metrics.
type RetrieveUserVisibleMetricsResponse ¶
type RetrieveUserVisibleMetricsResponse struct {
// Collection of metric values
MetricValues []MetricValues
// A token that can be used to get the next page of results. If not present,
// there are no more results to show.
NextPageToken *string
}
Response containing user-visible metrics.
type ScalingChangeState ¶
type ScalingChangeState string
const ( ScalingChangeState_Unspecified ScalingChangeState = "" ScalingChangeState_ScalingChangeApplied ScalingChangeState = "SCALING_CHANGE_APPLIED" ScalingChangeState_ScalingChangeInProgress ScalingChangeState = "SCALING_CHANGE_IN_PROGRESS" )
type ScanVectorIndexRequest ¶
type ScanVectorIndexResponse ¶
type ScanVectorIndexResponse struct {
// List of data entries
Data []Struct
// Primary key of the last entry.
LastPrimaryKey *string
}
Response to a scan vector index request..
type Struct ¶
type Struct struct {
// Data entry, corresponding to a row in a vector index.
Fields []MapStringValueEntry
}
type SyncVectorIndexRequest ¶
type SyncVectorIndexRequest struct {
// Name of the vector index to synchronize. Must be a Delta Sync Index.
Name *string
}
type SyncVectorIndexResponse ¶
type SyncVectorIndexResponse struct {
}
type UpsertDataVectorIndexResponse ¶
type UpsertDataVectorIndexResponse struct {
// Status of the upsert operation.
Status UpsertDeleteDataStatus
// Result of the upsert or delete operation.
Result *UpsertDeleteDataResult
}
type UpsertDeleteDataResult ¶
type UpsertDeleteDataStatus ¶
type UpsertDeleteDataStatus string
const ( UpsertDeleteDataStatus_Unspecified UpsertDeleteDataStatus = "" UpsertDeleteDataStatus_PartialSuccess UpsertDeleteDataStatus = "PARTIAL_SUCCESS" UpsertDeleteDataStatus_Failure UpsertDeleteDataStatus = "FAILURE" )
type Value_Kind_BoolValue ¶
type Value_Kind_BoolValue struct {
BoolValue bool
}
Value_Kind_BoolValue selects BoolValue for Value.Kind.
type Value_Kind_ListValue ¶
type Value_Kind_ListValue struct {
ListValue ListValue
}
Value_Kind_ListValue selects ListValue for Value.Kind.
type Value_Kind_NumberValue ¶
type Value_Kind_NumberValue struct {
NumberValue float64
}
Value_Kind_NumberValue selects NumberValue for Value.Kind.
type Value_Kind_StringValue ¶
type Value_Kind_StringValue struct {
StringValue string
}
Value_Kind_StringValue selects StringValue for Value.Kind.
type Value_Kind_StructValue ¶
type Value_Kind_StructValue struct {
StructValue Struct
}
Value_Kind_StructValue selects StructValue for Value.Kind.
type VectorIndex ¶
type VectorIndex struct {
// Name of the index
Name *string
// Name of the endpoint associated with the index
EndpointName *string
// Primary key of the index
PrimaryKey *string
IndexType VectorIndexType
IndexSpec isVectorIndex_IndexSpec
Status *VectorIndexStatus
// The user who created the index.
Creator *string
// The subtype of the index.
IndexSubtype IndexSubtype
// ID of the endpoint associated with the index.
EndpointId *string
}
type VectorIndexStatus ¶
type VectorIndexType ¶
type VectorIndexType string
There are 2 types of AI Search indexes: - `DELTA_SYNC`: An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data in the Delta Table changes. - `DIRECT_ACCESS`: An index that supports direct read and write of vectors and metadata through our REST and SDK APIs. With this model, the user manages index updates.
const ( VectorIndexType_Unspecified VectorIndexType = "" VectorIndexType_DirectAccess VectorIndexType = "DIRECT_ACCESS" )
type VectorIndex_IndexSpec_DeltaSyncIndexSpec ¶
type VectorIndex_IndexSpec_DeltaSyncIndexSpec struct {
DeltaSyncIndexSpec DeltaSyncVectorIndexSpec
}
VectorIndex_IndexSpec_DeltaSyncIndexSpec selects DeltaSyncIndexSpec for VectorIndex.IndexSpec.
type VectorIndex_IndexSpec_DirectAccessIndexSpec ¶
type VectorIndex_IndexSpec_DirectAccessIndexSpec struct {
DirectAccessIndexSpec DirectAccessVectorIndexSpec
}
VectorIndex_IndexSpec_DirectAccessIndexSpec selects DirectAccessIndexSpec for VectorIndex.IndexSpec.