type
stringclasses
5 values
name
stringlengths
1
55
qualified_name
stringlengths
5
147
docstring
stringlengths
15
4.52k
filepath
stringclasses
206 values
is_public
bool
2 classes
is_private
bool
2 classes
line_start
int64
0
1.99k
line_end
int64
0
2.01k
annotation
stringclasses
14 values
returns
stringclasses
308 values
value
stringclasses
152 values
parameters
listlengths
0
117
bases
listlengths
0
3
parent_class
stringclasses
376 values
api_element_summary
stringlengths
199
33.8k
class
RateLimitBucket
fenic._inference.rate_limit_strategy.RateLimitBucket
Manages a token bucket for rate limiting.
null
true
false
32
53
null
null
null
null
[]
null
Type: class Member Name: RateLimitBucket Qualified Name: fenic._inference.rate_limit_strategy.RateLimitBucket Docstring: Manages a token bucket for rate limiting. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
method
__init__
fenic._inference.rate_limit_strategy.RateLimitBucket.__init__
null
null
true
false
34
37
null
null
null
[ "self", "max_capacity" ]
null
RateLimitBucket
Type: method Member Name: __init__ Qualified Name: fenic._inference.rate_limit_strategy.RateLimitBucket.__init__ Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "max_capacity"] Returns: none Parent Class: RateLimitBucket
method
_get_available_capacity
fenic._inference.rate_limit_strategy.RateLimitBucket._get_available_capacity
Calculates the available capacity based on the elapsed time and refill rate.
null
false
true
39
48
null
int
null
[ "self", "curr_time" ]
null
RateLimitBucket
Type: method Member Name: _get_available_capacity Qualified Name: fenic._inference.rate_limit_strategy.RateLimitBucket._get_available_capacity Docstring: Calculates the available capacity based on the elapsed time and refill rate. Value: none Annotation: none is Public? : false is Private? : true Parameters: ["self", "...
method
_set_capacity
fenic._inference.rate_limit_strategy.RateLimitBucket._set_capacity
Updates the current capacity and last update time.
null
false
true
50
53
null
null
null
[ "self", "capacity", "curr_time" ]
null
RateLimitBucket
Type: method Member Name: _set_capacity Qualified Name: fenic._inference.rate_limit_strategy.RateLimitBucket._set_capacity Docstring: Updates the current capacity and last update time. Value: none Annotation: none is Public? : false is Private? : true Parameters: ["self", "capacity", "curr_time"] Returns: none Parent C...
class
RateLimitStrategy
fenic._inference.rate_limit_strategy.RateLimitStrategy
Base class for implementing rate limiting strategies for language model requests. This abstract class defines the interface for rate limiting strategies that control both request rate (RPM) and token usage rate (TPM) for language model API calls. Subclasses must implement specific token rate limiting strategies. Attr...
null
true
false
56
122
null
null
null
null
[ "ABC" ]
null
Type: class Member Name: RateLimitStrategy Qualified Name: fenic._inference.rate_limit_strategy.RateLimitStrategy Docstring: Base class for implementing rate limiting strategies for language model requests. This abstract class defines the interface for rate limiting strategies that control both request rate (RPM) and ...
method
__init__
fenic._inference.rate_limit_strategy.RateLimitStrategy.__init__
null
null
true
false
67
72
null
null
null
[ "self", "rpm" ]
null
RateLimitStrategy
Type: method Member Name: __init__ Qualified Name: fenic._inference.rate_limit_strategy.RateLimitStrategy.__init__ Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "rpm"] Returns: none Parent Class: RateLimitStrategy
method
backoff
fenic._inference.rate_limit_strategy.RateLimitStrategy.backoff
Backoff the request/token rate limit bucket.
null
true
false
74
77
null
int
null
[ "self", "curr_time" ]
null
RateLimitStrategy
Type: method Member Name: backoff Qualified Name: fenic._inference.rate_limit_strategy.RateLimitStrategy.backoff Docstring: Backoff the request/token rate limit bucket. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "curr_time"] Returns: int Parent Class: RateLimitStrategy
method
check_and_consume_rate_limit
fenic._inference.rate_limit_strategy.RateLimitStrategy.check_and_consume_rate_limit
Checks if there is enough capacity in both token and request rate limit buckets. If there is sufficient capacity, this method will consume the required tokens and request quota. This is an abstract method that must be implemented by subclasses. Args: token_estimate: A TokenEstimate object containing the estimated...
null
true
false
79
96
null
bool
null
[ "self", "token_estimate" ]
null
RateLimitStrategy
Type: method Member Name: check_and_consume_rate_limit Qualified Name: fenic._inference.rate_limit_strategy.RateLimitStrategy.check_and_consume_rate_limit Docstring: Checks if there is enough capacity in both token and request rate limit buckets. If there is sufficient capacity, this method will consume the required t...
method
context_tokens_per_minute
fenic._inference.rate_limit_strategy.RateLimitStrategy.context_tokens_per_minute
Returns the total token rate limit per minute for this strategy. This is an abstract method that must be implemented by subclasses to specify their token rate limiting behavior. Returns: int: The total number of tokens allowed per minute.
null
true
false
99
109
null
int
null
[ "self" ]
null
RateLimitStrategy
Type: method Member Name: context_tokens_per_minute Qualified Name: fenic._inference.rate_limit_strategy.RateLimitStrategy.context_tokens_per_minute Docstring: Returns the total token rate limit per minute for this strategy. This is an abstract method that must be implemented by subclasses to specify their token rate ...
method
settle
fenic._inference.rate_limit_strategy.RateLimitStrategy.settle
Correct reserved capacity against actual usage after a response. Refunds (reserved - actual) when over-reserved, debits further when under-reserved. Base implementation is a no-op for strategies that do not track tokens (e.g. AdaptiveBackoff). MUST be called on the asyncio event loop thread only (same thread as check_...
null
true
false
112
122
null
None
null
[ "self", "reserved", "actual" ]
null
RateLimitStrategy
Type: method Member Name: settle Qualified Name: fenic._inference.rate_limit_strategy.RateLimitStrategy.settle Docstring: Correct reserved capacity against actual usage after a response. Refunds (reserved - actual) when over-reserved, debits further when under-reserved. Base implementation is a no-op for strategies th...
class
AdaptiveBackoffRateLimitStrategy
fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy
Adaptive RPM limiter with multiplicative backoff and optional additive increase. On backoff, reduces RPM by a multiplier and clears burst capacity. When no provider RPM hint is active and no cooldown is in effect, increases RPM additively after a configurable number of consecutive successful requests, up to a configur...
null
true
false
125
261
null
null
null
null
[ "RateLimitStrategy" ]
null
Type: class Member Name: AdaptiveBackoffRateLimitStrategy Qualified Name: fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy Docstring: Adaptive RPM limiter with multiplicative backoff and optional additive increase. On backoff, reduces RPM by a multiplier and clears burst capacity. When no provider...
method
__init__
fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.__init__
null
null
true
false
144
167
null
null
null
[ "self", "rpm", "min_rpm", "backoff_multiplier", "max_rpm", "additive_increment", "increase_after_successes" ]
null
AdaptiveBackoffRateLimitStrategy
Type: method Member Name: __init__ Qualified Name: fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.__init__ Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "rpm", "min_rpm", "backoff_multiplier", "max_rpm", "additive_increment", "increase_aft...
method
register_rate_limit_hint
fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.register_rate_limit_hint
Register provider-processed hints: rpm limit and absolute retry time. Args: rpm_hint: Max requests per minute allowed by provider (if known) retry_at_epoch_seconds: Unix epoch seconds we should not send before (if known)
null
true
false
169
196
null
None
null
[ "self", "rpm_hint", "retry_at_epoch_seconds" ]
null
AdaptiveBackoffRateLimitStrategy
Type: method Member Name: register_rate_limit_hint Qualified Name: fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.register_rate_limit_hint Docstring: Register provider-processed hints: rpm limit and absolute retry time. Args: rpm_hint: Max requests per minute allowed by provider (if known) ...
method
backoff
fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.backoff
Backoff the request rate limit bucket.
null
true
false
198
214
null
int
null
[ "self", "curr_time" ]
null
AdaptiveBackoffRateLimitStrategy
Type: method Member Name: backoff Qualified Name: fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.backoff Docstring: Backoff the request rate limit bucket. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "curr_time"] Returns: int Parent Class: AdaptiveBackof...
method
check_and_consume_rate_limit
fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.check_and_consume_rate_limit
null
null
true
false
216
228
null
bool
null
[ "self", "token_estimate" ]
null
AdaptiveBackoffRateLimitStrategy
Type: method Member Name: check_and_consume_rate_limit Qualified Name: fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.check_and_consume_rate_limit Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "token_estimate"] Returns: bool Parent Class: ...
method
context_tokens_per_minute
fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.context_tokens_per_minute
null
null
true
false
230
232
null
int
null
[ "self" ]
null
AdaptiveBackoffRateLimitStrategy
Type: method Member Name: context_tokens_per_minute Qualified Name: fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.context_tokens_per_minute Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: int Parent Class: AdaptiveBackoffRateLimitS...
method
__str__
fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.__str__
null
null
true
false
234
235
null
null
null
[ "self" ]
null
AdaptiveBackoffRateLimitStrategy
Type: method Member Name: __str__ Qualified Name: fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy.__str__ Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: none Parent Class: AdaptiveBackoffRateLimitStrategy
method
_record_success_and_maybe_grow
fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy._record_success_and_maybe_grow
null
null
false
true
238
261
null
None
null
[ "self", "now" ]
null
AdaptiveBackoffRateLimitStrategy
Type: method Member Name: _record_success_and_maybe_grow Qualified Name: fenic._inference.rate_limit_strategy.AdaptiveBackoffRateLimitStrategy._record_success_and_maybe_grow Docstring: none Value: none Annotation: none is Public? : false is Private? : true Parameters: ["self", "now"] Returns: None Parent Class: Adaptiv...
class
UnifiedTokenRateLimitStrategy
fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy
Rate limiting strategy that uses a single token bucket for both input and output tokens. This strategy enforces both a request rate limit (RPM) and a unified token rate limit (TPM) where input and output tokens share the same quota. Attributes: tpm: Total tokens per minute limit. Must be greater than 0. unifi...
null
true
false
264
342
null
null
null
null
[ "RateLimitStrategy" ]
null
Type: class Member Name: UnifiedTokenRateLimitStrategy Qualified Name: fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy Docstring: Rate limiting strategy that uses a single token bucket for both input and output tokens. This strategy enforces both a request rate limit (RPM) and a unified token rate l...
method
__init__
fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.__init__
null
null
true
false
274
277
null
null
null
[ "self", "rpm", "tpm" ]
null
UnifiedTokenRateLimitStrategy
Type: method Member Name: __init__ Qualified Name: fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.__init__ Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "rpm", "tpm"] Returns: none Parent Class: UnifiedTokenRateLimitStrategy
method
backoff
fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.backoff
Backoff the request/token rate limit bucket.
null
true
false
279
283
null
int
null
[ "self", "curr_time" ]
null
UnifiedTokenRateLimitStrategy
Type: method Member Name: backoff Qualified Name: fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.backoff Docstring: Backoff the request/token rate limit bucket. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "curr_time"] Returns: int Parent Class: UnifiedToke...
method
check_and_consume_rate_limit
fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.check_and_consume_rate_limit
Checks and consumes rate limits for both requests and total tokens. This implementation uses a single token bucket for both input and output tokens, enforcing the total token limit across all token types. Args: token_estimate: A TokenEstimate object containing the estimated input, output, and to...
null
true
false
285
311
null
bool
null
[ "self", "token_estimate" ]
null
UnifiedTokenRateLimitStrategy
Type: method Member Name: check_and_consume_rate_limit Qualified Name: fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.check_and_consume_rate_limit Docstring: Checks and consumes rate limits for both requests and total tokens. This implementation uses a single token bucket for both input and output ...
method
_check_max_rate_limits
fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy._check_max_rate_limits
Checks if the strategy is configured with enough capacity to handle the request.
null
false
true
313
317
null
null
null
[ "self", "token_estimate" ]
null
UnifiedTokenRateLimitStrategy
Type: method Member Name: _check_max_rate_limits Qualified Name: fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy._check_max_rate_limits Docstring: Checks if the strategy is configured with enough capacity to handle the request. Value: none Annotation: none is Public? : false is Private? : true Parame...
method
settle
fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.settle
null
null
true
false
319
326
null
None
null
[ "self", "reserved", "actual" ]
null
UnifiedTokenRateLimitStrategy
Type: method Member Name: settle Qualified Name: fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.settle Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "reserved", "actual"] Returns: None Parent Class: UnifiedTokenRateLimitStrategy
method
context_tokens_per_minute
fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.context_tokens_per_minute
Returns the total token rate limit per minute. Returns: int: The total number of tokens allowed per minute (tpm).
null
true
false
328
334
null
int
null
[ "self" ]
null
UnifiedTokenRateLimitStrategy
Type: method Member Name: context_tokens_per_minute Qualified Name: fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.context_tokens_per_minute Docstring: Returns the total token rate limit per minute. Returns: int: The total number of tokens allowed per minute (tpm). Value: none Annotation: none ...
method
__str__
fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.__str__
Returns a string representation of the rate limit strategy. Returns: str: A string showing the RPM and TPM limits.
null
true
false
336
342
null
null
null
[ "self" ]
null
UnifiedTokenRateLimitStrategy
Type: method Member Name: __str__ Qualified Name: fenic._inference.rate_limit_strategy.UnifiedTokenRateLimitStrategy.__str__ Docstring: Returns a string representation of the rate limit strategy. Returns: str: A string showing the RPM and TPM limits. Value: none Annotation: none is Public? : true is Private? : fal...
class
SeparatedTokenRateLimitStrategy
fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy
Rate limiting strategy that uses separate token buckets for input and output tokens. This strategy enforces both a request rate limit (RPM) and separate token rate limits for input (input_tpm) and output (output_tpm) tokens. Attributes: input_tpm: Input tokens per minute limit. Must be greater than 0. output_...
null
true
false
345
438
null
null
null
null
[ "RateLimitStrategy" ]
null
Type: class Member Name: SeparatedTokenRateLimitStrategy Qualified Name: fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy Docstring: Rate limiting strategy that uses separate token buckets for input and output tokens. This strategy enforces both a request rate limit (RPM) and separate token rate li...
method
__init__
fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.__init__
null
null
true
false
357
362
null
null
null
[ "self", "rpm", "input_tpm", "output_tpm" ]
null
SeparatedTokenRateLimitStrategy
Type: method Member Name: __init__ Qualified Name: fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.__init__ Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "rpm", "input_tpm", "output_tpm"] Returns: none Parent Class: SeparatedTokenRateLimitSt...
method
backoff
fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.backoff
Backoff the request/token rate limit bucket.
null
true
false
364
369
null
int
null
[ "self", "curr_time" ]
null
SeparatedTokenRateLimitStrategy
Type: method Member Name: backoff Qualified Name: fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.backoff Docstring: Backoff the request/token rate limit bucket. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "curr_time"] Returns: int Parent Class: Separated...
method
check_and_consume_rate_limit
fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.check_and_consume_rate_limit
Checks and consumes rate limits for requests, input tokens, and output tokens. This implementation uses separate token buckets for input and output tokens, enforcing separate limits for each token type. Args: token_estimate: A TokenEstimate object containing the estimated input, output, and tota...
null
true
false
371
400
null
bool
null
[ "self", "token_estimate" ]
null
SeparatedTokenRateLimitStrategy
Type: method Member Name: check_and_consume_rate_limit Qualified Name: fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.check_and_consume_rate_limit Docstring: Checks and consumes rate limits for requests, input tokens, and output tokens. This implementation uses separate token buckets for input an...
method
_check_max_rate_limits
fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy._check_max_rate_limits
Checks if the strategy is configured with enough capacity to handle the request.
null
false
true
402
408
null
null
null
[ "self", "token_estimate" ]
null
SeparatedTokenRateLimitStrategy
Type: method Member Name: _check_max_rate_limits Qualified Name: fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy._check_max_rate_limits Docstring: Checks if the strategy is configured with enough capacity to handle the request. Value: none Annotation: none is Public? : false is Private? : true Para...
method
settle
fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.settle
null
null
true
false
410
422
null
None
null
[ "self", "reserved", "actual" ]
null
SeparatedTokenRateLimitStrategy
Type: method Member Name: settle Qualified Name: fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.settle Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "reserved", "actual"] Returns: None Parent Class: SeparatedTokenRateLimitStrategy
method
context_tokens_per_minute
fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.context_tokens_per_minute
Returns the total token rate limit per minute. Returns: int: The sum of input and output tokens allowed per minute.
null
true
false
424
430
null
int
null
[ "self" ]
null
SeparatedTokenRateLimitStrategy
Type: method Member Name: context_tokens_per_minute Qualified Name: fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.context_tokens_per_minute Docstring: Returns the total token rate limit per minute. Returns: int: The sum of input and output tokens allowed per minute. Value: none Annotation: n...
method
__str__
fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.__str__
Returns a string representation of the rate limit strategy. Returns: str: A string showing the RPM, input TPM, and output TPM limits.
null
true
false
432
438
null
null
null
[ "self" ]
null
SeparatedTokenRateLimitStrategy
Type: method Member Name: __str__ Qualified Name: fenic._inference.rate_limit_strategy.SeparatedTokenRateLimitStrategy.__str__ Docstring: Returns a string representation of the rate limit strategy. Returns: str: A string showing the RPM, input TPM, and output TPM limits. Value: none Annotation: none is Public? : t...
module
profile_hash_mixin
fenic._inference.profile_hash_mixin
Shared profile hashing helper for model clients.
/private/var/folders/w2/dyfkx_354cqghs4b74vb_x380000gn/T/fenic-clone-0.11.0-a2lcuovw/fenic/src/fenic/_inference/profile_hash_mixin.py
true
false
null
null
null
null
null
null
null
null
Type: module Member Name: profile_hash_mixin Qualified Name: fenic._inference.profile_hash_mixin Docstring: Shared profile hashing helper for model clients. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
attribute
logger
fenic._inference.profile_hash_mixin.logger
null
null
true
false
14
14
null
null
logging.getLogger(__name__)
null
null
null
Type: attribute Member Name: logger Qualified Name: fenic._inference.profile_hash_mixin.logger Docstring: none Value: logging.getLogger(__name__) Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
class
ProfileHashMixin
fenic._inference.profile_hash_mixin.ProfileHashMixin
Mixin that provides deterministic hashing of profile configurations.
null
true
false
17
54
null
null
null
null
[ "ABC" ]
null
Type: class Member Name: ProfileHashMixin Qualified Name: fenic._inference.profile_hash_mixin.ProfileHashMixin Docstring: Mixin that provides deterministic hashing of profile configurations. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
method
_resolve_profile_for_hash
fenic._inference.profile_hash_mixin.ProfileHashMixin._resolve_profile_for_hash
Return the provider-specific profile configuration for hashing.
null
false
true
20
24
null
Optional[BaseProfileConfiguration]
null
[ "self", "profile_name" ]
null
ProfileHashMixin
Type: method Member Name: _resolve_profile_for_hash Qualified Name: fenic._inference.profile_hash_mixin.ProfileHashMixin._resolve_profile_for_hash Docstring: Return the provider-specific profile configuration for hashing. Value: none Annotation: none is Public? : false is Private? : true Parameters: ["self", "profile_n...
method
get_profile_hash
fenic._inference.profile_hash_mixin.ProfileHashMixin.get_profile_hash
See ModelClient.get_profile_hash.
null
true
false
26
42
null
Optional[str]
null
[ "self", "profile_name" ]
null
ProfileHashMixin
Type: method Member Name: get_profile_hash Qualified Name: fenic._inference.profile_hash_mixin.ProfileHashMixin.get_profile_hash Docstring: See ModelClient.get_profile_hash. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "profile_name"] Returns: Optional[str] Parent Class: Profi...
method
_serialize_profile
fenic._inference.profile_hash_mixin.ProfileHashMixin._serialize_profile
Serialize profile to a JSON string with stable ordering. Args: profile: The profile to serialize. Returns: A JSON string representing the profile.
null
false
true
44
54
null
str
null
[ "profile" ]
null
ProfileHashMixin
Type: method Member Name: _serialize_profile Qualified Name: fenic._inference.profile_hash_mixin.ProfileHashMixin._serialize_profile Docstring: Serialize profile to a JSON string with stable ordering. Args: profile: The profile to serialize. Returns: A JSON string representing the profile. Value: none Annotat...
module
cohere
fenic._inference.cohere
null
/private/var/folders/w2/dyfkx_354cqghs4b74vb_x380000gn/T/fenic-clone-0.11.0-a2lcuovw/fenic/src/fenic/_inference/cohere/__init__.py
true
false
null
null
null
null
null
null
null
null
Type: module Member Name: cohere Qualified Name: fenic._inference.cohere Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
module
cohere_provider
fenic._inference.cohere.cohere_provider
Cohere model provider implementation.
/private/var/folders/w2/dyfkx_354cqghs4b74vb_x380000gn/T/fenic-clone-0.11.0-a2lcuovw/fenic/src/fenic/_inference/cohere/cohere_provider.py
true
false
null
null
null
null
null
null
null
null
Type: module Member Name: cohere_provider Qualified Name: fenic._inference.cohere.cohere_provider Docstring: Cohere model provider implementation. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
attribute
logger
fenic._inference.cohere.cohere_provider.logger
null
null
true
false
10
10
null
null
logging.getLogger(__name__)
null
null
null
Type: attribute Member Name: logger Qualified Name: fenic._inference.cohere.cohere_provider.logger Docstring: none Value: logging.getLogger(__name__) Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
class
CohereModelProvider
fenic._inference.cohere.cohere_provider.CohereModelProvider
Cohere implementation of ModelProvider.
null
true
false
13
38
null
null
null
null
[ "ModelProviderClass" ]
null
Type: class Member Name: CohereModelProvider Qualified Name: fenic._inference.cohere.cohere_provider.CohereModelProvider Docstring: Cohere implementation of ModelProvider. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
method
create_client
fenic._inference.cohere.cohere_provider.CohereModelProvider.create_client
Create a Cohere client instance.
null
true
false
20
22
null
null
null
[ "self" ]
null
CohereModelProvider
Type: method Member Name: create_client Qualified Name: fenic._inference.cohere.cohere_provider.CohereModelProvider.create_client Docstring: Create a Cohere client instance. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: none Parent Class: CohereModelProvider
method
create_aio_client
fenic._inference.cohere.cohere_provider.CohereModelProvider.create_aio_client
Create a Cohere async client instance.
null
true
false
24
26
null
null
null
[ "self" ]
null
CohereModelProvider
Type: method Member Name: create_aio_client Qualified Name: fenic._inference.cohere.cohere_provider.CohereModelProvider.create_aio_client Docstring: Create a Cohere async client instance. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: none Parent Class: CohereModelProvi...
method
validate_api_key
fenic._inference.cohere.cohere_provider.CohereModelProvider.validate_api_key
Validate Cohere API key by making a minimal API call.
null
true
false
28
32
null
None
null
[ "self" ]
null
CohereModelProvider
Type: method Member Name: validate_api_key Qualified Name: fenic._inference.cohere.cohere_provider.CohereModelProvider.validate_api_key Docstring: Validate Cohere API key by making a minimal API call. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: None Parent Class: Coh...
method
_get_api_key
fenic._inference.cohere.cohere_provider.CohereModelProvider._get_api_key
Get the Cohere API key.
null
false
true
34
38
null
str
null
[ "self" ]
null
CohereModelProvider
Type: method Member Name: _get_api_key Qualified Name: fenic._inference.cohere.cohere_provider.CohereModelProvider._get_api_key Docstring: Get the Cohere API key. Value: none Annotation: none is Public? : false is Private? : true Parameters: ["self"] Returns: str Parent Class: CohereModelProvider
module
cohere_profile_manager
fenic._inference.cohere.cohere_profile_manager
null
/private/var/folders/w2/dyfkx_354cqghs4b74vb_x380000gn/T/fenic-clone-0.11.0-a2lcuovw/fenic/src/fenic/_inference/cohere/cohere_profile_manager.py
true
false
null
null
null
null
null
null
null
null
Type: module Member Name: cohere_profile_manager Qualified Name: fenic._inference.cohere.cohere_profile_manager Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
class
CohereEmbeddingsProfileConfiguration
fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileConfiguration
Configuration for Cohere embeddings model profiles. Attributes: output_dimensionality: The desired output dimensionality for embeddings input_type: The type of input text (search_query, search_document, classification, clustering) Note: Cohere supports other embedding types, but we only support float emb...
null
true
false
12
24
null
null
null
null
[ "BaseProfileConfiguration" ]
null
Type: class Member Name: CohereEmbeddingsProfileConfiguration Qualified Name: fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileConfiguration Docstring: Configuration for Cohere embeddings model profiles. Attributes: output_dimensionality: The desired output dimensionality for embeddings in...
method
__init__
fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileConfiguration.__init__
null
null
true
false
0
0
null
None
null
[ "self", "output_dimensionality", "input_type" ]
null
CohereEmbeddingsProfileConfiguration
Type: method Member Name: __init__ Qualified Name: fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileConfiguration.__init__ Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "output_dimensionality", "input_type"] Returns: None Parent Class: Coher...
class
CohereEmbeddingsProfileManager
fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileManager
Manages Cohere-specific profile configurations for embeddings.
null
true
false
26
61
null
null
null
null
[ "ProfileManager[ResolvedCohereModelProfile, CohereEmbeddingsProfileConfiguration]" ]
null
Type: class Member Name: CohereEmbeddingsProfileManager Qualified Name: fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileManager Docstring: Manages Cohere-specific profile configurations for embeddings. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: non...
method
__init__
fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileManager.__init__
null
null
true
false
29
36
null
null
null
[ "self", "model_parameters", "profile_configurations", "default_profile_name" ]
null
CohereEmbeddingsProfileManager
Type: method Member Name: __init__ Qualified Name: fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileManager.__init__ Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "model_parameters", "profile_configurations", "default_profile_name"] Returns:...
method
_process_profile
fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileManager._process_profile
Process Cohere profile configuration. Args: name: Name of the profile profile: The profile configuration to process Returns: Processed Cohere-specific profile configuration Raises: ConfigurationError: If dimensionality is invalid
null
false
true
38
57
null
CohereEmbeddingsProfileConfiguration
null
[ "self", "profile" ]
null
CohereEmbeddingsProfileManager
Type: method Member Name: _process_profile Qualified Name: fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileManager._process_profile Docstring: Process Cohere profile configuration. Args: name: Name of the profile profile: The profile configuration to process Returns: Processed Co...
method
get_default_profile
fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileManager.get_default_profile
Get default Cohere configuration.
null
true
false
59
61
null
CohereEmbeddingsProfileConfiguration
null
[ "self" ]
null
CohereEmbeddingsProfileManager
Type: method Member Name: get_default_profile Qualified Name: fenic._inference.cohere.cohere_profile_manager.CohereEmbeddingsProfileManager.get_default_profile Docstring: Get default Cohere configuration. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: CohereEmbeddingsPr...
module
cohere_batch_embeddings_client
fenic._inference.cohere.cohere_batch_embeddings_client
null
/private/var/folders/w2/dyfkx_354cqghs4b74vb_x380000gn/T/fenic-clone-0.11.0-a2lcuovw/fenic/src/fenic/_inference/cohere/cohere_batch_embeddings_client.py
true
false
null
null
null
null
null
null
null
null
Type: module Member Name: cohere_batch_embeddings_client Qualified Name: fenic._inference.cohere.cohere_batch_embeddings_client Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
attribute
logger
fenic._inference.cohere.cohere_batch_embeddings_client.logger
null
null
true
false
27
27
null
null
logging.getLogger(__name__)
null
null
null
Type: attribute Member Name: logger Qualified Name: fenic._inference.cohere.cohere_batch_embeddings_client.logger Docstring: none Value: logging.getLogger(__name__) Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
class
CohereBatchEmbeddingsClient
fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient
Client for making batch requests to Cohere's embeddings API.
null
true
false
30
180
null
null
null
null
[ "ProfileHashMixin", "ModelClient[FenicEmbeddingsRequest, List[float]]" ]
null
Type: class Member Name: CohereBatchEmbeddingsClient Qualified Name: fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient Docstring: Client for making batch requests to Cohere's embeddings API. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: non...
method
__init__
fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient.__init__
Initialize the Cohere batch embeddings client. Args: rate_limit_strategy: Strategy for handling rate limits model: The model to use queue_size: Size of the request queue max_backoffs: Maximum number of backoff attempts preset_configurations: Dictionary of preset configurations default_preset_na...
null
true
false
35
76
null
null
null
[ "self", "rate_limit_strategy", "model", "queue_size", "max_backoffs", "profile_configurations", "default_profile_name" ]
null
CohereBatchEmbeddingsClient
Type: method Member Name: __init__ Qualified Name: fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient.__init__ Docstring: Initialize the Cohere batch embeddings client. Args: rate_limit_strategy: Strategy for handling rate limits model: The model to use queue_size: Size of t...
method
make_single_request
fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient.make_single_request
Make a single request to the Cohere embeddings API. Args: request: The embedding request to process Returns: List of embedding floats, or an exception wrapper
null
true
false
80
143
null
Union[None, List[float], TransientException, FatalException]
null
[ "self", "request" ]
null
CohereBatchEmbeddingsClient
Type: method Member Name: make_single_request Qualified Name: fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient.make_single_request Docstring: Make a single request to the Cohere embeddings API. Args: request: The embedding request to process Returns: List of embedding flo...
method
estimate_tokens_for_request
fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient.estimate_tokens_for_request
Estimate the number of tokens for a request. Args: request: The request to estimate tokens for Returns: TokenEstimate: The estimated token usage
null
true
false
145
157
null
TokenEstimate
null
[ "self", "request" ]
null
CohereBatchEmbeddingsClient
Type: method Member Name: estimate_tokens_for_request Qualified Name: fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient.estimate_tokens_for_request Docstring: Estimate the number of tokens for a request. Args: request: The request to estimate tokens for Returns: TokenEstim...
method
_get_max_output_token_request_limit
fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient._get_max_output_token_request_limit
Get maximum output tokens (always 0 for embeddings). Returns: 0 since embeddings don't produce text tokens
null
false
true
159
165
null
int
null
[ "self", "request" ]
null
CohereBatchEmbeddingsClient
Type: method Member Name: _get_max_output_token_request_limit Qualified Name: fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient._get_max_output_token_request_limit Docstring: Get maximum output tokens (always 0 for embeddings). Returns: 0 since embeddings don't produce text tokens ...
method
reset_metrics
fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient.reset_metrics
Reset all metrics to their initial values.
null
true
false
167
169
null
null
null
[ "self" ]
null
CohereBatchEmbeddingsClient
Type: method Member Name: reset_metrics Qualified Name: fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient.reset_metrics Docstring: Reset all metrics to their initial values. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: none Parent Clas...
method
get_metrics
fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient.get_metrics
Get the current metrics. Returns: The current metrics
null
true
false
171
177
null
RMMetrics
null
[ "self" ]
null
CohereBatchEmbeddingsClient
Type: method Member Name: get_metrics Qualified Name: fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient.get_metrics Docstring: Get the current metrics. Returns: The current metrics Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: RMMe...
method
_resolve_profile_for_hash
fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient._resolve_profile_for_hash
null
null
false
true
179
180
null
CohereEmbeddingsProfileConfiguration
null
[ "self", "profile_name" ]
null
CohereBatchEmbeddingsClient
Type: method Member Name: _resolve_profile_for_hash Qualified Name: fenic._inference.cohere.cohere_batch_embeddings_client.CohereBatchEmbeddingsClient._resolve_profile_for_hash Docstring: none Value: none Annotation: none is Public? : false is Private? : true Parameters: ["self", "profile_name"] Returns: CohereEmbeddin...
module
cache
fenic._inference.cache
LLM response caching for Fenic.
/private/var/folders/w2/dyfkx_354cqghs4b74vb_x380000gn/T/fenic-clone-0.11.0-a2lcuovw/fenic/src/fenic/_inference/cache/__init__.py
true
false
null
null
null
null
null
null
null
null
Type: module Member Name: cache Qualified Name: fenic._inference.cache Docstring: LLM response caching for Fenic. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
attribute
__all__
fenic._inference.cache.__all__
null
null
false
false
6
11
null
null
['CachedResponse', 'CacheStats', 'LLMResponseCache', 'SQLiteLLMCache']
null
null
null
Type: attribute Member Name: __all__ Qualified Name: fenic._inference.cache.__all__ Docstring: none Value: ['CachedResponse', 'CacheStats', 'LLMResponseCache', 'SQLiteLLMCache'] Annotation: none is Public? : false is Private? : false Parameters: none Returns: none Parent Class: none
module
sqlite_cache
fenic._inference.cache.sqlite_cache
SQLite-backed LLM response cache implementation.
/private/var/folders/w2/dyfkx_354cqghs4b74vb_x380000gn/T/fenic-clone-0.11.0-a2lcuovw/fenic/src/fenic/_inference/cache/sqlite_cache.py
true
false
null
null
null
null
null
null
null
null
Type: module Member Name: sqlite_cache Qualified Name: fenic._inference.cache.sqlite_cache Docstring: SQLite-backed LLM response cache implementation. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
attribute
logger
fenic._inference.cache.sqlite_cache.logger
null
null
true
false
15
15
null
null
logging.getLogger(__name__)
null
null
null
Type: attribute Member Name: logger Qualified Name: fenic._inference.cache.sqlite_cache.logger Docstring: none Value: logging.getLogger(__name__) Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
attribute
SQLITE_MAX_CONNECTIONS_DEFAULT
fenic._inference.cache.sqlite_cache.SQLITE_MAX_CONNECTIONS_DEFAULT
null
null
true
false
16
16
null
null
3
null
null
null
Type: attribute Member Name: SQLITE_MAX_CONNECTIONS_DEFAULT Qualified Name: fenic._inference.cache.sqlite_cache.SQLITE_MAX_CONNECTIONS_DEFAULT Docstring: none Value: 3 Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
class
SQLiteLLMCache
fenic._inference.cache.sqlite_cache.SQLiteLLMCache
SQLite-backed LLM response cache with normalized storage. Thread-safe implementation using thread-local connections and WAL mode. Stores responses in a normalized schema with JSON serialization for complex data. Attributes: db_path: Path to SQLite database file. ttl_seconds: Time-to-live in seconds for cached...
null
true
false
18
723
null
null
null
null
[ "LLMResponseCache" ]
null
Type: class Member Name: SQLiteLLMCache Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache Docstring: SQLite-backed LLM response cache with normalized storage. Thread-safe implementation using thread-local connections and WAL mode. Stores responses in a normalized schema with JSON serialization for com...
method
__init__
fenic._inference.cache.sqlite_cache.SQLiteLLMCache.__init__
Initialize SQLite cache. Args: db_path: Path to SQLite database. If None, uses ~/.fenic/llm_cache.db. ttl_seconds: Time-to-live for cached entries (default: 3600 = 1 hour). max_size_mb: Maximum cache size before LRU eviction (default: 1000 MB). namespace: Cache namespace for isolation (default: "defaul...
null
true
false
78
133
null
null
null
[ "self", "db_path", "ttl_seconds", "max_size_mb", "namespace", "max_connections" ]
null
SQLiteLLMCache
Type: method Member Name: __init__ Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache.__init__ Docstring: Initialize SQLite cache. Args: db_path: Path to SQLite database. If None, uses ~/.fenic/llm_cache.db. ttl_seconds: Time-to-live for cached entries (default: 3600 = 1 hour). max_size_mb:...
method
_create_connection
fenic._inference.cache.sqlite_cache.SQLiteLLMCache._create_connection
Create a new database connection with proper settings. Returns: Configured SQLite connection with WAL mode enabled.
null
false
true
135
155
null
sqlite3.Connection
null
[ "self" ]
null
SQLiteLLMCache
Type: method Member Name: _create_connection Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache._create_connection Docstring: Create a new database connection with proper settings. Returns: Configured SQLite connection with WAL mode enabled. Value: none Annotation: none is Public? : false is Privat...
method
get_connection
fenic._inference.cache.sqlite_cache.SQLiteLLMCache.get_connection
Get a connection from the pool. Returns: A database connection from the pool. Raises: ValueError: If cache has been closed.
null
true
false
157
183
null
sqlite3.Connection
null
[ "self" ]
null
SQLiteLLMCache
Type: method Member Name: get_connection Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache.get_connection Docstring: Get a connection from the pool. Returns: A database connection from the pool. Raises: ValueError: If cache has been closed. Value: none Annotation: none is Public? : true is Pr...
method
release_connection
fenic._inference.cache.sqlite_cache.SQLiteLLMCache.release_connection
Return a connection to the pool. Args: conn: Connection to return to the pool.
null
true
false
185
192
null
null
null
[ "self", "conn" ]
null
SQLiteLLMCache
Type: method Member Name: release_connection Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache.release_connection Docstring: Return a connection to the pool. Args: conn: Connection to return to the pool. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "conn"...
method
_handle_corruption
fenic._inference.cache.sqlite_cache.SQLiteLLMCache._handle_corruption
Delete corrupted cache and all related files.
null
false
true
194
202
null
null
null
[ "self" ]
null
SQLiteLLMCache
Type: method Member Name: _handle_corruption Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache._handle_corruption Docstring: Delete corrupted cache and all related files. Value: none Annotation: none is Public? : false is Private? : true Parameters: ["self"] Returns: none Parent Class: SQLiteLLMCache
method
_init_db
fenic._inference.cache.sqlite_cache.SQLiteLLMCache._init_db
Initialize normalized schema.
null
false
true
204
246
null
null
null
[ "self" ]
null
SQLiteLLMCache
Type: method Member Name: _init_db Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache._init_db Docstring: Initialize normalized schema. Value: none Annotation: none is Public? : false is Private? : true Parameters: ["self"] Returns: none Parent Class: SQLiteLLMCache
method
get
fenic._inference.cache.sqlite_cache.SQLiteLLMCache.get
Retrieve cached response. Args: cache_key: Unique cache key. Returns: CachedResponse if found and not expired, None otherwise.
null
true
false
248
320
null
Optional[CachedResponse]
null
[ "self", "cache_key" ]
null
SQLiteLLMCache
Type: method Member Name: get Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache.get Docstring: Retrieve cached response. Args: cache_key: Unique cache key. Returns: CachedResponse if found and not expired, None otherwise. Value: none Annotation: none is Public? : true is Private? : false Para...
method
get_batch
fenic._inference.cache.sqlite_cache.SQLiteLLMCache.get_batch
Retrieve multiple cached responses. Args: cache_keys: List of cache keys to retrieve. Returns: Dictionary mapping cache keys to responses (only includes hits).
null
true
false
322
406
null
Dict[str, CachedResponse]
null
[ "self", "cache_keys" ]
null
SQLiteLLMCache
Type: method Member Name: get_batch Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache.get_batch Docstring: Retrieve multiple cached responses. Args: cache_keys: List of cache keys to retrieve. Returns: Dictionary mapping cache keys to responses (only includes hits). Value: none Annotation: no...
method
set
fenic._inference.cache.sqlite_cache.SQLiteLLMCache.set
Store response in cache. Args: cache_key: Unique cache key. response: The response to cache. model: The model that generated this response. Returns: True if stored successfully, False otherwise.
null
true
false
408
481
null
bool
null
[ "self", "cache_key", "response", "model" ]
null
SQLiteLLMCache
Type: method Member Name: set Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache.set Docstring: Store response in cache. Args: cache_key: Unique cache key. response: The response to cache. model: The model that generated this response. Returns: True if stored successfully, False otherw...
method
set_batch
fenic._inference.cache.sqlite_cache.SQLiteLLMCache.set_batch
Store multiple responses. Args: entries: List of (cache_key, response, model) tuples. Returns: Count of successfully stored entries.
null
true
false
483
568
null
int
null
[ "self", "entries" ]
null
SQLiteLLMCache
Type: method Member Name: set_batch Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache.set_batch Docstring: Store multiple responses. Args: entries: List of (cache_key, response, model) tuples. Returns: Count of successfully stored entries. Value: none Annotation: none is Public? : true is Pri...
method
clear
fenic._inference.cache.sqlite_cache.SQLiteLLMCache.clear
Clear all entries in namespace. Returns: Number of entries cleared.
null
true
false
571
594
null
int
null
[ "self" ]
null
SQLiteLLMCache
Type: method Member Name: clear Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache.clear Docstring: Clear all entries in namespace. Returns: Number of entries cleared. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: int Parent Class: SQLiteLLMCache
method
stats
fenic._inference.cache.sqlite_cache.SQLiteLLMCache.stats
Get performance statistics. Returns: CacheStats with current metrics.
null
true
false
596
645
null
CacheStats
null
[ "self" ]
null
SQLiteLLMCache
Type: method Member Name: stats Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache.stats Docstring: Get performance statistics. Returns: CacheStats with current metrics. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: CacheStats Parent Class: SQLiteL...
method
_maybe_evict
fenic._inference.cache.sqlite_cache.SQLiteLLMCache._maybe_evict
Evict LRU entries if cache exceeds max size. Args: conn: Database connection to use (reuses caller's connection to avoid deadlock).
null
false
true
647
693
null
null
null
[ "self", "conn" ]
null
SQLiteLLMCache
Type: method Member Name: _maybe_evict Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache._maybe_evict Docstring: Evict LRU entries if cache exceeds max size. Args: conn: Database connection to use (reuses caller's connection to avoid deadlock). Value: none Annotation: none is Public? : false is Pr...
method
close
fenic._inference.cache.sqlite_cache.SQLiteLLMCache.close
Close all pooled connections and checkpoint WAL. Simple approach: close all connections, try to checkpoint WAL. If something fails, just log it - the cache is expendable.
null
true
false
695
723
null
null
null
[ "self" ]
null
SQLiteLLMCache
Type: method Member Name: close Qualified Name: fenic._inference.cache.sqlite_cache.SQLiteLLMCache.close Docstring: Close all pooled connections and checkpoint WAL. Simple approach: close all connections, try to checkpoint WAL. If something fails, just log it - the cache is expendable. Value: none Annotation: none is ...
module
protocol
fenic._inference.cache.protocol
Protocol and types for LLM response caching.
/private/var/folders/w2/dyfkx_354cqghs4b74vb_x380000gn/T/fenic-clone-0.11.0-a2lcuovw/fenic/src/fenic/_inference/cache/protocol.py
true
false
null
null
null
null
null
null
null
null
Type: module Member Name: protocol Qualified Name: fenic._inference.cache.protocol Docstring: Protocol and types for LLM response caching. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none
class
CachedResponse
fenic._inference.cache.protocol.CachedResponse
Cached LLM response with metadata. Attributes: completion: The completion text from the LLM. model: The model that generated this response. cached_at: Timestamp when this response was cached. prompt_tokens: Number of prompt tokens (if available). completion_tokens: Number of completion tokens (if a...
null
true
false
10
85
null
null
null
null
[]
null
Type: class Member Name: CachedResponse Qualified Name: fenic._inference.cache.protocol.CachedResponse Docstring: Cached LLM response with metadata. Attributes: completion: The completion text from the LLM. model: The model that generated this response. cached_at: Timestamp when this response was cached. ...
method
to_fenic_response
fenic._inference.cache.protocol.CachedResponse.to_fenic_response
Convert cached response to FenicCompletionsResponse. Returns: FenicCompletionsResponse with cached data and usage information. Example: ```python cached = CachedResponse( completion="Hello!", model="gpt-4o-mini", cached_at=datetime.now(), prompt_tokens=10, completio...
null
true
false
52
85
null
FenicCompletionsResponse
null
[ "self" ]
null
CachedResponse
Type: method Member Name: to_fenic_response Qualified Name: fenic._inference.cache.protocol.CachedResponse.to_fenic_response Docstring: Convert cached response to FenicCompletionsResponse. Returns: FenicCompletionsResponse with cached data and usage information. Example: ```python cached = CachedResponse(...
method
__init__
fenic._inference.cache.protocol.CachedResponse.__init__
null
null
true
false
0
0
null
None
null
[ "self", "completion", "model", "cached_at", "prompt_tokens", "completion_tokens", "total_tokens", "cached_tokens", "thinking_tokens", "logprobs", "access_count" ]
null
CachedResponse
Type: method Member Name: __init__ Qualified Name: fenic._inference.cache.protocol.CachedResponse.__init__ Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "completion", "model", "cached_at", "prompt_tokens", "completion_tokens", "total_tokens", "cached_tokens", "t...
class
CacheStats
fenic._inference.cache.protocol.CacheStats
Cache performance statistics. Attributes: hits: Number of cache hits. misses: Number of cache misses. stores: Number of successful cache stores. errors: Number of cache errors. hit_rate: Cache hit rate (hits / (hits + misses)). total_entries: Total number of entries in cache. size_bytes: To...
null
true
false
88
115
null
null
null
null
[]
null
Type: class Member Name: CacheStats Qualified Name: fenic._inference.cache.protocol.CacheStats Docstring: Cache performance statistics. Attributes: hits: Number of cache hits. misses: Number of cache misses. stores: Number of successful cache stores. errors: Number of cache errors. hit_rate: Cache ...
method
__init__
fenic._inference.cache.protocol.CacheStats.__init__
null
null
true
false
0
0
null
None
null
[ "self", "hits", "misses", "stores", "errors", "hit_rate", "total_entries", "size_bytes" ]
null
CacheStats
Type: method Member Name: __init__ Qualified Name: fenic._inference.cache.protocol.CacheStats.__init__ Docstring: none Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self", "hits", "misses", "stores", "errors", "hit_rate", "total_entries", "size_bytes"] Returns: None Parent Class: Cach...
class
LLMResponseCache
fenic._inference.cache.protocol.LLMResponseCache
Protocol for LLM response caching. All implementations must be thread-safe and handle errors gracefully without raising exceptions that could break the LLM pipeline. Example: Implementing a custom cache: ```python class MyCache: def get(self, cache_key: str) -> Optional[CachedResponse]: ...
null
true
false
118
235
null
null
null
null
[ "Protocol" ]
null
Type: class Member Name: LLMResponseCache Qualified Name: fenic._inference.cache.protocol.LLMResponseCache Docstring: Protocol for LLM response caching. All implementations must be thread-safe and handle errors gracefully without raising exceptions that could break the LLM pipeline. Example: Implementing a custom...
method
get
fenic._inference.cache.protocol.LLMResponseCache.get
Retrieve a cached response. Args: cache_key: Unique key for the cached response. Returns: CachedResponse if found and not expired, None otherwise. Note: This method should never raise exceptions. All errors should be logged and None returned.
null
true
false
146
158
null
Optional[CachedResponse]
null
[ "self", "cache_key" ]
null
LLMResponseCache
Type: method Member Name: get Qualified Name: fenic._inference.cache.protocol.LLMResponseCache.get Docstring: Retrieve a cached response. Args: cache_key: Unique key for the cached response. Returns: CachedResponse if found and not expired, None otherwise. Note: This method should never raise exceptions. ...
method
get_batch
fenic._inference.cache.protocol.LLMResponseCache.get_batch
Retrieve multiple cached responses. Args: cache_keys: List of cache keys to retrieve. Returns: Dictionary mapping cache keys to responses (only includes hits). Note: This method should never raise exceptions. All errors should be logged and an empty dict or partial results returned.
null
true
false
160
173
null
Dict[str, CachedResponse]
null
[ "self", "cache_keys" ]
null
LLMResponseCache
Type: method Member Name: get_batch Qualified Name: fenic._inference.cache.protocol.LLMResponseCache.get_batch Docstring: Retrieve multiple cached responses. Args: cache_keys: List of cache keys to retrieve. Returns: Dictionary mapping cache keys to responses (only includes hits). Note: This method shoul...
method
set
fenic._inference.cache.protocol.LLMResponseCache.set
Store response in cache. Args: cache_key: Unique key for the response. response: The response to cache. model: The model that generated this response. Returns: True if stored successfully, False otherwise. Note: This method should never raise exceptions. All errors should be logged and False ...
null
true
false
175
195
null
bool
null
[ "self", "cache_key", "response", "model" ]
null
LLMResponseCache
Type: method Member Name: set Qualified Name: fenic._inference.cache.protocol.LLMResponseCache.set Docstring: Store response in cache. Args: cache_key: Unique key for the response. response: The response to cache. model: The model that generated this response. Returns: True if stored successfully, Fal...
method
set_batch
fenic._inference.cache.protocol.LLMResponseCache.set_batch
Store multiple responses in cache. Args: entries: List of (cache_key, response, model) tuples. Returns: Count of successfully stored entries. Note: This method should never raise exceptions. All errors should be logged and partial success count returned.
null
true
false
197
212
null
int
null
[ "self", "entries" ]
null
LLMResponseCache
Type: method Member Name: set_batch Qualified Name: fenic._inference.cache.protocol.LLMResponseCache.set_batch Docstring: Store multiple responses in cache. Args: entries: List of (cache_key, response, model) tuples. Returns: Count of successfully stored entries. Note: This method should never raise exce...
method
clear
fenic._inference.cache.protocol.LLMResponseCache.clear
Clear all entries in cache namespace. Returns: Number of entries cleared.
null
true
false
214
220
null
int
null
[ "self" ]
null
LLMResponseCache
Type: method Member Name: clear Qualified Name: fenic._inference.cache.protocol.LLMResponseCache.clear Docstring: Clear all entries in cache namespace. Returns: Number of entries cleared. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: int Parent Class: LLMResponseC...
method
stats
fenic._inference.cache.protocol.LLMResponseCache.stats
Get cache performance statistics. Returns: CacheStats with current metrics.
null
true
false
222
228
null
CacheStats
null
[ "self" ]
null
LLMResponseCache
Type: method Member Name: stats Qualified Name: fenic._inference.cache.protocol.LLMResponseCache.stats Docstring: Get cache performance statistics. Returns: CacheStats with current metrics. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: CacheStats Parent Class: LLM...
method
close
fenic._inference.cache.protocol.LLMResponseCache.close
Release cache resources. Should be called when the cache is no longer needed.
null
true
false
230
235
null
None
null
[ "self" ]
null
LLMResponseCache
Type: method Member Name: close Qualified Name: fenic._inference.cache.protocol.LLMResponseCache.close Docstring: Release cache resources. Should be called when the cache is no longer needed. Value: none Annotation: none is Public? : true is Private? : false Parameters: ["self"] Returns: None Parent Class: LLMResponse...
module
key_builder
fenic._inference.cache.key_builder
Shared helpers for building deterministic request/cache keys.
/private/var/folders/w2/dyfkx_354cqghs4b74vb_x380000gn/T/fenic-clone-0.11.0-a2lcuovw/fenic/src/fenic/_inference/cache/key_builder.py
true
false
null
null
null
null
null
null
null
null
Type: module Member Name: key_builder Qualified Name: fenic._inference.cache.key_builder Docstring: Shared helpers for building deterministic request/cache keys. Value: none Annotation: none is Public? : true is Private? : false Parameters: none Returns: none Parent Class: none