isayahc commited on
Commit
6e8591f
1 Parent(s): f2ccb97

moved generate_uuid into the utils module and changed the import statements

Browse files
app.py CHANGED
@@ -6,6 +6,10 @@ from innovation_pathfinder_ai.source_container.container import (
6
  from innovation_pathfinder_ai.utils.utils import extract_urls
7
  from innovation_pathfinder_ai.utils import logger
8
 
 
 
 
 
9
  logger = logger.get_console_logger("app")
10
 
11
  if __name__ == "__main__":
 
6
  from innovation_pathfinder_ai.utils.utils import extract_urls
7
  from innovation_pathfinder_ai.utils import logger
8
 
9
+ from innovation_pathfinder_ai.utils.utils import (
10
+ generate_uuid
11
+ )
12
+
13
  logger = logger.get_console_logger("app")
14
 
15
  if __name__ == "__main__":
innovation_pathfinder_ai/utils/utils.py CHANGED
@@ -1,6 +1,7 @@
1
  import hashlib
2
  import datetime
3
  import os
 
4
 
5
  from innovation_pathfinder_ai.utils import logger
6
 
@@ -182,4 +183,13 @@ def create_folder_if_not_exists(folder_path: str) -> None:
182
  os.makedirs(folder_path)
183
  print(f"Folder '{folder_path}' created.")
184
  else:
185
- print(f"Folder '{folder_path}' already exists.")
 
 
 
 
 
 
 
 
 
 
1
  import hashlib
2
  import datetime
3
  import os
4
+ import uuid
5
 
6
  from innovation_pathfinder_ai.utils import logger
7
 
 
183
  os.makedirs(folder_path)
184
  print(f"Folder '{folder_path}' created.")
185
  else:
186
+ print(f"Folder '{folder_path}' already exists.")
187
+
188
+ def generate_uuid() -> str:
189
+ """
190
+ Generate a UUID (Universally Unique Identifier) and return it as a string.
191
+
192
+ Returns:
193
+ str: A UUID string.
194
+ """
195
+ return str(uuid.uuid4())
innovation_pathfinder_ai/vector_store/chroma_vector_store.py CHANGED
@@ -21,8 +21,10 @@ from langchain_community.vectorstores import Chroma
21
  from langchain_community.embeddings.sentence_transformer import (
22
  SentenceTransformerEmbeddings,
23
  )
 
 
 
24
 
25
- import uuid
26
  import dotenv
27
  import os
28
 
@@ -31,14 +33,7 @@ dotenv.load_dotenv()
31
 
32
  VECTOR_DATABASE_LOCATION = os.getenv("VECTOR_DATABASE_LOCATION")
33
 
34
- def generate_uuid() -> str:
35
- """
36
- Generate a UUID (Universally Unique Identifier) and return it as a string.
37
 
38
- Returns:
39
- str: A UUID string.
40
- """
41
- return str(uuid.uuid4())
42
 
43
  def read_markdown_file(file_path: str) -> str:
44
  """
 
21
  from langchain_community.embeddings.sentence_transformer import (
22
  SentenceTransformerEmbeddings,
23
  )
24
+ from innovation_pathfinder_ai.utils.utils import (
25
+ generate_uuid
26
+ )
27
 
 
28
  import dotenv
29
  import os
30
 
 
33
 
34
  VECTOR_DATABASE_LOCATION = os.getenv("VECTOR_DATABASE_LOCATION")
35
 
 
 
 
36
 
 
 
 
 
37
 
38
  def read_markdown_file(file_path: str) -> str:
39
  """