24 releases
0.2.17 | Aug 12, 2024 |
---|---|
0.2.16 | Aug 12, 2024 |
0.1.6 | Aug 12, 2024 |
#6 in #syntactic
48 downloads per month
Used in open_ai_rust
9KB
134 lines
open_ai_rust_fn_extensions
Macros for Open AI function calling. Designed specifically to be used with the open_ai_rust crate for syntactic sugar which I also developed.
That crate uses this internally and so you can use it in a far more optimal way through there.
Example: #[function_call("This function changes the light state.")] fn change_light(on: bool, extra_data: Arg) { // Function body }
Becomes this: FUNCTION_CALL FunctionCall { name: "change_light", description: "This function changes the light state.", parameters: ["on: bool", "extra_data: Arg", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""] }
I am currently working on this overtime to make it fully comprehensive and impressive.
Dependencies
~1.7–2.4MB
~55K SLoC