From 29e76ae7a8e07674404c7593f6f6499bd6a7817b Mon Sep 17 00:00:00 2001 From: heavytail Date: Sun, 2 Jun 2024 20:11:52 +0900 Subject: [PATCH] release: 0.1.0 Now it saves both prompts and completions --- batched_chatgpt/__init__.py | 2 +- batched_chatgpt/chatgpt_utils.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/batched_chatgpt/__init__.py b/batched_chatgpt/__init__.py index 191b2fc..05cb290 100644 --- a/batched_chatgpt/__init__.py +++ b/batched_chatgpt/__init__.py @@ -1,3 +1,3 @@ from .chatgpt_utils import call_chatgpt -__version__ = '0.0.5' +__version__ = '0.1.0' diff --git a/batched_chatgpt/chatgpt_utils.py b/batched_chatgpt/chatgpt_utils.py index ba6853e..31e77ec 100644 --- a/batched_chatgpt/chatgpt_utils.py +++ b/batched_chatgpt/chatgpt_utils.py @@ -93,7 +93,7 @@ def batched_multiprocess_auto_retry( outputs[remain_indices[i * chunk_size + j]] = result # save the outputs which may be incomplete - pickle_bobj(outputs, pkl_path) if pkl_path else None + pickle_bobj({'prompts': items, 'completions': outputs}, pkl_path) if pkl_path else None time.sleep(sleep_between_chunk) if not all(outputs) else ... return outputs diff --git a/setup.py b/setup.py index 794d8f0..9a5de82 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name="batched_chatgpt", - version="0.0.5", + version="0.1.0", description="Easy calling chatgpt with batched instances", packages=find_packages(), author="superheavytail",