about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander_Kabui2024-05-16 14:25:44 +0300
committerAlexander_Kabui2024-05-16 14:25:44 +0300
commita5a6e319e85c28ff3ab9d6f2d8a869bc2ac77ac8 (patch)
treed5747acbfb2dd87334e47684b0edec6c23945905
parentf911db6b69b16ac5df57b27d213fa88a4c848f50 (diff)
downloadgenenetwork3-a5a6e319e85c28ff3ab9d6f2d8a869bc2ac77ac8.tar.gz
Delete function: only useful when training own llm model.
-rw-r--r--gn3/llms/process.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/gn3/llms/process.py b/gn3/llms/process.py
index 1881e92..e47a997 100644
--- a/gn3/llms/process.py
+++ b/gn3/llms/process.py
@@ -83,26 +83,6 @@ def parse_context(context, get_info_func, format_bib_func):
     return results
 
 
-def rate_document(task_id, doc_id, rating, auth_token):
-    """This method is used to provide
-    feedback for a document by making a rating
-    """
-    try:
-        url = urljoin(BASE_URL,
-                      f"""/feedback?task_id={task_id}&document_id={doc_id}&feedback={rating}""")
-        headers = {"Authorization": f"Bearer {auth_token}"}
-
-        resp = requests.post(url, headers=headers)
-        resp.raise_for_status()
-
-        return {"status": "success", **resp.json()}
-    except requests.exceptions.HTTPError as http_error:
-        raise RuntimeError(f"HTTP Error Occurred:\
-            {http_error.response.text} -with status code- {http_error.response.status_code}") from http_error
-    except Exception as error:
-        raise RuntimeError(f"An error occurred: {str(error)}") from error
-
-
 def load_file(filename, dir_path):
     """function to open and load json file"""
     file_path = os.path.join(dir_path, f"{filename}")