Documentation
¶
Index ¶
- func GetGenericAdditionalProperty(name, className string) *modulecapabilities.AdditionalProperty
- func GetGenericArgument(name, className string, argumentType ArgumentType, ...) *graphql.ArgumentConfig
- func GetRateLimitFromContext(ctx context.Context, moduleName string, defaultRPM, defaultTPM int) (int, int)
- func GetTotalTokens(usage *Usage) int
- func GetValueFromContext(ctx context.Context, key string) string
- func GetValueFromGRPC(ctx context.Context, key string) []string
- type ArgumentType
- type RateLimits
- type Usage
- type VectorizationCLIPResult
- type VectorizationResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGenericAdditionalProperty ¶ added in v1.24.0
func GetGenericAdditionalProperty(name, className string) *modulecapabilities.AdditionalProperty
func GetGenericArgument ¶ added in v1.24.0
func GetGenericArgument(name, className string, argumentType ArgumentType, nearTextTransformer modulecapabilities.TextTransform, ) *graphql.ArgumentConfig
func GetRateLimitFromContext ¶ added in v1.25.0
func GetTotalTokens ¶ added in v1.25.25
func GetValueFromContext ¶ added in v1.24.16
Types ¶
type ArgumentType ¶ added in v1.24.0
type ArgumentType int
const ( Get ArgumentType = iota Aggregate Explore )
type RateLimits ¶ added in v1.25.0
type RateLimits struct { LastOverwrite time.Time AfterRequestFunction func(limits *RateLimits, tokensUsed int, deductRequest bool) LimitRequests int LimitTokens int RemainingRequests int RemainingTokens int ReservedRequests int ReservedTokens int ResetRequests time.Time ResetTokens time.Time }
func (*RateLimits) CanSendFullBatch ¶ added in v1.25.13
func (rl *RateLimits) CanSendFullBatch(numRequests int, batchTokens int) bool
func (*RateLimits) CheckForReset ¶ added in v1.25.0
func (rl *RateLimits) CheckForReset()
func (*RateLimits) IsInitialized ¶ added in v1.25.0
func (rl *RateLimits) IsInitialized() bool
func (*RateLimits) ResetAfterRequestFunction ¶ added in v1.25.0
func (rl *RateLimits) ResetAfterRequestFunction(tokensUsed int)
func (*RateLimits) UpdateWithRateLimit ¶ added in v1.25.25
func (rl *RateLimits) UpdateWithRateLimit(other *RateLimits)
type VectorizationCLIPResult ¶ added in v1.25.26
Click to show internal directories.
Click to hide internal directories.