-
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
impelment summarizer annotator #15
Conversation
|
||
summarizer_prompt = """\ | ||
Generate a 1-sentence summary of the provided code. Follow conventions of docstrings: | ||
write in the imerative voice and start with a verb. Do not include any preamble or |
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.
There seems to be a typo here. The word 'imerative' should be corrected to 'imperative' to maintain professionalism in the documentation.
write in the imerative voice and start with a verb. Do not include any preamble or | ||
asides. | ||
|
||
It may be useful to name specific fucntions from the target repository (not built-in |
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.
Please correct the typo in 'fucntions' to 'functions'.
|
||
async def get_llm_response(self, document: str) -> str: | ||
if self.spice_client is None: | ||
raise RagdaemonError("Spice client is not initialized.") |
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.
The spice_client
is checked for initialization here, but never assigned in the constructor or any method of Summarizer
. This might lead to cases where spice_client remains None, causing this check to fail every time. Consider adding a method or handling to initialize spice_client
.
async def get_llm_response(self, document: str) -> str: | ||
if self.spice_client is None: | ||
raise RagdaemonError("Spice client is not initialized.") | ||
global semaphore |
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.
The use of global semaphore
inside an instance method could lead to unpredictable behavior since it's shared across all instances. Consider making semaphore an instance variable or ensure proper locking mechanisms are implemented.
MENTAT CODE REVIEW IN ACTIVE DEVELOPMENT. Only in use on mentat and internal repos. The PR adds a |
No description provided.