Skip to content

[Fix] type ModelData.instance_prompt #916

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

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Conversation

mishig25
Copy link
Collaborator

@mishig25 mishig25 commented Sep 20, 2024

Follow up to #909

@mishig25 mishig25 merged commit 2264ac8 into main Sep 20, 2024
5 checks passed
@mishig25 mishig25 deleted the fix_type_instance_prompt branch September 20, 2024 10:44
@@ -107,7 +107,7 @@ export interface ModelData {
parameters?: Record<string, unknown>;
};
base_model?: string | string[];
instance_prompt?: string;
instance_prompt?: string | null;
Copy link
Member

Choose a reason for hiding this comment

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

Interesting, I would have thought that the trailing ? would imply that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

instance_prompt?: string is string | undefined
instance_prompt?: string | null is string | null | undefined

in the strictest sense null !== undefined

Copy link
Contributor

Choose a reason for hiding this comment

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

TIL

Copy link
Member

Choose a reason for hiding this comment

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

ok when can it be set to null?

Copy link
Collaborator Author

@mishig25 mishig25 Sep 20, 2024

Choose a reason for hiding this comment

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

I'm not sure when but that is how it was defined in moon:

instance_prompt?: string | null;

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.

4 participants