overlay/llm/tool

Types

pub type Call {
  Call(id: String, function: FunctionCall)
}

Constructors

pub type FunctionCall {
  FunctionCall(
    name: String,
    arguments: dict.Dict(String, utils.Any),
  )
}

Constructors

pub type Return {
  Return(text: String, images: List(String))
}

Constructors

  • Return(text: String, images: List(String))
pub type Tool {
  Tool(
    name: String,
    description: String,
    parameters: List(#(String, castor.Ref(castor.Schema), Bool)),
  )
}

Constructors

pub type ToolCallFailure {
  UnknownTool(name: String)
  BadArguments(errors: List(decode.DecodeError))
  ExecutionAborted(reason: String)
}

Constructors

  • UnknownTool(name: String)
  • BadArguments(errors: List(decode.DecodeError))
  • ExecutionAborted(reason: String)

Values

pub fn tool_call_failure_to_string(
  failure: ToolCallFailure,
) -> String
Search Document