Crates.io | open_ai_rust_fn_call_extension |
lib.rs | open_ai_rust_fn_call_extension |
version | 0.2.17 |
source | src |
created_at | 2024-08-08 04:36:43.078727 |
updated_at | 2024-08-12 10:58:58.01092 |
description | Macros for Open AI function calling to be used with the open_ai_rust crate for syntactic sugar. |
homepage | |
repository | |
max_upload_size | |
id | 1329065 |
size | 8,581 |
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.