-
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
Feature/configurable api base #1760
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 1689f20 in 1 minute and 38 seconds
More details
- Looked at
587
lines of code in13
files - Skipped
2
files when reviewing. - Skipped posting
5
drafted comments based on config settings.
1. py/sdk/async_client.py:126
- Draft comment:
Theset_base_url
method allows setting a custom base URL for the API, enhancing flexibility. - Reason this comment was not posted:
Confidence changes required:0%
Theset_base_url
method is added to theR2RAsyncClient
class, which allows setting a custom base URL for the API. This is a useful addition for flexibility in API endpoint configuration.
2. py/core/providers/crypto/nacl.py:95
- Draft comment:
Thegenerate_api_key
method usespk_
andsk_
prefixes forkey_id
andraw_api_key
, respectively, ensuring clear differentiation between public and secret keys. - Reason this comment was not posted:
Confidence changes required:0%
Thegenerate_api_key
method inNaClCryptoProvider
uses a prefixpk_
forkey_id
andsk_
forraw_api_key
. This is a clear and consistent way to differentiate between public and secret keys.
3. py/core/main/services/management_service.py:843
- Draft comment:
The methodsget_user_max_documents
,get_user_max_chunks
, andget_user_max_collections
check for user-specific overrides before using default values, providing flexibility in user-specific configurations. - Reason this comment was not posted:
Confidence changes required:0%
Theget_user_max_documents
,get_user_max_chunks
, andget_user_max_collections
methods inManagementService
check for user-specific overrides before falling back to default values. This provides flexibility in user-specific configurations.
4. py/core/main/services/management_service.py:871
- Draft comment:
Theget_max_upload_size_by_type
method checks for user-specific overrides for file upload sizes, providing flexibility and control over user-specific configurations. - Reason this comment was not posted:
Confidence changes required:0%
Theget_max_upload_size_by_type
method inManagementService
checks for user-specific overrides for file upload sizes, providing flexibility and control over user-specific configurations.
5. js/sdk/src/v3/clients/users.ts:470
- Draft comment:
ThecreateApiKey
,listApiKeys
, anddeleteApiKey
methods provide a clear interface for managing API keys, ensuring that only authorized users can perform these actions. - Reason this comment was not posted:
Confidence changes required:0%
ThecreateApiKey
,listApiKeys
, anddeleteApiKey
methods inUsersClient
provide a clear interface for managing API keys, ensuring that only authorized users can perform these actions.
Workflow ID: wflow_MR7hylxBRlek98Sa
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 426cb90 in 59 seconds
More details
- Looked at
301
lines of code in14
files - Skipped
1
files when reviewing. - Skipped posting
7
drafted comments based on config settings.
1. py/tests/rateLimit.bash:7
- Draft comment:
The change from HTTP 429 to HTTP 503 for rate limiting might not be appropriate. HTTP 429 is typically used for rate limiting, while HTTP 503 indicates server overload or maintenance. Ensure this change aligns with the server's intended behavior. - Reason this comment was not posted:
Comment did not seem useful.
2. py/cli/commands/config.py:74
- Draft comment:
The default base URL has been changed fromhttps://api.cloud.sciphi.ai
tohttp://localhost:7272
. Ensure this change is intentional and documented, as it affects the default configuration for users. - Reason this comment was not posted:
Comment did not seem useful.
3. py/core/base/providers/embedding.py:33
- Draft comment:
Themax_retries
for embedding requests has been reduced from 8 to 3. Ensure this change aligns with the desired reliability and robustness of the system. - Reason this comment was not posted:
Comment did not seem useful.
4. py/core/base/providers/llm.py:26
- Draft comment:
Themax_retries
for LLM requests has been reduced from 8 to 3. Ensure this change aligns with the desired reliability and robustness of the system. - Reason this comment was not posted:
Marked as duplicate.
5. js/sdk/src/baseClient.ts:157
- Draft comment:
The response type handling has been changed fromarraybuffer
toblob
. Ensure this change aligns with the intended data processing and does not introduce any issues. - Reason this comment was not posted:
Comment did not seem useful.
6. py/sdk/async_client.py:32
- Draft comment:
The default API version has been changed from v2 to v3. Ensure this change is compatible with the API endpoints and does not introduce any issues. - Reason this comment was not posted:
Comment did not seem useful.
7. py/sdk/base/base_client.py:39
- Draft comment:
The default API version has been changed from v2 to v3. Ensure this change is compatible with the API endpoints and does not introduce any issues. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_HyVnBACFZyHroWrC
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 d2338aa in 48 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_kfZ8k20LRrQL3tC6
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Important
This pull request adds API key management, enhances document handling, and improves configuration management across the system.
ApiKey
andApiKeyNoPriv
interfaces intypes.ts
.WrappedAPIKeyResponse
andWrappedAPIKeysResponse
.createApiKey
,listApiKeys
, anddeleteApiKey
methods inUsersClient
.create_document
indocuments_router.py
to check file size against user-specific limits usingget_max_upload_size_by_type
.documents_router.py
.initialize_client
incommand_group.py
to set API base URL from environment variables or config.set-api-base
command inmain.py
to store API base URL locally.--no-dev
flag fromDockerfile
for production builds.retrieval_service.py
for message processing.generate_api_key
innacl.py
to use a new prefix for key IDs.This description was created by for d2338aa. It will automatically update as commits are pushed.