Arize Phoenix TS
    Preparing search index...
    • Creates an OpenAI tool definition

      Parameters

      • toolNumber: number

        the number of the tool in that instance for example instance.tools.length + 1 to be used to fill in the name

      Returns {
          function: {
              description?: string;
              name: string;
              parameters: {
                  additionalProperties?: boolean;
                  properties: Record<
                      string,
                      | {
                          description?: string;
                          enum?: string[];
                          type: | "string"
                          | "number"
                          | "boolean"
                          | "object"
                          | "null"
                          | "array"
                          | "integer";
                          [key: string]: unknown;
                      }
                      | {
                          anyOf: {
                              description?: string;
                              enum?: string[];
                              type: | "string"
                              | "number"
                              | "boolean"
                              | "object"
                              | "null"
                              | "array"
                              | "integer";
                              [key: string]: unknown;
                          }[];
                      },
                  >;
                  required?: string[];
                  strict?: boolean;
                  type: "object";
                  [key: string]: unknown;
              };
              [key: string]: unknown;
          };
          type: "function";
          [key: string]: unknown;
      }

      an OpenAI tool definition