Omkar008 commited on
Commit
393a668
1 Parent(s): 4b9422e

Update services/utils.py

Browse files
Files changed (1) hide show
  1. services/utils.py +2 -2
services/utils.py CHANGED
@@ -18,7 +18,7 @@ import re
18
  import json
19
  from typing import Optional
20
  import tiktoken
21
-
22
 
23
 
24
  #Setting the openai api key
@@ -82,7 +82,7 @@ def strcuture_document_data(raw_text:str)->dict:
82
  with get_openai_callback() as cb:
83
  result = model.invoke(input.to_string())
84
 
85
-
86
  print(f"GPT Response {result}")
87
  # result = extract_json_from_string(result)
88
  # print(f"Formatted Response : {result}")
 
18
  import json
19
  from typing import Optional
20
  import tiktoken
21
+ import time
22
 
23
 
24
  #Setting the openai api key
 
82
  with get_openai_callback() as cb:
83
  result = model.invoke(input.to_string())
84
 
85
+ time.sleep(0.25)
86
  print(f"GPT Response {result}")
87
  # result = extract_json_from_string(result)
88
  # print(f"Formatted Response : {result}")