-
Notifications
You must be signed in to change notification settings - Fork 0
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
Initial Implementation #1
Conversation
Move existing unit tests to this repository
Refactor README.md into expected path
Add "test" extras
Add JSON schema for all models
…obally Document envvar to allow extra params
Remove bundled `schema` directory Update `build_json_schema` util to be more flexible
…t sepc) Update `node_v1` to extend base module and define `__all__` Normalize newer `lat`/`lon` refs to `latitude`/`longitude` for consistency with database Remove `verified` config options as those should not be self-reported Remove unused `brands` config spec Fix `UserProfile.from_user_object` bugs Remove top-level import helpers Add unit tests
…de other MQ message specs Define Data schemas for all node messages Move enum classes related to data schema to this module Outline repo organization in README.md
Refactor node_v1 to improve `msg_type` validation, specify `data` models for all objects, and remove models that are used only in one other model
neon_data_models/enum.py
Outdated
class Weekdays(IntEnum): | ||
""" | ||
Defines weekdays. | ||
""" | ||
MON = 0 | ||
TUE = 1 | ||
WED = 2 | ||
THU = 3 | ||
FRI = 4 | ||
SAT = 5 | ||
SUN = 6 |
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.
This may be replicating functionality available in the datetime
library, but I'd have to check to be sure...
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.
I can't find it in searching.. I only find results for DayOfWeek
in C and Java
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.
Ah, I was thinking of datetime.isoweekday()
...that's not really going to help in this scenario
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.
Might be worth moving to that eventually instead of this special enum, but that's more of an issue for the Alerts skill
|
||
|
||
class UserDbRequest(MQContext): | ||
operation: Literal["create", "read", "update", "delete"] |
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.
Not sure if you want to consider list
to be another form of read
or an entirely separate entity - I lean towards a separate entity myself but don't have strong opinions about it one way or another
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.
Possibly.. right now there isn't any functionality for bulk actions, but that would be helpful in the future
parser_data: dict | ||
transcripts: List[str] | ||
skills_recv: bool |
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.
I like the description fields in KlatResponse
- is there an intention to include those everywhere eventually?
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.
Ideally, yes. It's just time consuming so I started with things that are ambiguous without them (describing dict keys, bcp-47 vs iso lang codes, etc)
username: str | ||
data_to_remove: List[UserData] | ||
|
||
msg_type: Literal["neon.clear_data"] = "neon.clear_data" |
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.
Is there a way to annotate the entire class with a description? I've never run into this message type before and am now curious what it actually does
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.
I believe docstrings are rendered in swagger, but I'm not sure if that's technically part of the json schema
""" | ||
Defines configuration used in BrainForge LLM applications. | ||
""" | ||
inference_access: Dict[str, Dict[str, List[str]]] = {} |
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.
Not sure this default meets the type, technically? But I assume over time this will be more strictly defined
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.
I think an empty dict technically satisfies the schema, but you are correct that this is still yet to be implemented/fully-defined
…r networking parameters
Add api.mq module import for consistency
Description
Define high-level structure of grouping models into (
api
,base
,client
,user
,messagebus
)Consolidate existing models and add unit test coverage
Defines User Database schema and method for adapting to existing NeonCore schema
Defines base Message schema, including
context
Defines
__all__
in modules soimport *
can be used to import all Pydantic models from a module without also pulling extraneous imports (i.e.datetime
which can cause confusion if bothdatetime
anddatetime.datetime
are imported asdatetime
)Issues
Other Notes
Message
schemas here, but this will require planning for how to organize - Messages as well as how much to enforce structure on what is currently a very unstructured system.util
module will be extended to generate some browsable registry that may be included in documentation