-
Notifications
You must be signed in to change notification settings - Fork 0
Initial Implementation #1
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
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
| 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
# Changelog ## [0.0.0a11](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a11) (2025-02-07) [Full Changelog](0.0.0a10...0.0.0a11) **Implemented enhancements:** - \[FEAT\] Skip system prompt if `persona=None` [\#9](#9) **Merged pull requests:** - Add support for "vanilla" persona with unit tests [\#15](#15) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.0a10](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a10) (2025-02-06) [Full Changelog](0.0.0a9...0.0.0a10) **Merged pull requests:** - Update `llm` submodule and model docstrings [\#13](#13) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.0a9](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a9) (2025-02-06) [Full Changelog](0.0.0a8...0.0.0a9) ## [0.0.0a8](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a8) (2025-02-02) [Full Changelog](0.0.0a7...0.0.0a8) ## [0.0.0a7](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a7) (2025-01-26) [Full Changelog](0.0.0a6...0.0.0a7) ## [0.0.0a6](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a6) (2025-01-06) [Full Changelog](0.0.0a5...0.0.0a6) **Merged pull requests:** - Resolve issue with serializing default permissions [\#10](#10) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.0a5](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a5) (2024-12-18) [Full Changelog](0.0.0a4...0.0.0a5) **Merged pull requests:** - Define data models for LLM interactions [\#4](#4) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.0a4](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a4) (2024-11-21) [Full Changelog](0.0.0a3...0.0.0a4) **Merged pull requests:** - Update UserDbRequest models [\#3](#3) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.0a3](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a3) (2024-11-19) [Full Changelog](0.0.0a2...0.0.0a3) **Implemented enhancements:** - \[FEAT\] Define range for user permissions [\#5](#5) **Merged pull requests:** - Formally define and document Access Roles values [\#6](#6) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.0a2](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a2) (2024-11-19) [Full Changelog](0.0.0a1...0.0.0a2) **Merged pull requests:** - Update TokenConfig and add JWT models [\#2](#2) ([NeonDaniel](https://github.com/NeonDaniel)) ## [0.0.0a1](https://github.com/NeonGeckoCom/neon-data-models/tree/0.0.0a1) (2024-11-04) [Full Changelog](ccd1aff...0.0.0a1) **Merged pull requests:** - Initial Implementation [\#1](#1) ([NeonDaniel](https://github.com/NeonDaniel)) \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
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
contextDefines
__all__in modules soimport *can be used to import all Pydantic models from a module without also pulling extraneous imports (i.e.datetimewhich can cause confusion if bothdatetimeanddatetime.datetimeare imported asdatetime)Issues
Other Notes
Messageschemas 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.utilmodule will be extended to generate some browsable registry that may be included in documentation