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

Fix: Rename redundant type names #209

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Fix: Rename redundant type names #209

merged 2 commits into from
Jan 17, 2025

Conversation

shu223
Copy link
Contributor

@shu223 shu223 commented May 16, 2024

What

Renamed some redundant type names such as ChatCompletionMessageParam.ChatCompletionSystemMessageParam -> ChatCompletionMessageParam.SystemMessageParam.

Why

In Swift, the names of types within the nested structure usually omit the namespace prefix.

This fix improves the readability:

[Before]

  • ChatCompletionMessageParam.ChatCompletionSystemMessageParam
  • ChatCompletionMessageParam.ChatCompletionUserMessageParam
  • ChatCompletionMessageParam.ChatCompletionAssistantMessageParam
  • ChatCompletionMessageParam.ChatCompletionToolMessageParam

[After]

  • ChatCompletionMessageParam.SystemMessageParam
  • ChatCompletionMessageParam.UserMessageParam
  • ChatCompletionMessageParam.AssistantMessageParam
  • ChatCompletionMessageParam.ToolMessageParam

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Collaborator

@nezhyborets nezhyborets left a comment

Choose a reason for hiding this comment

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

Great! More laconic and Swifty. We may also remove all the Self. as it seems redundant. But we can do it in another PR

@nezhyborets nezhyborets merged commit 178660e into MacPaw:main Jan 17, 2025
1 check passed
wangqi pushed a commit to wangqi/OpenAI that referenced this pull request Feb 18, 2025
Fix: Rename redundant type names
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.

2 participants