Documentation ¶
Index ¶
- Constants
- func GetGenericAdditionalProperty(name, className string) *modulecapabilities.AdditionalProperty
- func GetGenericArgument(name, className string, argumentType ArgumentType, ...) *graphql.ArgumentConfig
- func GetGenericGenerateProperty(className string, ...) *modulecapabilities.AdditionalProperty
- 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 ¶
View Source
const AdditionalPropertyGenerate = additional.PropertyGenerate
Variables ¶
This section is empty.
Functions ¶
func GetGenericAdditionalProperty ¶
func GetGenericAdditionalProperty(name, className string) *modulecapabilities.AdditionalProperty
func GetGenericArgument ¶
func GetGenericArgument(name, className string, argumentType ArgumentType, nearTextTransformer modulecapabilities.TextTransform, ) *graphql.ArgumentConfig
func GetGenericGenerateProperty ¶
func GetGenericGenerateProperty( className string, additionalGenerativeParameters map[string]modulecapabilities.GenerativeProperty, defaultProviderName string, logger logrus.FieldLogger, ) *modulecapabilities.AdditionalProperty
func GetRateLimitFromContext ¶
func GetTotalTokens ¶
Types ¶
type RateLimits ¶
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 ¶
func (rl *RateLimits) CanSendFullBatch(numRequests int, batchTokens int) bool
func (*RateLimits) CheckForReset ¶
func (rl *RateLimits) CheckForReset()
func (*RateLimits) IsInitialized ¶
func (rl *RateLimits) IsInitialized() bool
func (*RateLimits) ResetAfterRequestFunction ¶
func (rl *RateLimits) ResetAfterRequestFunction(tokensUsed int)
func (*RateLimits) UpdateWithRateLimit ¶
func (rl *RateLimits) UpdateWithRateLimit(other *RateLimits)
type VectorizationCLIPResult ¶
Click to show internal directories.
Click to hide internal directories.