Skip to content

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

@sonarqubecloud
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
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