openai
openai copied to clipboard
feat: Add support for custom types in function parameters
- 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
andComplexCustomType
classes for testing purposes
It seems we have to set the dev
branch as the target of our PR.
The unit test you wrote is failing. Could you please fix it?
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; }
}