-
Notifications
You must be signed in to change notification settings - Fork 0
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
Autogen latency v2 #30
Changes from all commits
4ce6f80
6b37e1a
f4d8347
b1130ea
501384c
e19d56d
1b8f473
c0fa6bb
ca2bfe4
20d496d
f88304f
ea8bbc0
47e21fa
6b6e13a
a731160
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -47,13 +47,11 @@ def get_sys_packages(): | |||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
def get_installed_packages(): | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||
try: | ||||||||||||||||||||||||||||||||||||||||||||||||||
return { | ||||||||||||||||||||||||||||||||||||||||||||||||||
# TODO: test | ||||||||||||||||||||||||||||||||||||||||||||||||||
# TODO: add to opt out | ||||||||||||||||||||||||||||||||||||||||||||||||||
"Installed Packages": { | ||||||||||||||||||||||||||||||||||||||||||||||||||
dist.metadata["Name"]: dist.version | ||||||||||||||||||||||||||||||||||||||||||||||||||
dist.metadata.get("Name"): dist.metadata.get("Version") | ||||||||||||||||||||||||||||||||||||||||||||||||||
for dist in importlib.metadata.distributions() | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
47
to
57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ℹ️ Logic ErrorHandle None Values in MetadataThe change from def get_installed_packages():
try:
return {
"Installed Packages": {
- dist.metadata.get("Name"): dist.metadata.get("Version")
+ name: version
+ for dist in importlib.metadata.distributions()
+ if (name := dist.metadata.get("Name")) is not None
+ and (version := dist.metadata.get("Version")) is not None
}
} Commitable Code Suggestion:
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||||||||||
|
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.
Entelligence AI Bot v4
ℹ️ Performance Improvement
Optimize HTTP Requests with Class-Level Session
The introduction of a class-level session object for HTTP requests in
agentops/http_client.py
is a significant improvement. This change reduces the overhead of creating a new session for each request, enhancing performance and reliability. Ensure that the session is properly closed when no longer needed to prevent resource leaks.🔒 Security Suggestion
Secure Handling of Sensitive Information
In the
agentops/init.py
andagentops/client.py
, ensure that sensitive information such as API keys are not logged. Consider using environment variables or secure vaults to manage sensitive data securely.ℹ️ Logic Error
Clarify Default Session End State
In the
agentops/session.py
, setting the default session end state to 'Indeterminate' could lead to confusion if not properly documented or handled. Ensure that the logic for determining the session end state is robust and clearly documented to avoid misinterpretation.