-
Notifications
You must be signed in to change notification settings - Fork 904
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 dialog entries summarization #496
base: dev
Are you sure you want to change the base?
Conversation
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.
❌ Changes requested. Reviewed everything up to c07987a in 45 seconds
More details
- Looked at
298
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. agents-api/agents_api/models/entry/entries_summarization.py:79
- Draft comment:
The docstring mentions returning apd.DataFrame
, but the function actually returns a tuple of a query string and a dictionary. Please update the docstring to reflect the actual return type. - Reason this comment was not posted:
Marked as duplicate.
2. agents-api/agents_api/activities/summarization.py:74
- Draft comment:
The loop variableidx
is incorrectly used in the UUID conversion. It should beentries[idx - 1]["entry_id"]
instead ofentries[idx - 1]["entry_id"]
. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment seems to be pointing out a potential off-by-one error, but the code usesidx - 1
, which is a typical way to access the previous element in a list. Without additional context or evidence of an error, the comment seems speculative. The code appears to be intentional in its use ofidx - 1
.
I might be overlooking a specific context whereidx - 1
could lead to an error, such as whenidx
is 0. However, the code seems to be part of a loop oversummarized
, which likely has a corresponding structure that ensuresidx
is never 0 when this line is executed.
The code should be reviewed in the context of the entire function to ensure thatidx
is never 0 when this line is executed. If the loop is correctly structured, the comment is unnecessary.
The comment is speculative and does not provide clear evidence of an error. The code appears to be intentional in its use ofidx - 1
. The comment should be removed.
Workflow ID: wflow_3stuniuqsZijkkYS
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
- session_id (UUID): The unique identifier for the session. | ||
|
||
Returns: | ||
- pd.DataFrame: A DataFrame containing the queried top-level entries. |
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 docstring mentions returning a pd.DataFrame
, but the function actually returns a tuple of a query string and a dictionary. Please update the docstring to reflect the actual return type.
get_entities(entries, model=summarization_model_name), | ||
) | ||
trimmed_messages = await trim_messages(summarized, model=summarization_model_name) | ||
ts_delta = (entries[1]["timestamp"] - entries[0]["timestamp"]) / 2 |
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.
Ensure entries
has at least two elements before calculating ts_delta
to avoid potential IndexError
.
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.
❌ Changes requested. Incremental review on df7d6bc in 38 seconds
More details
- Looked at
141
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/activities/truncation.py:24
- Draft comment:
Consider breaking the loop once the token count threshold is reached to avoid unnecessary iterations.
break
- Reason this comment was not posted:
Confidence changes required:50%
Theget_extra_entries
function appends entries to the result list when the token count exceeds the threshold. However, it should break the loop once the threshold is reached to avoid unnecessary iterations.
Workflow ID: wflow_fvkBrCCzwpWZN8mu
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
|
||
|
||
def get_extra_entries(messages: list[Entry], token_count_threshold: int) -> list[UUID]: | ||
raise NotImplementedError() | ||
result: list[UUID] = [] | ||
|
||
if not len(messages): | ||
return messages |
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 function get_extra_entries
should return an empty list of UUIDs instead of messages
when messages
is empty.
async def truncation(session_id: str, token_count_threshold: int) -> None: | ||
async def truncation( | ||
developer_id: str, session_id: str, token_count_threshold: int | ||
) -> None: | ||
session_id = UUID(session_id) |
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.
Consider adding error handling for UUID conversion to handle invalid UUID strings gracefully.
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.
❌ Changes requested. Incremental review on f62b092 in 28 seconds
More details
- Looked at
110
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/routers/sessions/chat.py:108
- Draft comment:
The comment about setting a value for streaming response is misleading since theelse
block raises an error. Consider clarifying or removing it. - Reason this comment was not posted:
Confidence changes required:50%
Theelse
block for context overflow handling raises an error if the prompt is too big. However, the comment mentions setting a value for streaming response, which is not implemented. This might cause confusion.
Workflow ID: wflow_x69S7IaYpsnlChQL
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -97,13 +94,23 @@ async def chat( | |||
) | |||
|
|||
# Adaptive context handling | |||
jobs = [] | |||
job_id = uuid4() | |||
if chat_context.session.context_overflow == "adaptive": |
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.
Consider adding run_summarization_task
and run_truncation_task
to background_tasks
to avoid blocking the chat function.
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.
❌ Changes requested. Incremental review on 14a1a01 in 25 seconds
More details
- Looked at
49
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_as923u7hZtUZgU6x
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
chat_context.session.token_budget is not None | ||
and total_tokens >= chat_context.session.token_budget | ||
): | ||
job_id = uuid4() |
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.
job_id
might be undefined if the token budget condition is not met. Consider initializing job_id
before the conditional block.
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.
❌ Changes requested. Incremental review on f8ce313 in 23 seconds
More details
- Looked at
30
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_9L5FLFRZrOLUQioy
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -21,14 +21,9 @@ async def create_or_update_session( | |||
x_developer_id: Annotated[UUID4, Depends(get_developer_id)], | |||
session_id: UUID, | |||
data: CreateOrUpdateSessionRequest, | |||
) -> ResourceCreatedResponse: | |||
session = create_session_query( | |||
) -> ResourceUpdatedResponse: |
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 return type is ResourceUpdatedResponse, but the status code is HTTP_201_CREATED. Consider changing the status code to HTTP_200_OK for updates.
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.
👍 Looks good to me! Incremental review on 6db5e4c in 1 minute and 3 seconds
More details
- Looked at
20
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/common/protocol/sessions.py:101
- Draft comment:
The try-except block forStopIteration
is correctly implemented to handle cases where no toolset matches the active agent. This prevents runtime errors and is a good practice. - Reason this comment was not posted:
Confidence changes required:0%
The try-except block for StopIteration is correctly implemented to handle cases where no toolset matches the active agent. This is a good practice to prevent runtime errors.
Workflow ID: wflow_I3ngT0n8CT96lEbf
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 9118d86 in 20 seconds
More details
- Looked at
29
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/routers/sessions/chat.py:73
- Draft comment:
The change fromtools
totools or None
ensures thatNone
is passed instead of an empty list, which is a good practice for handling optional parameters. - Reason this comment was not posted:
Confidence changes required:0%
The change fromtools
totools or None
is a good practice to ensure that the function receivesNone
instead of an empty list, which might be handled differently by theacompletion
function. This change is correct and improves the robustness of the code.
Workflow ID: wflow_1tTq1JRojOUN6KYa
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on 38421e3 in 33 seconds
More details
- Looked at
18
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_i8wRZNe0o9UvEIbC
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
if isinstance(model_response, ModelResponse): | ||
total_tokens = model_response.usage.total_tokens | ||
|
||
job_id = uuid4() |
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 job_id
is being generated twice, once before the if condition and once inside the condition. This is unnecessary. Generate job_id
only when needed inside the if condition.
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.
❌ Changes requested. Incremental review on 981a14d in 16 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_zK4RgWKZMtJeY6A6
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -21,6 +21,8 @@ async def acompletion( | |||
supported_params = get_supported_openai_params(model) | |||
settings = {k: v for k, v in kwargs.items() if k in supported_params} | |||
|
|||
print("+++>", settings) |
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.
Remove the print statement used for debugging purposes to avoid unnecessary console output in production.
981a14d
to
19b15e0
Compare
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.
❌ Changes requested. Incremental review on 19b15e0 in 16 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_psSZrXs5NFoxV4c8
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@@ -21,6 +21,8 @@ async def acompletion( | |||
supported_params = get_supported_openai_params(model) | |||
settings = {k: v for k, v in kwargs.items() if k in supported_params} | |||
|
|||
print("+++>", settings) |
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.
Debug print statements should be removed or replaced with proper logging before merging to production code.
19b15e0
to
1b3e5dd
Compare
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.
👍 Looks good to me! Incremental review on 151c2fb in 15 seconds
More details
- Looked at
30
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/routers/sessions/chat.py:1
- Draft comment:
The use ofsuppress(KeyError)
in the loop is not optimal. Consider checking if 'created_at' exists inm
before attempting to delete it to avoid unnecessary exception handling overhead. - Reason this comment was not posted:
Confidence changes required:50%
The import statement for 'suppress' is used correctly, but the usage in the code is not optimal.
Workflow ID: wflow_EmBTOQT05jcpyQR2
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on a8b8e45 in 16 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/routers/sessions/chat.py:73
- Draft comment:
Consider usingm.pop("id", None)
instead ofwith suppress(KeyError): del m["id"]
for better performance and readability. This applies to the deletion of"created_at"
as well. - Reason this comment was not posted:
Confidence changes required:50%
The code suppresses KeyError when deleting keys from a dictionary. This is a good practice to avoid runtime errors if the key does not exist. However, it would be more efficient to use the dictionary's pop method with a default value, which is more idiomatic and slightly faster.
Workflow ID: wflow_37kn6qoPQ2HFUcYL
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
a8b8e45
to
1847be2
Compare
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.
👍 Looks good to me! Incremental review on 1847be2 in 13 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/routers/sessions/chat.py:73
- Draft comment:
Consider using thepop
method with a default value to remove keys from the dictionary. This can make the code cleaner and avoid the need forsuppress
.
m.pop("created_at", None)
m.pop("id", None)
- Reason this comment was not posted:
Confidence changes required:50%
The code suppresses KeyError when deleting keys from a dictionary. This is a good practice to avoid runtime errors if the key doesn't exist. However, it would be more efficient to use the dictionary's pop method with a default value to achieve the same result without the need for suppress.
Workflow ID: wflow_o5Kj44feRqSzC7fn
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 13f528e in 24 seconds
More details
- Looked at
22
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/clients/temporal.py:80
- Draft comment:
The change fromexecute_workflow
tostart_workflow
is correct, but the PR description should mention why this change was made. It seems like a change in the way workflows are initiated, possibly to allow for more asynchronous handling or to avoid blocking. However, the description does not clarify this. - Reason this comment was not posted:
Confidence changes required:50%
The change fromexecute_workflow
tostart_workflow
is correct, but the PR description should mention why this change was made. It seems like a change in the way workflows are initiated, possibly to allow for more asynchronous handling or to avoid blocking. However, the description does not clarify this.
Workflow ID: wflow_I7xmeAPfhb3xj3sa
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
13f528e
to
f1f55b3
Compare
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.
👍 Looks good to me! Incremental review on f1f55b3 in 26 seconds
More details
- Looked at
34
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/clients/temporal.py:78
- Draft comment:
Consider moving the import statement forTruncationWorkflow
to the top of the file to follow best practices for import organization. This applies to the import on line 91 as well. - Reason this comment was not posted:
Confidence changes required:50%
The import statements forTruncationWorkflow
andSummarizationWorkflow
should be at the top of the file to follow best practices for import organization. This also applies to other similar imports in the file.
Workflow ID: wflow_FvTerXHH0CAUL8hf
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
f1f55b3
to
a7ec9d5
Compare
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.
👍 Looks good to me! Incremental review on a7ec9d5 in 19 seconds
More details
- Looked at
34
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. agents-api/agents_api/clients/temporal.py:78
- Draft comment:
Consider moving the import statement forTruncationWorkflow
to the top of the file for better readability and to follow Python's best practices. - Reason this comment was not posted:
Confidence changes required:50%
The import statements forTruncationWorkflow
andSummarizationWorkflow
should be at the top of the file for better readability and to follow Python's best practices.
2. agents-api/agents_api/clients/temporal.py:91
- Draft comment:
Consider moving the import statement forSummarizationWorkflow
to the top of the file for better readability and to follow Python's best practices. - Reason this comment was not posted:
Confidence changes required:50%
The import statements forTruncationWorkflow
andSummarizationWorkflow
should be at the top of the file for better readability and to follow Python's best practices.
Workflow ID: wflow_i5c6ShjdAFj4Yowa
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
a7ec9d5
to
2e9b2a3
Compare
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.
❌ Changes requested. Incremental review on 2e9b2a3 in 18 seconds
More details
- Looked at
34
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_jEV9k8IFZU2rhr5y
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
async def run_truncation_task( | ||
token_count_threshold: int, developer_id: UUID, session_id: UUID, job_id: UUID | ||
): | ||
from ..workflows.truncation import TruncationWorkflow |
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.
Consider moving the import statement for TruncationWorkflow
to the top of the file to avoid repeated imports every time the function is called, which can affect performance. This applies to the import in run_summarization_task
as well.
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.
👍 Looks good to me! Incremental review on 9574110 in 46 seconds
More details
- Looked at
21
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/activities/truncation.py:43
- Draft comment:
Ensure that theEntry
class acceptsid
as a parameter. If it expectsentry_id
, changeid=row["entry_id"]
toentry_id=row["entry_id"]
. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is speculative as it asks to ensure something without strong evidence of an issue. The change in the parameter name could be intentional and correct. Without evidence that theEntry
class does not acceptid
, the comment does not meet the criteria for being kept.
I might be missing the context of theEntry
class definition, which could clarify whetherid
is a valid parameter. However, the comment does not provide evidence of an issue, making it speculative.
Even if theEntry
class definition is not visible, the comment should provide evidence of an issue rather than speculate. Without such evidence, the comment is not useful.
Delete the comment as it is speculative and does not provide strong evidence of an issue.
Workflow ID: wflow_YSb7JxUEMPvBJP81
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on dd517e3 in 35 seconds
More details
- Looked at
65
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. agents-api/agents_api/activities/summarization.py:53
- Draft comment:
Thetokenizer
field is currently empty. Ensure to set it to the appropriate tokenizer used for calculatingtoken_count
. - Reason this comment was not posted:
Marked as duplicate.
2. agents-api/agents_api/activities/summarization.py:41
- Draft comment:
Ensure there are at least two entries before calculatingts_delta
to avoid potential errors. - Reason this comment was not posted:
Comment was on unchanged code.
3. agents-api/agents_api/routers/sessions/chat.py:87
- Draft comment:
Remove unnecessary whitespace on this line for better readability. - Reason this comment was not posted:
Confidence changes required:10%
Thechat.py
file has unnecessary whitespace on line 87. Removing it will improve code readability.
4. agents-api/agents_api/routers/tasks/update_execution.py:37
- Draft comment:
Remove unnecessary newline for better readability. - Reason this comment was not posted:
Confidence changes required:10%
Theupdate_execution.py
file has an unnecessary newline on line 37. Removing it will improve code readability.
Workflow ID: wflow_HAzQQjALlOdAskQR
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
name="entities", | ||
content=entities["content"], | ||
timestamp=entries[0]["timestamp"] + ts_delta, | ||
token_count=sum([len(c) // 3.5 for c in entities["content"]]), |
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 token_count
calculation using len(c) // 3.5
is an approximation and may not be accurate. Consider using a tokenizer to get the exact token count.
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.
👍 Looks good to me! Incremental review on 979636b in 38 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/models/entry/entries_summarization.py:99
- Draft comment:
The change fromnew_entry.created_at
tonew_entry.created_at.isoformat()
ensures consistent datetime format in the database, which is a good practice. - Reason this comment was not posted:
Confidence changes required:0%
The change fromnew_entry.created_at
tonew_entry.created_at.isoformat()
is correct for ensuring consistent datetime format in the database.
Workflow ID: wflow_efUK7bd968rJLq3j
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 9df467b in 26 seconds
More details
- Looked at
28
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. agents-api/agents_api/models/entry/entries_summarization.py:99
- Draft comment:
Thecreated_at
field is removed from theentries_summarization_query
, but it is still present in theget_toplevel_entries_query
. Ensure consistency across queries ifcreated_at
is not needed. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment highlights a potential inconsistency between two queries in the same file. Since the 'created_at' field was removed from one query but not the other, it could indicate a need for consistency. This is a valid point as it directly relates to the changes made in the diff.
The comment assumes that consistency is required between the two queries without knowing the specific requirements or context of each query. It's possible that the removal of 'created_at' is intentional and context-specific.
While the removal might be intentional, the comment is still valid as it points out a potential inconsistency that should be reviewed. It's better to ensure that such changes are deliberate and documented.
The comment should be kept as it highlights a potential inconsistency in the code changes that may require further review.
Workflow ID: wflow_OOMD4W0wXg05pvJL
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
❌ Changes requested. Incremental review on fa5b52d in 19 seconds
More details
- Looked at
26
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_2aSNx3ae5YmCpYDL
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
name="information", | ||
content=content, | ||
timestamp=entries[-1]["timestamp"] + 0.01, | ||
token_count=sum([len(c) // 3.5 for c in content]), |
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 token count calculation using len(c) // 3.5
is a rough estimate and may not be accurate. Consider using a tokenizer to calculate the token count more precisely. Also, ensure the tokenizer
field is set appropriately.
feat: Add dialog entries summarization and update truncation logic
Summary:
Enhance dialog entries summarization and update truncation logic for improved chat session management.
Key points:
summarization()
usingsummarize_messages
,get_entities
, andtrim_messages
insummarization.py
. Addentries_summarization_query
andget_toplevel_entries_query
inentries_summarization.py
.truncation()
intruncation.py
to delete entries based on token count. Addget_extra_entries
function intruncation.py
.TruncationWorkflow
intruncation.py
to includedeveloper_id
. Addrun_truncation_task
andrun_summarization_task
intemporal.py
.chat.py
to handle context overflow and raisePromptTooBigError
.create_or_update_session.py
toResourceUpdatedResponse
. Add debug print inlitellm.py
.Generated with ❤️ by ellipsis.dev