Support for ScriptableObject Tool parameters #290
-
Hi @StephenHodgson, Simple example: public class ConfigSo : ScriptableObject
{
public string Id => _id;
[SerializeField] [JsonProperty] [ReadOnly]
private string _id;
}
public async void ToolWithScriptableObject(ConfigSo config) {
...
} I can always default back to using simple objects, and then just manually create the ScriptableObject afterwards. |
Beta Was this translation helpful? Give feedback.
Answered by
StephenHodgson
Aug 30, 2024
Replies: 1 comment 12 replies
-
REST 400 Error I get: {
"error": {
"message": "Invalid schema for function 'ToolWithScriptableObject': In context=(), 'required' is required to be supplied and to be an array including every key in properties. Missing 'CanRunTasksInParallel'.",
"type": "invalid_request_error",
"param": "tools[0].function.parameters",
"code": "invalid_function_parameters"
}
} |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah just make your own class that serializes them to the json you prefer (if you wanna use my
TypeExtensions
class as a template). Then pass the raw json schema in with your request or tool creation. (pretty sure I made it possible to define a tool via json only).