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

langchain llamaindex callback handler #127

Merged
merged 33 commits into from
Jun 22, 2024
Merged

Conversation

csgulati09
Copy link
Collaborator

Title: Observability (Logs API)

Description:

  • Custom callbackhandler for langchain
  • Custom callbackhandler for llamaindex
  • Logger class created
  • Calling the api (v1/logs)

Motivation:
For users who just want to portkey for observability

Related Issues:
#126

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label May 6, 2024
@csgulati09 csgulati09 self-assigned this May 6, 2024
@csgulati09 csgulati09 requested a review from VisargD May 6, 2024 13:45
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey. Any reason we are commenting this file? Can we remove it if its not used?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can remove the commented lines but we ca't remove the file as a whole. It is because with the presence of init file, the entire directory is considered as a package.

self.response["body"].update({"id": event_id})
self.response["body"].update({"created": int(time.time())})
self.response["body"].update({"model": data.raw.get("model", "")})
self.response["time"] = int(responseTime * 1000)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the unit of responseTime here? seconds or ms?

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jun 8, 2024
@csgulati09 csgulati09 linked an issue Jun 8, 2024 that may be closed by this pull request
@VisargD VisargD merged commit 04483d4 into main Jun 22, 2024
5 of 6 checks passed
@VisargD VisargD deleted the feat/langchainCallbackHandler branch June 22, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:enhancement size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PythonSDK: Langchain LlamaIndex Callback Handler
2 participants