Skip to content
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

refactor model to support aliases #914

Merged
merged 5 commits into from
Dec 5, 2024
Merged

refactor model to support aliases #914

merged 5 commits into from
Dec 5, 2024

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Dec 5, 2024


High Level Summary of Changes

  • Refactoring Model Aliases:

    • Introducing a new modelAliases object to manage model configurations. This simplifies accessing different models by name.
  • Renaming and Deprecating Small and Vision Model Properties:

    • Deprecated the use of smallModel and visionModel properties in the ModelConnectionOptions. Developers are encouraged to use the new model alias system instead.
  • Updating Configuration Access:

    • Replaced direct access to default models like runtimeHost.defaultEmbeddingsModelOptions.embeddingsModel with equivalent access via the modelAliases object, ensuring a more consistent and intuitive API.
  • Consolidated Default Model Management:

    • Merged previous default model configurations into a single modelAliases object for simplicity and easier management.
  • Simplifying VectorSearch Configuration:

    • Used the new model alias system to access the embeddings model in vectorSearch, aligning with the updated configuration structure.

generated by pr-describe

Copy link

github-actions bot commented Dec 5, 2024

LGTM 🚀

The refactoring and consolidation of model configuration options in these files look good. The removal of deprecated fields and the centralization of model aliases in the Host interface is a step towards cleaner and more maintainable code.

The TypeScript compiler will handle any type-related issues, so there's no need to worry about that aspect. The changes are focused on improving structural integrity and reducing redundancy, which should lead to fewer bugs and easier maintenance moving forward.

If there were any functional concerns or potential areas for improvement, I would have mentioned them. Since none were identified, the changes look solid and ready to be merged.

generated by pr-review

@pelikhan pelikhan requested a review from Copilot December 5, 2024 17:48

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 22 out of 22 changed files in this pull request and generated no suggestions.

@pelikhan pelikhan merged commit 19d5037 into main Dec 5, 2024
10 checks passed
@pelikhan pelikhan deleted the modelaliases branch December 5, 2024 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant