-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moves extension field names into constants file (#225)
Cache, session, and router classes and their corresponding schema fields are hard coded. Since they must match between class and schema and not be modified they're moved to a constants file.
- Loading branch information
1 parent
951d630
commit 51e58aa
Showing
10 changed files
with
191 additions
and
131 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
""" | ||
Constants used within the extension classes SemanticCache, BaseSessionManager, | ||
StandardSessionManager,SemanticSessionManager and SemanticRouter. | ||
These constants are also used within theses classes corresponding schema. | ||
""" | ||
|
||
# BaseSessionManager | ||
ID_FIELD_NAME: str = "entry_id" | ||
ROLE_FIELD_NAME: str = "role" | ||
CONTENT_FIELD_NAME: str = "content" | ||
TOOL_FIELD_NAME: str = "tool_call_id" | ||
TIMESTAMP_FIELD_NAME: str = "timestamp" | ||
SESSION_FIELD_NAME: str = "session_tag" | ||
|
||
# SemanticSessionManager | ||
SESSION_VECTOR_FIELD_NAME: str = "vector_field" | ||
|
||
# SemanticCache | ||
REDIS_KEY_FIELD_NAME: str = "key" | ||
ENTRY_ID_FIELD_NAME: str = "entry_id" | ||
PROMPT_FIELD_NAME: str = "prompt" | ||
RESPONSE_FIELD_NAME: str = "response" | ||
CACHE_VECTOR_FIELD_NAME: str = "prompt_vector" | ||
INSERTED_AT_FIELD_NAME: str = "inserted_at" | ||
UPDATED_AT_FIELD_NAME: str = "updated_at" | ||
METADATA_FIELD_NAME: str = "metadata" | ||
|
||
# SemanticRouter | ||
ROUTE_VECTOR_FIELD_NAME: str = "vector" |
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
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
Oops, something went wrong.