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

feat: Add support for custom types in function parameters #504

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

Cheyenne1025
Copy link

  • Update GetFunctionDefinition method to handle custom types as function parameters
  • Recursively process properties of custom types
  • Generate object type property definitions for custom types
  • Add GetPropertyDefinition method to create property definitions based on property type
  • Update CallFunction method to handle custom type parameters
  • Add tests for custom type support
  • VerifyGetFunctionDefinition_CustomType test to verify function definition generation for custom types
  • VerifyCallFunction_CustomType test to verify function calling with custom type parameters
  • Add tests for complex custom types
  • VerifyGetFunctionDefinition_ComplexCustomType test to verify function definition generation for complex custom types with nested custom types
  • VerifyCallFunction_ComplexCustomType test to verify function calling with complex custom type parameters
  • Add CustomType and ComplexCustomType classes for testing purposes

kayhantolga and others added 2 commits February 7, 2024 22:15
- Update `GetFunctionDefinition` method to handle custom types as function parameters
 - Recursively process properties of custom types
 - Generate object type property definitions for custom types
- Add `GetPropertyDefinition` method to create property definitions based on property type
- Update `CallFunction` method to handle custom type parameters
- Add tests for custom type support
 - `VerifyGetFunctionDefinition_CustomType` test to verify function definition generation for custom types
 - `VerifyCallFunction_CustomType` test to verify function calling with custom type parameters
- Add tests for complex custom types
 - `VerifyGetFunctionDefinition_ComplexCustomType` test to verify function definition generation for complex custom types with nested custom types
 - `VerifyCallFunction_ComplexCustomType` test to verify function calling with complex custom type parameters
- Add `CustomType` and `ComplexCustomType` classes for testing purposes
@Removable
Copy link

It seems we have to set the dev branch as the target of our PR.

@Cheyenne1025 Cheyenne1025 changed the base branch from master to dev March 22, 2024 14:48
@kayhantolga
Copy link
Member

The unit test you wrote is failing. Could you please fix it?

@kayhantolga kayhantolga added this to the 7.4.7 milestone Apr 3, 2024
@kayhantolga
Copy link
Member

The code is unable to handle self-referenced objects.
Please test with the following complex object:

public class ABC
{
   public string A { get; set; }
   public ABC b { get; set; }
}

@kayhantolga kayhantolga linked an issue Apr 3, 2024 that may be closed by this pull request
@kayhantolga kayhantolga modified the milestones: 7.4.7, 8.0.1, 8.0.3 Apr 6, 2024
@kayhantolga kayhantolga removed this from the 8.4.2 milestone Oct 10, 2024
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.

FunctionCallingHelper unable to handle array parameter
3 participants