Rulga commited on
Commit
012d247
·
1 Parent(s): bb55c03

Refactor conversation deletion docstrings: Improve clarity and formatting of docstrings for delete_conversation_from_huggingface and delete_conversation functions.

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -803,15 +803,15 @@ def save_system_prompt(prompt_text):
803
  return f"Error saving prompt: {str(e)}"
804
 
805
  def delete_conversation_from_huggingface(conversation_id):
806
- """
807
- Delete conversation files from Hugging Face dataset by ID
808
-
809
- Args:
810
- conversation_id: ID of conversation to delete
811
-
812
- Returns:
813
- Success status (bool) and message (str)
814
- """
815
  try:
816
  from huggingface_hub import HfApi, hf_hub_download
817
  from huggingface_hub.utils import RepositoryNotFoundError, RevisionNotFoundError
@@ -879,16 +879,16 @@ def save_system_prompt(prompt_text):
879
 
880
 
881
  def delete_conversation(conversation_id, evaluator):
882
- """
883
- Delete conversation files by ID
884
-
885
- Args:
886
- conversation_id: ID of conversation to delete
887
- evaluator: ChatEvaluator instance
888
-
889
- Returns:
890
- Message about deletion status
891
- """
892
  try:
893
  if not conversation_id:
894
  return "Error: No conversation ID provided"
 
803
  return f"Error saving prompt: {str(e)}"
804
 
805
  def delete_conversation_from_huggingface(conversation_id):
806
+ """
807
+ Delete conversation files from Hugging Face dataset by ID
808
+
809
+ Args:
810
+ conversation_id: ID of conversation to delete
811
+
812
+ Returns:
813
+ Success status (bool) and message (str)
814
+ """
815
  try:
816
  from huggingface_hub import HfApi, hf_hub_download
817
  from huggingface_hub.utils import RepositoryNotFoundError, RevisionNotFoundError
 
879
 
880
 
881
  def delete_conversation(conversation_id, evaluator):
882
+ """
883
+ Delete conversation files by ID
884
+
885
+ Args:
886
+ conversation_id: ID of conversation to delete
887
+ evaluator: ChatEvaluator instance
888
+
889
+ Returns:
890
+ Message about deletion status
891
+ """
892
  try:
893
  if not conversation_id:
894
  return "Error: No conversation ID provided"