-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ada81a6
commit c7dd6c6
Showing
8 changed files
with
128 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ | |
|
||
from onyx.auth.schemas import UserRole | ||
from onyx.configs.constants import KV_NO_AUTH_USER_PREFERENCES_KEY | ||
from onyx.configs.constants import NO_AUTH_USER_EMAIL | ||
from onyx.configs.constants import NO_AUTH_USER_ID | ||
from onyx.key_value_store.store import KeyValueStore | ||
from onyx.key_value_store.store import KvKeyNotFoundError | ||
from onyx.server.manage.models import UserInfo | ||
|
@@ -30,8 +32,8 @@ def load_no_auth_user_preferences(store: KeyValueStore) -> UserPreferences: | |
|
||
def fetch_no_auth_user(store: KeyValueStore) -> UserInfo: | ||
return UserInfo( | ||
id="__no_auth_user__", | ||
email="[email protected]", | ||
id=NO_AUTH_USER_ID, | ||
email=NO_AUTH_USER_EMAIL, | ||
is_active=True, | ||
is_superuser=False, | ||
is_verified=True, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,9 @@ | |
DEFAULT_BOOST = 0 | ||
SESSION_KEY = "session" | ||
|
||
NO_AUTH_USER_ID = "__no_auth_user__" | ||
NO_AUTH_USER_EMAIL = "[email protected]" | ||
|
||
# For chunking/processing chunks | ||
RETURN_SEPARATOR = "\n\r\n" | ||
SECTION_SEPARATOR = "\n\n" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters