|
from enum import Enum |
|
from typing import Literal, Optional, TypedDict |
|
|
|
|
|
class LiteLLMCacheType(str, Enum): |
|
LOCAL = "local" |
|
REDIS = "redis" |
|
REDIS_SEMANTIC = "redis-semantic" |
|
S3 = "s3" |
|
DISK = "disk" |
|
QDRANT_SEMANTIC = "qdrant-semantic" |
|
|
|
|
|
CachingSupportedCallTypes = Literal[ |
|
"completion", |
|
"acompletion", |
|
"embedding", |
|
"aembedding", |
|
"atranscription", |
|
"transcription", |
|
"atext_completion", |
|
"text_completion", |
|
"arerank", |
|
"rerank", |
|
] |
|
|
|
|
|
class RedisPipelineIncrementOperation(TypedDict): |
|
""" |
|
TypeDict for 1 Redis Pipeline Increment Operation |
|
""" |
|
|
|
key: str |
|
increment_value: float |
|
ttl: Optional[int] |
|
|