airy 0.1.1

Airy is an AI tool for interacting with databases.
Documentation
1
2
3
4
5
6
7
8
9
10
use openai_api_rs::v1::chat_completion::ToolCall;

/// Fixes the tool call schema.
/// Not doing this will cause "Internal Server Error" for some models.
pub fn fix_tool_call(mut tool_call: ToolCall) -> ToolCall {
    if tool_call.function.arguments.is_none() {
        tool_call.function.arguments = Some("{}".into());
    }
    tool_call
}