Class Function.Builder

java.lang.Object
io.github.stefanbratanov.jvm.openai.Function.Builder
Enclosing class:
Function

public static class Function.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      public Function.Builder name(String name)
      Parameters:
      name - The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
    • description

      public Function.Builder description(String description)
      Parameters:
      description - A description of what the function does, used by the model to choose when and how to call the function.
    • parameters

      public Function.Builder parameters(Map<String,Object> parameters)
      Parameters:
      parameters - The parameters the functions accepts, described as a JSON Schema object. The JSON schema should be defined as Map where a value could be a raw escaped JSON String and it will be serialized without escaping.
    • build

      public Function build()