-
Notifications
You must be signed in to change notification settings - Fork 32
fix(client): return correct type for foundry#WithOptions #18
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(client): return correct type for foundry#WithOptions #18
Conversation
src/Anthropic/AnthropicClient.cs
Outdated
| public AnthropicClient() | ||
| { | ||
| _options = new(); | ||
|
|
||
| _messages = new(() => new MessageService(this)); | ||
| _models = new(() => new ModelService(this)); | ||
| _beta = new(() => new BetaService(this)); | ||
| } | ||
|
|
||
| public AnthropicClient(ClientOptions options) | ||
| : this() | ||
| { | ||
| _options = options; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not move this. It's going to cause merge conflicts with codegen whenever we change the constructors in codegen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you think we should be moving the constructors elsewhere in the ordering for style reasons then let me know and I'll move them in codegen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes constructors generally come after private and static members but before all other methods and properties. See AnthropicFoundryClient.cs:22
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I'll file a ticket to do that, thanks :)
* Make WithOptions virtual and return correct type on foundry implementation * code cleanup * revert moving constructor * fix indentation
* Make WithOptions virtual and return correct type on foundry implementation * code cleanup * revert moving constructor * fix indentation
fixes #17