openai
openai copied to clipboard
feat: Add support for custom types in function parameters
- Update
GetFunctionDefinitionmethod to handle custom types as function parameters - Recursively process properties of custom types
- Generate object type property definitions for custom types
- Add
GetPropertyDefinitionmethod to create property definitions based on property type - Update
CallFunctionmethod to handle custom type parameters - Add tests for custom type support
VerifyGetFunctionDefinition_CustomTypetest to verify function definition generation for custom typesVerifyCallFunction_CustomTypetest to verify function calling with custom type parameters- Add tests for complex custom types
VerifyGetFunctionDefinition_ComplexCustomTypetest to verify function definition generation for complex custom types with nested custom typesVerifyCallFunction_ComplexCustomTypetest to verify function calling with complex custom type parameters- Add
CustomTypeandComplexCustomTypeclasses 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; }
}