2424from humanloop .otel .processor import HumanloopSpanProcessor
2525from humanloop .prompt_utils import populate_template
2626from humanloop .prompts .client import PromptsClient
27- from humanloop .sync .sync_client import SyncClient
27+ from humanloop .sync .sync_client import SyncClient , DEFAULT_CACHE_SIZE
2828
2929
3030class ExtendedEvalsClient (EvaluationsClient ):
@@ -101,6 +101,7 @@ def __init__(
101101 opentelemetry_tracer : Optional [Tracer ] = None ,
102102 use_local_files : bool = False ,
103103 files_directory : str = "humanloop" ,
104+ cache_size : int = DEFAULT_CACHE_SIZE ,
104105 ):
105106 """
106107 Extends the base client with custom evaluation utilities and
@@ -110,6 +111,21 @@ def __init__(
110111 You can provide a TracerProvider and a Tracer to integrate
111112 with your existing telemetry system. If not provided,
112113 an internal TracerProvider will be used.
114+
115+ Parameters
116+ ----------
117+ base_url: Optional base URL for the API
118+ environment: The environment to use (default: DEFAULT)
119+ api_key: Your Humanloop API key (default: from HUMANLOOP_API_KEY env var)
120+ timeout: Optional timeout for API requests
121+ follow_redirects: Whether to follow redirects
122+ httpx_client: Optional custom httpx client
123+ opentelemetry_tracer_provider: Optional tracer provider for telemetry
124+ opentelemetry_tracer: Optional tracer for telemetry
125+ use_local_files: Whether to use local files for prompts and agents
126+ files_directory: Directory for local files (default: "humanloop")
127+ cache_size: Maximum number of files to cache when use_local_files is True (default: DEFAULT_CACHE_SIZE).
128+ This parameter has no effect if use_local_files is False.
113129 """
114130 super ().__init__ (
115131 base_url = base_url ,
@@ -121,7 +137,11 @@ def __init__(
121137 )
122138
123139 self .use_local_files = use_local_files
124- self ._sync_client = SyncClient (client = self , base_dir = files_directory )
140+ self ._sync_client = SyncClient (
141+ client = self ,
142+ base_dir = files_directory ,
143+ cache_size = cache_size
144+ )
125145 eval_client = ExtendedEvalsClient (client_wrapper = self ._client_wrapper )
126146 eval_client .client = self
127147 self .evaluations = eval_client
0 commit comments