refactor: refactor app entities #626
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR introduces a comprehensive refactor of the exported entities within our core module. The primary focus of these changes is to eliminate redundancy and duplication, as well as to improve the naming conventions used throughout our codebase.
NOTES: This is only to reduce the confusion of the entities currently present in the codebase, eliminating unnecessary attributes to facilitate easier updates for the upcoming API revamp
Changes
ChatCompletionRole: now clearly indicates the role of the author in a completion message.ChatCompletionMessage: has been updated to define the shape of a new message request object. This is particularly used by assistants to structure message requests to the inference service.MessageRequest: is redefined for clarity, representing the shape of a new message request object sent by the app to assistants.ThreadMessage: A new struct for the message widely used in the app. Assistants send this object to the app for presentation, and the app persists it to the thread file.Thread:A struct to represent the thread entity.Model: This struct now represents a downloaded model and its version.ModelCatalog&ModelVersion: These represent a remote model manifest. A model catalog contains many versions, providing a clearer structure for model management.Notes:
Removed:
Fixes: #614