From 78aafdf7ba9c78fdb623f793fdebd2fca3bd7574 Mon Sep 17 00:00:00 2001 From: eureka320 Date: Tue, 26 Mar 2024 22:37:45 -0400 Subject: [PATCH 1/4] feat: api key create feature Co-authored-by: loyal812 --- create_api_key.py | 72 +++++++++++++++++++++++++++++++++++++ src/models/api_model.py | 12 +++++++ src/mongodb/MongoDBClass.py | 39 ++++++++++++++++++-- src/utils/utils.py | 5 +++ 4 files changed, 126 insertions(+), 2 deletions(-) create mode 100644 create_api_key.py create mode 100644 src/models/api_model.py diff --git a/create_api_key.py b/create_api_key.py new file mode 100644 index 0000000..02b8202 --- /dev/null +++ b/create_api_key.py @@ -0,0 +1,72 @@ + +import os +import gc +import argparse +from pathlib import Path +from datetime import datetime + +from src.utils.read_json import read_json +from src.mongodb.MongoDBClass import MongoDBClass +from src.utils.utils import generate_api_key +from src.models.api_model import APIModel +from pathlib import Path + +def create_api_key(args): + """ + main entry point + """ + + # Payload + payload_data = read_json(args.payload_dir) + + # Call class instance + mongodb = MongoDBClass( + db_name=payload_data["db_name"], + collection_name=payload_data["collection_name"], + mongo_uri=payload_data["mongo_uri"]) + + api_key = generate_api_key() + + data:APIModel = { + "user": str(Path(args.user)), + "api": api_key, + "title": str(Path(args.title)), + "description": str(Path(args.description)), + "is_removed": False, + "created_at": datetime.now(), + "updated_at": datetime.now(), + } + + mongodb.create_api(data) + + gc.collect() + +if __name__ == "__main__": + """ + Form command lines + """ + # Clean up buffer memory + gc.collect() + + # Current directory + current_dir = os.path.dirname(os.path.abspath(__file__)) + + # Payload directory + test_name = "regression_test013" + payload_name = "mongodb_payload.json" + payload_dir = os.path.join(current_dir, "test", "regression", test_name, "payload", payload_name) + + user = "user@gmail.com" + title = "title" + description = "description" + + # Add options + p = argparse.ArgumentParser() + p = argparse.ArgumentParser(description="Translate text within an image.") + p.add_argument("--payload_dir", type=Path, default=payload_dir, help="payload directory to the test example") + p.add_argument("--user", type=Path, default=user, help="user") + p.add_argument("--title", type=Path, default=title, help="title") + p.add_argument("--description", type=Path, default=description, help="title") + args = p.parse_args() + + create_api_key(args) \ No newline at end of file diff --git a/src/models/api_model.py b/src/models/api_model.py new file mode 100644 index 0000000..3c1d688 --- /dev/null +++ b/src/models/api_model.py @@ -0,0 +1,12 @@ +from pydantic import BaseModel +from typing import Optional +from datetime import datetime + +class APIModel(BaseModel): + user: Optional[str] = "" + api: Optional[str] = "" + title: Optional[str] = "" + description: Optional[str] = "" + is_removed: Optional[bool] = False + created_at: Optional[datetime] = datetime.now() + updated_at: Optional[datetime] = datetime.now() diff --git a/src/mongodb/MongoDBClass.py b/src/mongodb/MongoDBClass.py index a3c8bb8..de9eed9 100644 --- a/src/mongodb/MongoDBClass.py +++ b/src/mongodb/MongoDBClass.py @@ -1,4 +1,3 @@ -import openai import re import os import datetime @@ -10,6 +9,8 @@ from bson.json_util import dumps from pymongo import MongoClient +from src.models.api_model import APIModel + class MongoDBClass(): def __init__(self, db_name, collection_name, mongo_uri=""): self.db_name = db_name @@ -62,4 +63,38 @@ def mongo_connect(self): # create the database client[self.db_name].create_collection(self.collection_name) print(f"The {self.db_name} database has been created with {self.collection_name} collection.") - return {"result": True, "message": f"The {self.db_name} database has been created with {self.collection_name} collection."} \ No newline at end of file + + # confirm apis collection exist + oridosai_db = client[self.db_name] + collist = oridosai_db.list_collection_names() + if self.collection_name in collist: + print(f"The {self.collection_name} collection exists.") + user_col = oridosai_db[self.collection_name] + return {"result": True, "message": user_col} + else: + print(f"The {self.collection_name} collection not exists.") + return {"result": False ,"message": f"The {self.collection_name} collection not exists."} + + # return {"result": True, "message": f"The {self.db_name} database has been created with {self.collection_name} collection."} + + def create_api(self, data:APIModel): + # Connect to MongoDB + db = self.mongo_connect() + + if db["result"] == True: + collection = db['message'] + + # Insert the new document into the collection + result = collection.insert_one(data) + + # Check if the insertion was successful + if result.inserted_id: + print("New item has been added to the collection with ID:", result.inserted_id) + return True + else: + print("Failed to add a new item to the collection") + return False + else: + return db + + \ No newline at end of file diff --git a/src/utils/utils.py b/src/utils/utils.py index f3ebbb7..222edf4 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -1,6 +1,11 @@ import os import shutil import fitz # PyMuPDF +import secrets + +def generate_api_key(): + api_key = secrets.token_urlsafe(32) # Generate a 32-byte (256-bit) random URL-safe API key + return api_key def is_image_file(file_path): image_extensions = {'.jpg', '.jpeg', '.png'} From a98b4fb047df91fe84cf5d38b8a0ee0bb6fb5c37 Mon Sep 17 00:00:00 2001 From: eureka320 Date: Tue, 26 Mar 2024 22:38:44 -0400 Subject: [PATCH 2/4] feat: api key remove feature Co-authored-by: loyal812 --- delete_api_key.py | 56 +++++++++++++++++++++++++++++++++++++ src/mongodb/MongoDBClass.py | 20 +++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 delete_api_key.py diff --git a/delete_api_key.py b/delete_api_key.py new file mode 100644 index 0000000..027e252 --- /dev/null +++ b/delete_api_key.py @@ -0,0 +1,56 @@ + +import os +import gc +import argparse +from pathlib import Path + +from src.utils.read_json import read_json +from src.mongodb.MongoDBClass import MongoDBClass +from pathlib import Path + +def delete_api_key(args): + """ + main entry point + """ + + # Payload + payload_data = read_json(args.payload_dir) + + # Call class instance + mongodb = MongoDBClass( + db_name=payload_data["db_name"], + collection_name=payload_data["collection_name"], + mongo_uri=payload_data["mongo_uri"]) + + mongodb.delete_api(api_key=str(Path(args.api_key)), user=str(Path(args.user))) + + gc.collect() + +if __name__ == "__main__": + """ + Form command lines + """ + # Clean up buffer memory + gc.collect() + + # Current directory + current_dir = os.path.dirname(os.path.abspath(__file__)) + + # Payload directory + test_name = "regression_test013" + payload_name = "mongodb_payload.json" + payload_dir = os.path.join(current_dir, "test", "regression", test_name, "payload", payload_name) + + user = "user@gmail.com" + api_key = "AMEYbpdcmrUxNu_Fb80qutukUZdlsmYiH4g7As5LzNA" + description = "description" + + # Add options + p = argparse.ArgumentParser() + p = argparse.ArgumentParser(description="Translate text within an image.") + p.add_argument("--payload_dir", type=Path, default=payload_dir, help="payload directory to the test example") + p.add_argument("--user", type=Path, default=user, help="user") + p.add_argument("--api_key", type=Path, default=api_key, help="title") + args = p.parse_args() + + delete_api_key(args) \ No newline at end of file diff --git a/src/mongodb/MongoDBClass.py b/src/mongodb/MongoDBClass.py index de9eed9..4bcbcad 100644 --- a/src/mongodb/MongoDBClass.py +++ b/src/mongodb/MongoDBClass.py @@ -97,4 +97,24 @@ def create_api(self, data:APIModel): else: return db + def delete_api(self, api_key, user): + # Connect to MongoDB + db = self.mongo_connect() + + if db["result"] == True: + collection = db['message'] + + # Define the filter condition to identify the document to delete + filter_condition = {"api": api_key, "user": user} + # Define the update operation + update_operation = {"$set": { "is_removed": True }} + + # Update a single document that matches the filter condition + result = collection.update_one(filter_condition, update_operation) + if result.modified_count == 1: + print("Document updated successfully") + else: + print("No matching document found") + else: + return db \ No newline at end of file From c3439d8cb7e3833170e94a1386b37d6c489fbe0a Mon Sep 17 00:00:00 2001 From: eureka320 Date: Tue, 26 Mar 2024 22:39:21 -0400 Subject: [PATCH 3/4] feat: api key validation feature Co-authored-by: loyal812 --- check_api_key.py | 56 +++++++++++++++++++++++++++++++++++++ src/mongodb/MongoDBClass.py | 22 ++++++++++++++- 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 check_api_key.py diff --git a/check_api_key.py b/check_api_key.py new file mode 100644 index 0000000..58e2562 --- /dev/null +++ b/check_api_key.py @@ -0,0 +1,56 @@ + +import os +import gc +import argparse +from pathlib import Path + +from src.utils.read_json import read_json +from src.mongodb.MongoDBClass import MongoDBClass +from pathlib import Path + +def delete_api_key(args): + """ + main entry point + """ + + # Payload + payload_data = read_json(args.payload_dir) + + # Call class instance + mongodb = MongoDBClass( + db_name=payload_data["db_name"], + collection_name=payload_data["collection_name"], + mongo_uri=payload_data["mongo_uri"]) + + mongodb.check_validation_api(api_key=str(Path(args.api_key)), user=str(Path(args.user))) + + gc.collect() + +if __name__ == "__main__": + """ + Form command lines + """ + # Clean up buffer memory + gc.collect() + + # Current directory + current_dir = os.path.dirname(os.path.abspath(__file__)) + + # Payload directory + test_name = "regression_test013" + payload_name = "mongodb_payload.json" + payload_dir = os.path.join(current_dir, "test", "regression", test_name, "payload", payload_name) + + user = "user@gmail.com" + api_key = "AMEYbpdcmrUxNu_Fb80qutukUZdlsmYiH4g7As5LzNA" + description = "description" + + # Add options + p = argparse.ArgumentParser() + p = argparse.ArgumentParser(description="Translate text within an image.") + p.add_argument("--payload_dir", type=Path, default=payload_dir, help="payload directory to the test example") + p.add_argument("--user", type=Path, default=user, help="user") + p.add_argument("--api_key", type=Path, default=api_key, help="title") + args = p.parse_args() + + delete_api_key(args) \ No newline at end of file diff --git a/src/mongodb/MongoDBClass.py b/src/mongodb/MongoDBClass.py index 4bcbcad..7ca7264 100644 --- a/src/mongodb/MongoDBClass.py +++ b/src/mongodb/MongoDBClass.py @@ -117,4 +117,24 @@ def delete_api(self, api_key, user): print("No matching document found") else: return db - \ No newline at end of file + + def check_validation_api(self, api_key, user): + # Connect to MongoDB + db = self.mongo_connect() + + if db["result"] == True: + collection = db['message'] + + # Define the filter condition to check for document existence + filter_condition = {"api": api_key, "user": user, "is_removed": False} + + # Check if a document exists that matches the filter condition + existing_document = collection.find_one(filter_condition) + if existing_document: + print("Document exists in the collection") + return True + else: + print("Document does not exist in the collection") + return False + else: + return db \ No newline at end of file From 6dab2fea044c638f5958195a464119980392648f Mon Sep 17 00:00:00 2001 From: eureka320 Date: Tue, 26 Mar 2024 22:40:06 -0400 Subject: [PATCH 4/4] feat: api key auth feature Co-authored-by: loyal812 --- check_api_key.py | 1 - delete_api_key.py | 1 - main.py | 225 ++++++++++-------- mongodb.py | 49 ---- .../regression_test003/payload/payload.json | 5 +- .../regression_test004/payload/payload.json | 5 +- .../regression_test005/payload/payload.json | 5 +- .../regression_test006/payload/payload.json | 5 +- .../regression_test007/payload/payload.json | 5 +- .../regression_test008/payload/payload.json | 5 +- .../regression_test009/payload/payload.json | 5 +- .../regression_test010/payload/payload.json | 5 +- .../regression_test011/payload/payload.json | 5 +- .../regression_test012/payload/payload.json | 5 +- .../regression_test013/payload/payload.json | 5 +- 15 files changed, 166 insertions(+), 165 deletions(-) delete mode 100644 mongodb.py diff --git a/check_api_key.py b/check_api_key.py index 58e2562..11b5440 100644 --- a/check_api_key.py +++ b/check_api_key.py @@ -43,7 +43,6 @@ def delete_api_key(args): user = "user@gmail.com" api_key = "AMEYbpdcmrUxNu_Fb80qutukUZdlsmYiH4g7As5LzNA" - description = "description" # Add options p = argparse.ArgumentParser() diff --git a/delete_api_key.py b/delete_api_key.py index 027e252..5af9270 100644 --- a/delete_api_key.py +++ b/delete_api_key.py @@ -43,7 +43,6 @@ def delete_api_key(args): user = "user@gmail.com" api_key = "AMEYbpdcmrUxNu_Fb80qutukUZdlsmYiH4g7As5LzNA" - description = "description" # Add options p = argparse.ArgumentParser() diff --git a/main.py b/main.py index 47568f1..d590aeb 100644 --- a/main.py +++ b/main.py @@ -14,6 +14,7 @@ from src.pdf2img.Pdf2ImgClass import Pdf2ImgClass from src.finetune.FineTuningClass import FineTuningClass from src.mathpix.Mathpix import Mathpix +from src.mongodb.MongoDBClass import MongoDBClass from src.utils.utils import is_image_file, is_pdf_file, is_text_file, copy_file_to_folder, get_image_pages_percentage @@ -22,113 +23,126 @@ def main(args): payload_data = read_json(args.payload_dir) - # Separate the data - separate_data(payload_data["data_path"], payload_data["threasold_image_percent_of_pdf"]) - - # pdf to image feature - pdf2img = Pdf2ImgClass( - data_path=payload_data["pdf_data_path"], - parent_path=payload_data["data_path"]) - - pdf2img.pdf2img() - - # img to text feature - # Read images from the image directory - image_list = [] - image_data_path = payload_data["images_data_path"] - - try: - image_list = [img for img in os.listdir(image_data_path) if img.endswith(".png") or img.endswith(".jpeg") or img.endswith(".jpg")] - except FileNotFoundError: - print("The specified path does not exist or is inaccessible.") - # Call class instance - img_translator = ImageTranslator(api_key=payload_data["api_key"]) - mathpix = Mathpix(mathpix_app_id=payload_data["mathpix_app_id"], mathpix_app_key=payload_data["mathpix_app_key"]) - - # Loop over number of images and append all images - # NOTE: User can upload image and add image URLs or just upload image or just add image URLs - images = [] - image_paths = [] - if (len(image_list) > 0) and (len(payload_data["image_url"]) > 0): - for image in image_list: - image_path = os.path.join(image_data_path, image) - # Encode image - base64_image = img_translator.encode_image(image_path) - images.append((base64_image, False, "auto")) - image_paths.append(image_path) - for img_url in payload_data["image_url"]: - images.append((img_url, True, "auto")) - image_paths.append(img_url) - elif (len(image_list) > 0) and (len(payload_data["image_url"]) == 0): - for image in image_list: - image_path = os.path.join(image_data_path, image) - # Encode image - base64_image = img_translator.encode_image(image_path) - images.append((base64_image, False, "auto")) - image_paths.append(image_path) - elif (len(image_list) == 0) and (len(payload_data["image_url"]) > 0): - for img_url in payload_data["image_url"]: - images.append((img_url, True, "auto")) - image_paths.append(img_url) - - if payload_data["is_gpt"]: - for image in images: - if payload_data["is_parallel"]: - params = [{ - img_translator: img_translator, - image: image - }] * payload_data["parallel_count"] - - with concurrent.futures.ThreadPoolExecutor() as executor: - results = list(executor.map(lambda args: img2txt(*args), params)) - - result = make_one_result(payload_data, results) - else: - result = img2txt(img_translator, image) + mongodb = MongoDBClass( + db_name=payload_data["db_name"], + collection_name=payload_data["collection_name"], + mongo_uri=payload_data["mongo_uri"]) + + is_available = mongodb.check_validation_api(api_key=str(Path(args.api_key)), user=str(Path(args.user))) + + if is_available: + print("valid api key") + # Separate the data + separate_data(payload_data["data_path"], payload_data["threasold_image_percent_of_pdf"]) + + # pdf to image feature + pdf2img = Pdf2ImgClass( + data_path=payload_data["pdf_data_path"], + parent_path=payload_data["data_path"]) + + pdf2img.pdf2img() + + # img to text feature + # Read images from the image directory + image_list = [] + image_data_path = payload_data["images_data_path"] - save_to_txt(payload_data, result) + try: + image_list = [img for img in os.listdir(image_data_path) if img.endswith(".png") or img.endswith(".jpeg") or img.endswith(".jpg")] + except FileNotFoundError: + print("The specified path does not exist or is inaccessible.") + + # Call class instance + img_translator = ImageTranslator(api_key=payload_data["api_key"]) + mathpix = Mathpix(mathpix_app_id=payload_data["mathpix_app_id"], mathpix_app_key=payload_data["mathpix_app_key"]) + + # Loop over number of images and append all images + # NOTE: User can upload image and add image URLs or just upload image or just add image URLs + images = [] + image_paths = [] + if (len(image_list) > 0) and (len(payload_data["image_url"]) > 0): + for image in image_list: + image_path = os.path.join(image_data_path, image) + # Encode image + base64_image = img_translator.encode_image(image_path) + images.append((base64_image, False, "auto")) + image_paths.append(image_path) + for img_url in payload_data["image_url"]: + images.append((img_url, True, "auto")) + image_paths.append(img_url) + elif (len(image_list) > 0) and (len(payload_data["image_url"]) == 0): + for image in image_list: + image_path = os.path.join(image_data_path, image) + # Encode image + base64_image = img_translator.encode_image(image_path) + images.append((base64_image, False, "auto")) + image_paths.append(image_path) + elif (len(image_list) == 0) and (len(payload_data["image_url"]) > 0): + for img_url in payload_data["image_url"]: + images.append((img_url, True, "auto")) + image_paths.append(img_url) + + if payload_data["is_gpt"]: + for image in images: + if payload_data["is_parallel"]: + params = [{ + img_translator: img_translator, + image: image + }] * payload_data["parallel_count"] + + with concurrent.futures.ThreadPoolExecutor() as executor: + results = list(executor.map(lambda args: img2txt(*args), params)) + + result = make_one_result(payload_data, results) + else: + result = img2txt(img_translator, image) + + save_to_txt(payload_data, result) + else: + for path in image_paths: + result = mathpix.latex({ + 'src': mathpix.image_uri(path), + 'ocr': ['math', 'text'], + 'formats': ['text', 'latex_styled', 'asciimath', 'mathml', 'latex_simplified'], + 'format_options': { + 'text': { + 'transforms': ['rm_spaces', 'rm_newlines'], + 'math_delims': ['$', '$'] + }, + 'latex_styled': {'transforms': ['rm_spaces']} + } + }) + + # print(json.loads(json.dumps(result, indent=4, sort_keys=True))["text"]) + + save_to_txt(payload_data, json.loads(json.dumps(result, indent=4, sort_keys=True))["text"]) + + # fine tuning + fine_tune = FineTuningClass( + data_path=payload_data["train_data_path"], + parent_path=payload_data["data_path"], + api_key=payload_data["api_key"], + model=payload_data["model"], + temperature=payload_data["temperature"], + max_retries=payload_data["max_retries"]) + + # Generate the train and eval data + fine_tune.train_generation() + + # Generate the jsonl + fine_tune.jsonl_generation() + + # Fine tuning + fine_tune.finetune() + + # Write into log file + end_time = time.time() + msg = f"Total processing time: {end_time - start_time} seconds" + print(msg) else: - for path in image_paths: - result = mathpix.latex({ - 'src': mathpix.image_uri(path), - 'ocr': ['math', 'text'], - 'formats': ['text', 'latex_styled', 'asciimath', 'mathml', 'latex_simplified'], - 'format_options': { - 'text': { - 'transforms': ['rm_spaces', 'rm_newlines'], - 'math_delims': ['$', '$'] - }, - 'latex_styled': {'transforms': ['rm_spaces']} - } - }) - - # print(json.loads(json.dumps(result, indent=4, sort_keys=True))["text"]) - - save_to_txt(payload_data, json.loads(json.dumps(result, indent=4, sort_keys=True))["text"]) - - # fine tuning - fine_tune = FineTuningClass( - data_path=payload_data["train_data_path"], - parent_path=payload_data["data_path"], - api_key=payload_data["api_key"], - model=payload_data["model"], - temperature=payload_data["temperature"], - max_retries=payload_data["max_retries"]) - - # Generate the train and eval data - fine_tune.train_generation() + print("invalide api key") - # Generate the jsonl - fine_tune.jsonl_generation() - - # Fine tuning - fine_tune.finetune() - - # Write into log file - end_time = time.time() - msg = f"Total processing time: {end_time - start_time} seconds" - print(msg) gc.collect() def save_to_txt(payload_data, result: str): @@ -243,10 +257,15 @@ def separate_data(path, threasold): payload_name = "payload.json" payload_dir = os.path.join(current_dir, "test", "regression", test_name, "payload", payload_name) + user = "user@gmail.com" + api_key = "AMEYbpdcmrUxNu_Fb80qutukUZdlsmYiH4g7As5LzNA1" + # Add options p = argparse.ArgumentParser() p = argparse.ArgumentParser(description="Translate text within an image.") p.add_argument("--payload_dir", type=Path, default=payload_dir, help="payload directory to the test example") + p.add_argument("--user", type=Path, default=user, help="user") + p.add_argument("--api_key", type=Path, default=api_key, help="title") args = p.parse_args() main(args) \ No newline at end of file diff --git a/mongodb.py b/mongodb.py deleted file mode 100644 index e3158c5..0000000 --- a/mongodb.py +++ /dev/null @@ -1,49 +0,0 @@ - -import os -import gc -import argparse -from pathlib import Path - -from src.utils.read_json import read_json -from src.mongodb.MongoDBClass import MongoDBClass - -def mongodb(args): - """ - main entry point - """ - - # Payload - payload_data = read_json(args.payload_dir) - - # Call class instance - mongodb = MongoDBClass( - db_name=payload_data["db_name"], - collection_name=payload_data["collection_name"], - mongo_uri=payload_data["mongo_uri"]) - - mongodb.mongo_connect() - - gc.collect() - -if __name__ == "__main__": - """ - Form command lines - """ - # Clean up buffer memory - gc.collect() - - # Current directory - current_dir = os.path.dirname(os.path.abspath(__file__)) - - # Payload directory - test_name = "regression_test013" - payload_name = "mongodb_payload.json" - payload_dir = os.path.join(current_dir, "test", "regression", test_name, "payload", payload_name) - - # Add options - p = argparse.ArgumentParser() - p = argparse.ArgumentParser(description="Translate text within an image.") - p.add_argument("--payload_dir", type=Path, default=payload_dir, help="payload directory to the test example") - args = p.parse_args() - - mongodb(args) \ No newline at end of file diff --git a/test/regression/regression_test003/payload/payload.json b/test/regression/regression_test003/payload/payload.json index 5da458e..67d4c7c 100644 --- a/test/regression/regression_test003/payload/payload.json +++ b/test/regression/regression_test003/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "ft:gpt-3.5-turbo-0613:personal::8Yk6D8wc", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file diff --git a/test/regression/regression_test004/payload/payload.json b/test/regression/regression_test004/payload/payload.json index 4a63d67..cc0b157 100644 --- a/test/regression/regression_test004/payload/payload.json +++ b/test/regression/regression_test004/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "ft:gpt-3.5-turbo-0613:personal::8YkcUEuT", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file diff --git a/test/regression/regression_test005/payload/payload.json b/test/regression/regression_test005/payload/payload.json index 481557b..1b99f86 100644 --- a/test/regression/regression_test005/payload/payload.json +++ b/test/regression/regression_test005/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "ft:gpt-3.5-turbo-0613:personal::8YkrFBD6", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file diff --git a/test/regression/regression_test006/payload/payload.json b/test/regression/regression_test006/payload/payload.json index d36de7a..d1a591a 100644 --- a/test/regression/regression_test006/payload/payload.json +++ b/test/regression/regression_test006/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "ft:gpt-3.5-turbo-0613:personal::8Yl91t6J", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file diff --git a/test/regression/regression_test007/payload/payload.json b/test/regression/regression_test007/payload/payload.json index f4712ba..6441034 100644 --- a/test/regression/regression_test007/payload/payload.json +++ b/test/regression/regression_test007/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "ft:gpt-3.5-turbo-0613:personal::8Yh1901T", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file diff --git a/test/regression/regression_test008/payload/payload.json b/test/regression/regression_test008/payload/payload.json index fd12dd9..e0a3655 100644 --- a/test/regression/regression_test008/payload/payload.json +++ b/test/regression/regression_test008/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "ft:gpt-3.5-turbo-0613:personal::8YlS9jjv", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file diff --git a/test/regression/regression_test009/payload/payload.json b/test/regression/regression_test009/payload/payload.json index 08f222a..2d6b9a4 100644 --- a/test/regression/regression_test009/payload/payload.json +++ b/test/regression/regression_test009/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file diff --git a/test/regression/regression_test010/payload/payload.json b/test/regression/regression_test010/payload/payload.json index 5aca3dd..766f0e9 100644 --- a/test/regression/regression_test010/payload/payload.json +++ b/test/regression/regression_test010/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file diff --git a/test/regression/regression_test011/payload/payload.json b/test/regression/regression_test011/payload/payload.json index f6b775c..776ca07 100644 --- a/test/regression/regression_test011/payload/payload.json +++ b/test/regression/regression_test011/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file diff --git a/test/regression/regression_test012/payload/payload.json b/test/regression/regression_test012/payload/payload.json index 8e6e473..4346006 100644 --- a/test/regression/regression_test012/payload/payload.json +++ b/test/regression/regression_test012/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file diff --git a/test/regression/regression_test013/payload/payload.json b/test/regression/regression_test013/payload/payload.json index 725f0de..76e461a 100644 --- a/test/regression/regression_test013/payload/payload.json +++ b/test/regression/regression_test013/payload/payload.json @@ -16,5 +16,8 @@ "model": "gpt-3.5-turbo", "model_id": "ft:gpt-3.5-turbo-0613:personal::8ZmyxMfe", "temperature": 0.3, - "max_retries": 5 + "max_retries": 5, + "mongo_uri": null, + "db_name": "oridosai", + "collection_name": "apis" } \ No newline at end of file