Skip to content

Commit 815a8c4

Browse files
committed
removing logs and adding custome network in docker compose
1 parent 80acd1d commit 815a8c4

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

docker-compose.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ services:
1414
- "5432:5432"
1515
volumes:
1616
- db:/var/lib/postgresql/data
17+
networks:
18+
- proxynet
19+
1720
test_db:
1821
image: postgres:14.1-alpine
1922
restart: unless-stopped
@@ -22,6 +25,9 @@ services:
2225
- POSTGRES_PASSWORD=postgres
2326
ports:
2427
- "5433:5432"
28+
networks:
29+
- proxynet
30+
2531
backend:
2632
build:
2733
context: .
@@ -56,6 +62,8 @@ services:
5662
# Mount data folder to sync uploaded files
5763
- ./src/backend/data:/workspace/src/backend/data
5864
# network_mode: host
65+
networks:
66+
- proxynet
5967

6068
frontend:
6169
build:
@@ -69,6 +77,8 @@ services:
6977
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID: ${NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID}
7078
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY: ${NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY}
7179
restart: always
80+
networks:
81+
- proxynet
7282
ports:
7383
- 4000:4000
7484
develop:
@@ -85,8 +95,14 @@ services:
8595
- "8080:8080"
8696
expose:
8797
- "8080"
98+
networks:
99+
- proxynet
88100

89101
volumes:
90102
db:
91103
name: cohere_toolkit_db
92104
driver: local
105+
106+
networks:
107+
proxynet:
108+
name: custom_network

src/backend/tools/google_drive/tool.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,6 @@ async def call(self, parameters: dict, **kwargs: Any) -> List[Dict[str, Any]]:
199199
if not id_to_texts:
200200
return [{"text": ""}]
201201

202-
print("id_to_texts")
203-
print(id_to_texts)
204-
205202
"""
206203
Compass logic
207204
"""
@@ -211,7 +208,6 @@ async def call(self, parameters: dict, **kwargs: Any) -> List[Dict[str, Any]]:
211208
parameters={"index": index_name},
212209
)
213210

214-
print("heyyyyy")
215211
# handle creation/update of each file
216212
for file_id in id_to_texts:
217213
fetched_doc = None
@@ -289,7 +285,6 @@ async def call(self, parameters: dict, **kwargs: Any) -> List[Dict[str, Any]]:
289285
parameters={"index": index_name},
290286
)
291287

292-
print("hereeeeee")
293288
# fetch documents from index
294289
hits = compass.invoke(
295290
action=Compass.ValidActions.SEARCH,
@@ -299,7 +294,6 @@ async def call(self, parameters: dict, **kwargs: Any) -> List[Dict[str, Any]]:
299294
"top_k": SEARCH_LIMIT,
300295
},
301296
).result["hits"]
302-
print("post_search")
303297
chunks = [
304298
{
305299
"text": chunk["content"]["text"],
@@ -309,7 +303,5 @@ async def call(self, parameters: dict, **kwargs: Any) -> List[Dict[str, Any]]:
309303
for hit in hits
310304
for chunk in hit["chunks"]
311305
]
312-
print("chunks")
313-
print(chunks)
314306

315307
return chunks

0 commit comments

Comments
 (0)