Omnibus commited on
Commit
ce35d72
1 Parent(s): 60f241a

Update agi.py

Browse files
Files changed (1) hide show
  1. agi.py +3 -2
agi.py CHANGED
@@ -173,9 +173,10 @@ def call_read(purpose, task, history, directory, action_input,repo_name,hf_token
173
 
174
  def call_modify(purpose, task, history, directory, action_input,repo_name,hf_token):
175
  #action_input1=f"https://huggingface.co/spaces/{repo_name}/raw/main/{action_input.split('./',1)[1]}"
176
-
 
177
  print (f'ACTION INPUT: {action_input}')
178
- if not os.path.exists(f'{action_input}'):
179
  history += "observation: file does not exist\n"
180
  return "MAIN", None, history, task
181
  (
 
173
 
174
  def call_modify(purpose, task, history, directory, action_input,repo_name,hf_token):
175
  #action_input1=f"https://huggingface.co/spaces/{repo_name}/raw/main/{action_input.split('./',1)[1]}"
176
+ if "'" in action_input:
177
+ action_input.strip("'")
178
  print (f'ACTION INPUT: {action_input}')
179
+ if not os.path.exists(f"{action_input}"):
180
  history += "observation: file does not exist\n"
181
  return "MAIN", None, history, task
182
  (