-
Notifications
You must be signed in to change notification settings - Fork 319
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
Allow setting conversation name in conversation.create #1717
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.
👍 Looks good to me! Reviewed everything up to 58ee771 in 24 seconds
More details
- Looked at
332
lines of code in9
files - Skipped
0
files when reviewing. - Skipped posting
4
drafted comments based on config settings.
1. js/sdk/__tests__/ConversationsIntegrationSuperUser.test.ts:42
- Draft comment:
Consider checking for an empty string instead of null when verifying the conversation name, as the API might return an empty string for an unset name. - Reason this comment was not posted:
Confidence changes required:50%
The test for creating a conversation without a name should check for an empty string instead of null, as the API might return an empty string for an unset name.
2. js/sdk/src/v3/clients/conversations.ts:24
- Draft comment:
Good use of conditional spread operator to include the name in the data object only if it is defined. - Reason this comment was not posted:
Confidence changes required:0%
Thecreate_conversation
method in theConversationsClient
class uses a conditional spread operator to include the name in the data object. This is a good practice to ensure that only defined values are included in the request payload.
3. py/core/database/conversations.py:68
- Draft comment:
Good use of try-except block to handle exceptions and raise an HTTPException with a detailed error message. - Reason this comment was not posted:
Confidence changes required:0%
Thecreate_conversation
method in thePostgresConversationsHandler
class now includes a try-except block to handle exceptions and raise an HTTPException with a detailed error message. This is a good practice for error handling.
4. py/core/main/api/v3/conversations_router.py:90
- Draft comment:
Thecreate_conversation
endpoint now accepts aname
parameter, aligning with the new feature of setting a conversation name during creation. - Reason this comment was not posted:
Confidence changes required:0%
Thecreate_conversation
endpoint in theConversationsRouter
class now accepts aname
parameter in the request body. This change aligns with the new feature of setting a conversation name during creation.
Workflow ID: wflow_WGnYUhZVNwjSOjAO
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 0127711 in 44 seconds
More details
- Looked at
414
lines of code in6
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. js/sdk/src/v3/clients/conversations.ts:86
- Draft comment:
Consider using PUT or PATCH for updating resources instead of POST for better RESTful API practices. - Reason this comment was not posted:
Confidence changes required:50%
Theupdate
method inconversations.ts
uses a POST request to update a conversation, which is unconventional. Typically, PUT or PATCH is used for updates. This might be intentional, but it's worth noting for consistency and clarity.
2. py/core/main/api/v3/conversations_router.py:280
- Draft comment:
Consider using PUT or PATCH for updating resources instead of POST for better RESTful API practices. - Reason this comment was not posted:
Confidence changes required:50%
Theupdate_conversation
function inconversations_router.py
uses a POST request to update a conversation, which is unconventional. Typically, PUT or PATCH is used for updates. This might be intentional, but it's worth noting for consistency and clarity.
Workflow ID: wflow_uopwY5Hah3eHw0cO
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.
) | ||
return conversation | ||
|
||
@self.router.post( | ||
"/conversations/{id}", | ||
summary="Delete 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.
The summary for the update_conversation
endpoint is incorrect. It should be 'Update conversation' instead of 'Delete 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. Incremental review on ce435a8 in 42 seconds
More details
- Looked at
17
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
0
drafted comments based on config settings.
Workflow ID: wflow_FCmgCOoHhZ2ZCNSI
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.
"lang": "cURL", | ||
"source": textwrap.dedent( | ||
""" | ||
curl -X POST "https://api.example.com/v3/conversations/123e4567-e89b-12d3-a456-426614174000" \ |
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 cURL example for updating a conversation should use the PUT method instead of POST for clarity and consistency with typical RESTful practices.
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 b66a0eb in 21 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. py/core/main/api/v3/conversations_router.py:282
- Draft comment:
Ensure that the CLI code sample reflects the update operation instead of delete. - Reason this comment was not posted:
Comment did not seem useful.
Workflow ID: wflow_bGcELPIUJRnxnLzw
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
Add support for setting and updating conversation names in creation and update operations across backend and frontend.
conversations.create()
andconversations.update()
inconversations.ts
andconversations.py
.create_conversation
andupdate_conversation
endpoints inconversations_router.py
to accept aname
parameter.create_conversation
andupdate_conversation
inconversations.py
to handlename
and raiseHTTPException
on failure.ConversationsIntegrationSuperUser.test.ts
.bcrypt.py
andasync_client.py
.This description was created by for b66a0eb. It will automatically update as commits are pushed.