Skip to content

Commit

Permalink
removing logs and adding custome network in docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
giannis2two committed Jul 11, 2024
1 parent 80acd1d commit 815a8c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ services:
- "5432:5432"
volumes:
- db:/var/lib/postgresql/data
networks:
- proxynet

test_db:
image: postgres:14.1-alpine
restart: unless-stopped
Expand All @@ -22,6 +25,9 @@ services:
- POSTGRES_PASSWORD=postgres
ports:
- "5433:5432"
networks:
- proxynet

backend:
build:
context: .
Expand Down Expand Up @@ -56,6 +62,8 @@ services:
# Mount data folder to sync uploaded files
- ./src/backend/data:/workspace/src/backend/data
# network_mode: host
networks:
- proxynet

frontend:
build:
Expand All @@ -69,6 +77,8 @@ services:
NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID: ${NEXT_PUBLIC_GOOGLE_DRIVE_CLIENT_ID}
NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY: ${NEXT_PUBLIC_GOOGLE_DRIVE_DEVELOPER_KEY}
restart: always
networks:
- proxynet
ports:
- 4000:4000
develop:
Expand All @@ -85,8 +95,14 @@ services:
- "8080:8080"
expose:
- "8080"
networks:
- proxynet

volumes:
db:
name: cohere_toolkit_db
driver: local

networks:
proxynet:
name: custom_network
8 changes: 0 additions & 8 deletions src/backend/tools/google_drive/tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,6 @@ async def call(self, parameters: dict, **kwargs: Any) -> List[Dict[str, Any]]:
if not id_to_texts:
return [{"text": ""}]

print("id_to_texts")
print(id_to_texts)

"""
Compass logic
"""
Expand All @@ -211,7 +208,6 @@ async def call(self, parameters: dict, **kwargs: Any) -> List[Dict[str, Any]]:
parameters={"index": index_name},
)

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

print("hereeeeee")
# fetch documents from index
hits = compass.invoke(
action=Compass.ValidActions.SEARCH,
Expand All @@ -299,7 +294,6 @@ async def call(self, parameters: dict, **kwargs: Any) -> List[Dict[str, Any]]:
"top_k": SEARCH_LIMIT,
},
).result["hits"]
print("post_search")
chunks = [
{
"text": chunk["content"]["text"],
Expand All @@ -309,7 +303,5 @@ async def call(self, parameters: dict, **kwargs: Any) -> List[Dict[str, Any]]:
for hit in hits
for chunk in hit["chunks"]
]
print("chunks")
print(chunks)

return chunks

0 comments on commit 815a8c4

Please sign in to comment.