Fallou Diagne commited on
Commit
61433d9
·
1 Parent(s): c3fec4f

modified app

Browse files
Files changed (1) hide show
  1. app.py +1 -28
app.py CHANGED
@@ -1,12 +1,9 @@
1
  import asyncio
2
- from minio import Minio
3
- from minio.error import S3Error
4
  from datetime import timedelta
5
  from agno.agent import Agent
6
  from agno.knowledge.pdf import PDFKnowledgeBase, PDFReader
7
  from agno.vectordb.qdrant import Qdrant
8
  from agno.storage.redis import RedisStorage
9
- from agno.memory.v2.db.redis import RedisMemoryDb
10
  from agno.memory.v2.memory import Memory
11
  from agno.document.chunking.agentic import AgenticChunking
12
  from agno.models.openai import OpenAIChat
@@ -28,17 +25,7 @@ from dotenv import load_dotenv
28
  load_dotenv()
29
 
30
 
31
- """
32
- # Configuration MinIO
33
- client = Minio(
34
- os.getenv("ENDPOINT"),
35
- access_key=os.getenv("ACCESS_KEY"),
36
- secret_key=os.getenv("SECRET_KEY"),
37
- secure=False
38
- )
39
-
40
- bucket_name = "iachatbotbocs"
41
- """
42
  # Initialisation Qdrant
43
  vector_db = Qdrant(
44
  collection="directives_16J",
@@ -46,20 +33,6 @@ vector_db = Qdrant(
46
  api_key=os.getenv("QDRANT_API_KEY")
47
  )
48
 
49
- # Initialize Redis storage with default local connection
50
- storage = RedisStorage(
51
- prefix="agno_test_directive", # Prefix for Redis keys to namespace the sessions
52
- host="localhost", # Redis host address
53
- port=6379, # Redis port number
54
- )
55
- # Create memory storage
56
- memory_db = RedisMemoryDb(
57
- prefix="agno_test_directive",
58
- host="localhost",
59
- port=6379,
60
- )
61
- memory = Memory(db=memory_db)
62
-
63
 
64
  # Charger tous les PDF du dossier dans la base de connaissance
65
  knowledge_base = PDFKnowledgeBase(
 
1
  import asyncio
 
 
2
  from datetime import timedelta
3
  from agno.agent import Agent
4
  from agno.knowledge.pdf import PDFKnowledgeBase, PDFReader
5
  from agno.vectordb.qdrant import Qdrant
6
  from agno.storage.redis import RedisStorage
 
7
  from agno.memory.v2.memory import Memory
8
  from agno.document.chunking.agentic import AgenticChunking
9
  from agno.models.openai import OpenAIChat
 
25
  load_dotenv()
26
 
27
 
28
+
 
 
 
 
 
 
 
 
 
 
29
  # Initialisation Qdrant
30
  vector_db = Qdrant(
31
  collection="directives_16J",
 
33
  api_key=os.getenv("QDRANT_API_KEY")
34
  )
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
 
37
  # Charger tous les PDF du dossier dans la base de connaissance
38
  knowledge_base = PDFKnowledgeBase(