Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added LLM traces feature! #45

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions dags/hivemind_etl.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from hivemind_etl_helpers.src.utils.get_mongo_discord_communities import (
get_all_discord_communities,
)
from traceloop.sdk import Traceloop

# def setup_phonix():
# _ = px.launch_app()
Expand All @@ -54,6 +55,7 @@ def get_discord_communities() -> list[str]:
"""
Getting all communities having discord from database
"""
setup_traceloop()
communities = get_all_discord_communities()
return communities

Expand Down Expand Up @@ -82,6 +84,7 @@ def get_mongo_discord_communities() -> list[str]:
this function is the same with `get_discord_communities`
we just changed the name for the pylint
"""
setup_traceloop()
communities = get_all_discord_communities()
return communities

Expand All @@ -94,3 +97,7 @@ def start_discord_summary_vectorstore(community_id: str):

communities = get_mongo_discord_communities()
start_discord_summary_vectorstore.expand(community_id=communities)


def setup_traceloop():
Traceloop.init()
1 change: 1 addition & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ services:
- EMBEDDING_DIM=1024
- OPENAI_API_KEY=some_credentials
- COHERE_API_KEY=some_credentials
- TRACELOOP_BASE_URL=some_url
volumes:
- ./coverage:/project/coverage
depends_on:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ coverage>=7.3.3, <8.0.0
pytest>=7.4.3, <8.0.0
python-dotenv>=1.0.0, <2.0.0
tc-hivemind-backend==1.1.1
traceloop-sdk