Documentation
¶
Overview ¶
package onyx exposes the public SDK surface for the Go client. It re-exports the stable contract types and functions while wiring the runtime implementation under the hood.
Index ¶
- Constants
- func Avg(expr string) string
- func ClearConfigCache()
- func Count(expr string) string
- func Format(expr, pattern string) string
- func ListInto(ctx context.Context, q Query, dest any) error
- func Lower(expr string) string
- func Max(expr string) string
- func Median(expr string) string
- func Min(expr string) string
- func Percentile(expr string, percentile float64) string
- func Replace(expr, pattern, replacement string) string
- func Std(expr string) string
- func Substring(expr string, from, length int) string
- func Sum(expr string) string
- func Upper(expr string) string
- func Variance(expr string) string
- type AIChatCompletionChoice
- type AIChatCompletionChunk
- type AIChatCompletionChunkChoice
- type AIChatCompletionChunkDelta
- type AIChatCompletionRequest
- type AIChatCompletionResponse
- type AIChatCompletionUsage
- type AIChatMessage
- type AIChatStream
- type AIModel
- type AIModelsResponse
- type AIScriptApprovalRequest
- type AIScriptApprovalResponse
- type AITool
- type AIToolCall
- type AIToolCallFunction
- type AIToolFunction
- type ApproximateIndexCandidateQuery
- type CascadeBuilder
- type CascadeClient
- type CascadeSpec
- type Client
- type Condition
- func ApproximateCandidates(field string, valueOrValues any, maxCandidates ...int) Condition
- func ApproximateSearch(searchQuery VectorSearchQuery) Condition
- func Between(field string, from, to any) Condition
- func Contains(field string, value any) Condition
- func Eq(field string, value any) Condition
- func Gt(field string, value any) Condition
- func Gte(field string, value any) Condition
- func HNSWCandidates(searchQuery HNSWSearchQuery) Condition
- func In(field string, values []any) Condition
- func IsNull(field string) Condition
- func Like(field string, pattern any) Condition
- func Lt(field string, value any) Condition
- func Lte(field string, value any) Condition
- func Neq(field string, value any) Condition
- func NotIn(field string, values []any) Condition
- func NotNull(field string) Condition
- func NotWithin(field string, query Query) Condition
- func Search(queryText string, minScore ...float64) Condition
- func SearchWithOptions(queryText string, options SearchOptions) Condition
- func StartsWith(field string, value any) Condition
- func VectorSearch(searchQuery VectorSearchQuery) Condition
- func Within(field string, query Query) Condition
- type Config
- type Document
- type DocumentClient
- type Error
- type Field
- type HNSWSearchQuery
- type HNSWSearchQueryInput
- type Index
- type IndexType
- type Iterator
- type ListResult
- type OnyxDocument
- type OnyxDocumentsClient
- type OnyxSecret
- type OnyxSecretsClient
- type PageResult
- type Query
- type QueryResults
- type Resolver
- type Schema
- type SearchMatch
- type SearchMode
- type SearchOptions
- type SearchSupport
- type Secret
- type SecretClient
- type SemanticVectorSignature
- type Sort
- type Table
- type TableType
- type VectorSearchQuery
- type VectorSearchQueryInput
Constants ¶
View Source
const ( WireFormatJSON = contract.WireFormatJSON WireFormatMessagePack = contract.WireFormatMessagePack HNSWQueryFormatVersion = contract.HNSWQueryFormatVersion DefaultHNSWCandidates = contract.DefaultHNSWCandidates DefaultHNSWEFSearch = contract.DefaultHNSWEFSearch MaxHNSWCandidates = contract.MaxHNSWCandidates MaxHNSWEFSearch = contract.MaxHNSWEFSearch MaxHNSWVectorDimension = contract.MaxHNSWVectorDimension DefaultApproximateIndexCandidates = contract.DefaultApproximateIndexCandidates MaxApproximateIndexCandidates = contract.MaxApproximateIndexCandidates MaxApproximateIndexRouteValues = contract.MaxApproximateIndexRouteValues DefaultVectorSearchCandidates = contract.DefaultVectorSearchCandidates MaxVectorSearchCandidates = contract.MaxVectorSearchCandidates IndexTypeDefault = contract.IndexTypeDefault IndexTypeVector = contract.IndexTypeVector TableTypeDefault = contract.TableTypeDefault TableTypeSearchable = contract.TableTypeSearchable SearchSupportLexical = contract.SearchSupportLexical SearchSupportSemantic = contract.SearchSupportSemantic SearchSupportBoth = contract.SearchSupportBoth SearchModeLexical = contract.SearchModeLexical SearchModeSemantic = contract.SearchModeSemantic SearchModeHybrid = contract.SearchModeHybrid SearchMatchAny = contract.SearchMatchAny SearchMatchAll = contract.SearchMatchAll )
Variables ¶
This section is empty.
Functions ¶
func ClearConfigCache ¶
func ClearConfigCache()
ClearConfigCache clears any cached configuration state.
func ListInto ¶
ListInto executes the query and decodes the results into dest. Dest should be a pointer to a slice or struct; Decode uses JSON tags on generated models.
func Percentile ¶ added in v0.3.0
Types ¶
type AIChatCompletionChoice ¶ added in v0.2.0
type AIChatCompletionChoice = contract.AIChatCompletionChoice
type AIChatCompletionChunk ¶ added in v0.2.0
type AIChatCompletionChunk = contract.AIChatCompletionChunk
type AIChatCompletionChunkChoice ¶ added in v0.2.0
type AIChatCompletionChunkChoice = contract.AIChatCompletionChunkChoice
type AIChatCompletionChunkDelta ¶ added in v0.2.0
type AIChatCompletionChunkDelta = contract.AIChatCompletionChunkDelta
type AIChatCompletionRequest ¶ added in v0.2.0
type AIChatCompletionRequest = contract.AIChatCompletionRequest
type AIChatCompletionResponse ¶ added in v0.2.0
type AIChatCompletionResponse = contract.AIChatCompletionResponse
type AIChatCompletionUsage ¶ added in v0.2.0
type AIChatCompletionUsage = contract.AIChatCompletionUsage
type AIChatMessage ¶ added in v0.2.0
type AIChatMessage = contract.AIChatMessage
type AIChatStream ¶ added in v0.2.0
type AIChatStream = contract.AIChatStream
type AIModelsResponse ¶ added in v0.2.0
type AIModelsResponse = contract.AIModelsResponse
type AIScriptApprovalRequest ¶ added in v0.2.0
type AIScriptApprovalRequest = contract.AIScriptApprovalRequest
type AIScriptApprovalResponse ¶ added in v0.2.0
type AIScriptApprovalResponse = contract.AIScriptApprovalResponse
type AIToolCall ¶ added in v0.2.0
type AIToolCall = contract.AIToolCall
type AIToolCallFunction ¶ added in v0.2.0
type AIToolCallFunction = contract.AIToolCallFunction
type AIToolFunction ¶ added in v0.2.0
type AIToolFunction = contract.AIToolFunction
type ApproximateIndexCandidateQuery ¶ added in v0.4.0
type ApproximateIndexCandidateQuery = contract.ApproximateIndexCandidateQuery
func NewApproximateIndexCandidateQuery ¶ added in v0.4.0
func NewApproximateIndexCandidateQuery( valueOrValues any, maxCandidates ...int, ) (ApproximateIndexCandidateQuery, error)
type CascadeBuilder ¶
type CascadeBuilder = contract.CascadeBuilder
func NewCascadeBuilder ¶
func NewCascadeBuilder() CascadeBuilder
type CascadeClient ¶
type CascadeClient = contract.CascadeClient
type CascadeSpec ¶
type CascadeSpec = contract.CascadeSpec
func Cascade ¶
func Cascade(spec string) CascadeSpec
type Condition ¶
func ApproximateCandidates ¶ added in v0.4.0
func ApproximateSearch ¶ added in v0.4.0
func ApproximateSearch(searchQuery VectorSearchQuery) Condition
func HNSWCandidates ¶ added in v0.4.0
func HNSWCandidates(searchQuery HNSWSearchQuery) Condition
func SearchWithOptions ¶ added in v0.5.0
func SearchWithOptions(queryText string, options SearchOptions) Condition
func StartsWith ¶
func VectorSearch ¶ added in v0.4.0
func VectorSearch(searchQuery VectorSearchQuery) Condition
type DocumentClient ¶
type DocumentClient = contract.DocumentClient
type HNSWSearchQuery ¶ added in v0.4.0
type HNSWSearchQuery = contract.HNSWSearchQuery
func NewHNSWSearchQuery ¶ added in v0.4.0
func NewHNSWSearchQuery(input HNSWSearchQueryInput) (HNSWSearchQuery, error)
type HNSWSearchQueryInput ¶ added in v0.4.0
type HNSWSearchQueryInput = contract.HNSWSearchQueryInput
type ListResult ¶
type ListResult struct {
// contains filtered or unexported fields
}
ListResult is a fluent wrapper around query results for decoding.
func List ¶
func List(ctx context.Context, q Query) ListResult
List executes the query and returns a fluent result that can be decoded.
func (ListResult) Decode ¶
func (lr ListResult) Decode(dest any) error
Decode populates dest (pointer to slice/struct) with the query results.
type OnyxDocument ¶
type OnyxDocument = contract.OnyxDocument
type OnyxDocumentsClient ¶
type OnyxDocumentsClient = contract.OnyxDocumentsClient
type OnyxSecret ¶
type OnyxSecret = contract.OnyxSecret
type OnyxSecretsClient ¶
type OnyxSecretsClient = contract.OnyxSecretsClient
type PageResult ¶
type PageResult = contract.PageResult
type QueryResults ¶
type QueryResults = contract.QueryResults
type SearchMatch ¶ added in v0.5.0
type SearchMatch = contract.SearchMatch
type SearchMode ¶ added in v0.5.0
type SearchMode = contract.SearchMode
type SearchOptions ¶ added in v0.5.0
type SearchOptions = contract.SearchOptions
type SearchSupport ¶ added in v0.6.0
type SearchSupport = contract.SearchSupport
type SecretClient ¶
type SecretClient = contract.SecretClient
type SemanticVectorSignature ¶ added in v0.4.0
type SemanticVectorSignature = contract.SemanticVectorSignature
func NewSemanticVectorSignature ¶ added in v0.4.0
type VectorSearchQuery ¶ added in v0.4.0
type VectorSearchQuery = contract.VectorSearchQuery
func NewVectorSearchQuery ¶ added in v0.4.0
func NewVectorSearchQuery(input VectorSearchQueryInput) (VectorSearchQuery, error)
type VectorSearchQueryInput ¶ added in v0.4.0
type VectorSearchQueryInput = contract.VectorSearchQueryInput
Click to show internal directories.
Click to hide internal directories.