-
Notifications
You must be signed in to change notification settings - Fork 61
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: add tracing to main #367
Conversation
del session["history"] | ||
base_history = self.get_base_history(session) | ||
session["history"] = [base_history] | ||
history = self.parse_messages(session["history"]) | ||
user_session.reset_memory(history) | ||
|
||
# clear session traces | ||
del self._user_traces[uuid] | ||
tool_trace = ToolTrace() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to hang on to ToolTrace if it's used by tools?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ToolTrace is connected to each user session (to prevent it from sending the wrong tooltrace to another user. (it is similar to _user_sessions. There is another way to do this by initializing it and hanging on to it within UserAgent. What do you think about that?
if response_json.get("trace"): | ||
tool_trace.add_message(response_json.get("trace")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if response_json.get("trace"): | |
tool_trace.add_message(response_json.get("trace")) | |
trace = response_json.get("trace") | |
if trace: | |
tool_trace.add_message(trace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to validate trace is in the right format somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"trace" are build in retrieval service/app/routes.py (src code is in: retrieval_service/helpers/helpers.py) before sending it back to the UI.
55a31cb
to
96c5336
Compare
Add tracing to main. This PR add tracing for postgres.py provider and langchain orchestration.