diff --git a/build_pkg.py b/build_pkg.py index f418d66d..80de2549 100644 --- a/build_pkg.py +++ b/build_pkg.py @@ -25,10 +25,10 @@ def copy_with_excludes(source, target, excludes=None): elif source.is_dir(): if target.exists(): shutil.rmtree(target) - + def ignore_patterns(path, names): return [n for n in names if str(Path(path) / n) in excludes] - + shutil.copytree(source, target, ignore=ignore_patterns) print(f"Copied directory {source} to {target}") @@ -66,9 +66,7 @@ def nextjs_build(): ] # Paths to exclude - exclude_paths = [ - str(source_base / ".next" / "cache") - ] + exclude_paths = [str(source_base / ".next" / "cache")] for item in files_to_copy: source = source_base / item diff --git a/src/bespokelabs/curator/request_processor/openai_batch_request_processor.py b/src/bespokelabs/curator/request_processor/openai_batch_request_processor.py index 25b6b0f1..73f336ba 100644 --- a/src/bespokelabs/curator/request_processor/openai_batch_request_processor.py +++ b/src/bespokelabs/curator/request_processor/openai_batch_request_processor.py @@ -108,7 +108,7 @@ def create_api_specific_request( # TODO(ryan): not sure if this should be something else. # TODO(ryan): also not sure if we should use strict: True "name": "output_schema", - "schema": generic_request.response_format.model_json_schema(), + "schema": generic_request.response_format, }, }, } diff --git a/src/bespokelabs/curator/request_processor/openai_online_request_processor.py b/src/bespokelabs/curator/request_processor/openai_online_request_processor.py index 96f8d16e..379d3fe3 100644 --- a/src/bespokelabs/curator/request_processor/openai_online_request_processor.py +++ b/src/bespokelabs/curator/request_processor/openai_online_request_processor.py @@ -195,7 +195,8 @@ async def process_generic_requests_from_file( # Increase the number of open file descriptors to avoid "Too many open files" errors soft, hard = resource.getrlimit(resource.RLIMIT_NOFILE) resource.setrlimit( - resource.RLIMIT_NOFILE, (min(hard, 10 * max_requests_per_minute), hard) + resource.RLIMIT_NOFILE, + (min(hard, 10 * max_requests_per_minute), hard), ) # constants