UNPKG

@agentica/core

Version:

Agentic AI Library specialized in LLM Function Calling

818 lines 61.6 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.initialize = initialize; const __typia_transform__validateReport = __importStar(require("typia/lib/internal/_validateReport.js")); const typia_1 = __importDefault(require("typia")); const AgenticaDefaultPrompt_1 = require("../constants/AgenticaDefaultPrompt"); const AgenticaSystemPrompt_1 = require("../constants/AgenticaSystemPrompt"); const events_1 = require("../factory/events"); const histories_1 = require("../factory/histories"); const ChatGptCompletionStreamingUtil_1 = require("../utils/ChatGptCompletionStreamingUtil"); const FUNCTION = { config: { reference: true, strict: false, separate: null, validate: null }, functions: [ { name: "getApiFunctions", parameters: { description: "Current Type: {@link object}", type: "object", properties: {}, required: [], additionalProperties: false, $defs: { IHttpLlmFunction: { description: "LLM function calling schema from HTTP (OpenAPI) operation.\n\n`IHttpLlmFunction` is a data structure representing a function converted from\nthe {@link OpenApi.IOperation OpenAPI operation}, used for the LLM (Large\nLanguage Model) function calling. It's a typical RPC (Remote Procedure Call)\nstructure containing the function {@link name}, {@link parameters}, and\n{@link output return type}.\n\nIf you provide this `IHttpLlmFunction` data to the LLM provider like\n\"OpenAI\", the \"OpenAI\" will compose a function arguments by analyzing\nconversations with the user. With the LLM composed arguments, you can execute\nthe function through {@link LlmFetcher.execute} and get the result.\n\nFor reference, different between `IHttpLlmFunction` and its origin source\n{@link OpenApi.IOperation} is, `IHttpLlmFunction` has converted every type\nschema information from {@link OpenApi.IJsonSchema} to {@link ILlmSchema}.\n\nAdditionally, the properties' rule is:\n\n- `pathParameters`: Path parameters of {@link OpenApi.IOperation.parameters}\n- `query`: Query parameter of {@link IHttpMigrateRoute.query}\n- `body`: Body parameter of {@link IHttpMigrateRoute.body}\n\n```typescript\n{\n ...pathParameters,\n query,\n body,\n}\n```", type: "object", properties: { method: { description: "HTTP method of the endpoint.", type: "string", "enum": [ "get", "post", "patch", "put", "delete" ] }, path: { description: "Path of the endpoint.", type: "string" }, name: { description: "Representative name of the function.\n\nThe `name` is a representative name identifying the function in the\n{@link IHttpLlmApplication}. The `name` value is just composed by joining\nthe {@link IHttpMigrateRoute.accessor} by underscore `_` character.\n\nHere is the composition rule of the {@link IHttpMigrateRoute.accessor}:\n\n> The `accessor` is composed with the following rules. At first, namespaces\n> are composed by static directory names in the {@link path}. Parametric\n> symbols represented by `:param` or `{param}` cannot be a part of the\n> namespace.\n\n> Instead, they would be a part of the function name. The function name is\n> composed with the {@link method HTTP method} and parametric symbols like\n> `getByParam` or `postByParam`. If there are multiple path parameters, they\n> would be concatenated by `And` like `getByParam1AndParam2`.\n\n> For reference, if the {@link operation}'s {@link method} is `delete`, the\n> function name would be replaced to `erase` instead of `delete`. It is the\n> reason why the `delete` is a reserved keyword in many programming\n> languages.\n\n> - Example 1\n\n> - Path: `POST /shopping/sellers/sales`\n> - Accessor: `shopping.sellers.sales.post`\n> - Example 2\n\n> - Endpoint: `GET\n> /shoppings/sellers/sales/:saleId/reviews/:reviewId/comments/:id`\n> - Accessor:\n> `shoppings.sellers.sales.reviews.getBySaleIdAndReviewIdAndCommentId`", type: "string", maxLength: 64 }, parameters: { description: "List of parameter types.\n\nIf you've configured {@link IHttpLlmApplication.IConfig.keyword} as `true`,\nnumber of {@link IHttpLlmFunction.parameters} are always 1 and the first\nparameter's type is always {@link ILlmSchema.IObject}. The properties'\nrule is:\n\n- `pathParameters`: Path parameters of {@link IHttpMigrateRoute.parameters}\n- `query`: Query parameter of {@link IHttpMigrateRoute.query}\n- `body`: Body parameter of {@link IHttpMigrateRoute.body}\n\n```typescript\n{\n ...pathParameters,\n query,\n body,\n}\n```\n\nOtherwise, the parameters would be multiple, and the sequence of the\nparameters are following below rules:\n\n```typescript\n[\n ...pathParameters,\n ...(query ? [query] : []),\n ...(body ? [body] : []),\n];\n```", $ref: "#/$defs/ILlmSchema.IParameters" }, separated: { description: "Collection of separated parameters.\n\nFilled only when {@link IHttpLlmApplication.IConfig.separate} is configured.", $ref: "#/$defs/IHttpLlmFunction.ISeparated" }, output: { description: "Expected return type.\n\nIf the target operation returns nothing (`void`), the `output` would be\n`undefined`.", anyOf: [ { $ref: "#/$defs/ILlmSchema.IBoolean" }, { $ref: "#/$defs/ILlmSchema.INumber" }, { $ref: "#/$defs/ILlmSchema.IInteger" }, { $ref: "#/$defs/ILlmSchema.IString" }, { $ref: "#/$defs/ILlmSchema.IArray" }, { $ref: "#/$defs/ILlmSchema.IObject" }, { $ref: "#/$defs/ILlmSchema.IReference" }, { $ref: "#/$defs/ILlmSchema.IAnyOf" }, { $ref: "#/$defs/ILlmSchema.IUnknown" }, { $ref: "#/$defs/ILlmSchema.INull" } ] }, description: { description: "Description of the function.\n\n`IHttpLlmFunction.description` is composed using the following rules:\n\n1. Starts with the {@link OpenApi.IOperation.summary} paragraph\n2. The next paragraphs are filled with the\n {@link OpenApi.IOperation.description}. If the first paragraph of\n {@link OpenApi.IOperation.description} matches the\n {@link OpenApi.IOperation.summary}, it is not duplicated\n3. Parameter descriptions are added with `@param` tags\n4. {@link OpenApi.IOperation.security Security requirements} are added with\n `@security` tags\n5. Tag names are added with `@tag` tags\n6. If {@link OpenApi.IOperation.deprecated}, a `@deprecated` tag is added\n\nFor reference, the `description` is a critical property for teaching the\npurpose of the function to LLMs (Large Language Models). LLMs use this\ndescription to determine which function to call.\n\nAlso, when the LLM converses with users, the `description` explains the\nfunction to the user. Therefore, the `description` property has the highest\npriority and should be carefully considered.", type: "string" }, deprecated: { description: "Whether the function is deprecated or not.\n\nIf the `deprecated` is `true`, the function is not recommended to use.\n\nLLM (Large Language Model) may not use the deprecated function.", type: "boolean" }, tags: { description: "Category tags for the function.\n\nSame with {@link OpenApi.IOperation.tags} indicating the category of the\nfunction.", type: "array", items: { type: "string" } } }, required: [ "method", "path", "name", "parameters" ] }, "ILlmSchema.IParameters": { description: "Type for function parameters.\n\n`ILlmSchema.IParameters` defines a function's parameters as a keyword\nobject type, where each property represents a named parameter.\n\nIt can also be used for structured output metadata to define the expected\nformat of LLM responses.", type: "object", properties: { $defs: { description: "Collection of the named types.\n\nThis record would be filled when {@link IConfig.reference} is `true`, or\nrecursive type comes.", $ref: "#/$defs/RecordstringILlmSchema" }, additionalProperties: { description: "Additional properties information.\n\nThe `additionalProperties` defines the type schema for additional\nproperties that are not listed in the {@link properties}.\n\nBy the way, it is not allowed at the parameters level.", type: "boolean", "enum": [ false ] }, type: { description: "Discriminator value of the type.", type: "string", "enum": [ "object" ] }, properties: { description: "Properties of the object.\n\nThe `properties` means a list of key-value pairs of the object's regular\nproperties. The key is the name of the regular property, and the value is\nthe type schema info.", $ref: "#/$defs/RecordstringILlmSchema" }, required: { description: "List of required property keys.\n\nThe `required` contains a list of property keys from {@link properties}\nthat must be provided. Properties not listed in `required` are optional,\nwhile those listed must be filled.\n\nBelow is an example of {@link properties} and `required`:\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso they are listed in the `required` array.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```", type: "array", items: { type: "string" } }, title: { description: "Title of the schema.", type: "string" }, description: { description: "Detailed description of the schema.", type: "string" }, deprecated: { description: "Whether the type is deprecated or not.", type: "boolean" }, example: { description: "Example value." }, examples: { description: "List of example values as key-value pairs.", $ref: "#/$defs/Recordstringany" }, readOnly: { description: "Whether the property is read-only.", type: "boolean" }, writeOnly: { description: "Whether the property is write-only.", type: "boolean" } }, required: [ "$defs", "additionalProperties", "type", "properties", "required" ] }, RecordstringILlmSchema: { description: "Construct a type with a set of properties K of type T", type: "object", properties: {}, required: [], additionalProperties: { $ref: "#/$defs/ILlmSchema" } }, ILlmSchema: { description: "Type schema info for LLM (Large Language Model) function calling.\n\n## Overview\n\n`ILlmSchema` is a type schema info for LLM function calling, designed to be\ncompatible with multiple LLM providers while following the JSON schema\nspecification.\n\n## Specification\n\n`ILlmSchema` basically follows the JSON schema definition of the OpenAPI v3.1\nspecification; {@link OpenApiV3_1.IJsonSchema}.\n\nHowever, it deviates from the standard JSON schema specification and omits\nmany features to ensure compatibility across different LLM providers and\ntheir function calling requirements.\n\n## Differences from OpenAPI v3.1\n\nHere is the list of how `ILlmSchema` is different with the OpenAPI v3.1 JSON\nschema:\n\n- Decompose mixed type: {@link OpenApiV3_1.IJsonSchema.IMixed}\n- Resolve nullable property:\n {@link OpenApiV3_1.IJsonSchema.__ISignificant.nullable}\n- Tuple type is banned: {@link OpenApiV3_1.IJsonSchema.ITuple.prefixItems}\n- Constant type is banned: {@link OpenApiV3_1.IJsonSchema.IConstant}\n- Merge {@link OpenApiV3_1.IJsonSchema.IOneOf} to {@link ILlmSchema.IAnyOf}\n- Merge {@link OpenApiV3_1.IJsonSchema.IAllOf} to {@link ILlmSchema.IObject}\n- Merge {@link OpenApiV3_1.IJsonSchema.IRecursiveReference} to\n {@link ILlmSchema.IReference}\n\n## Differences from OpenApi.IJsonSchema\n\nCompared to {@link OpenApi.IJsonSchema}, the emended JSON schema\nspecification:\n\n- {@link ILlmSchema.IAnyOf} instead of {@link OpenApi.IJsonSchema.IOneOf}\n- {@link ILlmSchema.IParameters.$defs} instead of\n {@link OpenApi.IJsonSchema.IComponents.schemas}\n- Do not support {@link OpenApi.IJsonSchema.ITuple} type\n- {@link ILlmSchema.properties} and {@link ILlmSchema.required} are always\n defined\n\n## Strict Mode\n\nWhen {@link ILlmSchema.IConfig.strict} mode is enabled, the schema\ntransformation follows OpenAI's structured output requirements:\n\n- Every {@link ILlmSchema.IObject.additionalProperties} is forced to `false`\n- Every property in {@link ILlmSchema.IObject.properties} becomes\n {@link ILlmSchema.IObject.required}\n- All constraint properties are removed from the schema and moved to\n {@link IJsonSchemaAttribute.description} in a JSDoc-like format:\n\n - Numeric constraints: `minimum`, `maximum`, `exclusiveMinimum`,\n `exclusiveMaximum`, `multipleOf`\n - String constraints: `minLength`, `maxLength`, `pattern`, `format`,\n `contentMediaType`\n - Array constraints: `minItems`, `maxItems`, `uniqueItems`\n - Example: `@minimum 0`, `@maximum 100`, `@format uuid`", anyOf: [ { $ref: "#/$defs/ILlmSchema.IBoolean" }, { $ref: "#/$defs/ILlmSchema.IInteger" }, { $ref: "#/$defs/ILlmSchema.INumber" }, { $ref: "#/$defs/ILlmSchema.IString" }, { $ref: "#/$defs/ILlmSchema.IArray" }, { $ref: "#/$defs/ILlmSchema.IObject" }, { $ref: "#/$defs/ILlmSchema.IReference" }, { $ref: "#/$defs/ILlmSchema.IAnyOf" }, { $ref: "#/$defs/ILlmSchema.INull" }, { $ref: "#/$defs/ILlmSchema.IUnknown" } ] }, "ILlmSchema.IBoolean": { description: "Boolean type info.", type: "object", properties: { "enum": { description: "Enumeration values.", type: "array", items: { type: "boolean" } }, "default": { description: "Default value.", type: "boolean" }, type: { description: "Discriminator value of the type.", type: "string", "enum": [ "boolean" ] }, title: { description: "Title of the schema.", type: "string" }, description: { description: "Detailed description of the schema.", type: "string" }, deprecated: { description: "Whether the type is deprecated or not.", type: "boolean" }, example: { description: "Example value." }, examples: { description: "List of example values as key-value pairs.", $ref: "#/$defs/Recordstringany" }, readOnly: { description: "Whether the property is read-only.", type: "boolean" }, writeOnly: { description: "Whether the property is write-only.", type: "boolean" } }, required: [ "type" ] }, Recordstringany: { description: "Construct a type with a set of properties K of type T", type: "object", properties: {}, required: [], additionalProperties: {} }, "ILlmSchema.IInteger": { description: "Integer type info.", type: "object", properties: { "enum": { description: "Enumeration values.", type: "array", items: { type: "number" } }, "default": { description: "Default value.", type: "integer" }, minimum: { description: "Minimum value restriction.", type: "integer" }, maximum: { description: "Maximum value restriction.", type: "integer" }, exclusiveMinimum: { description: "Exclusive minimum value restriction.", type: "integer" }, exclusiveMaximum: { description: "Exclusive maximum value restriction.", type: "integer" }, multipleOf: { description: "Multiple of value restriction.", type: "integer", exclusiveMinimum: 0 }, type: { description: "Discriminator value of the type.", type: "string", "enum": [ "integer" ] }, title: { description: "Title of the schema.", type: "string" }, description: { description: "Detailed description of the schema.", type: "string" }, deprecated: { description: "Whether the type is deprecated or not.", type: "boolean" }, example: { description: "Example value." }, examples: { description: "List of example values as key-value pairs.", $ref: "#/$defs/Recordstringany" }, readOnly: { description: "Whether the property is read-only.", type: "boolean" }, writeOnly: { description: "Whether the property is write-only.", type: "boolean" } }, required: [ "type" ] }, "ILlmSchema.INumber": { description: "Number (double) type info.", type: "object", properties: { "enum": { description: "Enumeration values.", type: "array", items: { type: "number" } }, "default": { description: "Default value.", type: "number" }, minimum: { description: "Minimum value restriction.", type: "number" }, maximum: { description: "Maximum value restriction.", type: "number" }, exclusiveMinimum: { description: "Exclusive minimum value restriction.", type: "number" }, exclusiveMaximum: { description: "Exclusive maximum value restriction.", type: "number" }, multipleOf: { description: "Multiple of value restriction.", type: "number", exclusiveMinimum: 0 }, type: { description: "Discriminator value of the type.", type: "string", "enum": [ "number" ] }, title: { description: "Title of the schema.", type: "string" }, description: { description: "Detailed description of the schema.", type: "string" }, deprecated: { description: "Whether the type is deprecated or not.", type: "boolean" }, example: { description: "Example value." }, examples: { description: "List of example values as key-value pairs.", $ref: "#/$defs/Recordstringany" }, readOnly: { description: "Whether the property is read-only.", type: "boolean" }, writeOnly: { description: "Whether the property is write-only.", type: "boolean" } }, required: [ "type" ] }, "ILlmSchema.IString": { description: "String type info.", type: "object", properties: { "enum": { description: "Enumeration values.", type: "array", items: { type: "string" } }, "default": { description: "Default value.", type: "string" }, format: { description: "Format restriction.", type: "string" }, pattern: { description: "Pattern restriction.", type: "string" }, contentMediaType: { description: "Content media type restriction.", type: "string" }, minLength: { description: "Minimum length restriction.", type: "integer", minimum: 0 }, maxLength: { description: "Maximum length restriction.", type: "integer", minimum: 0 }, type: { description: "Discriminator value of the type.", type: "string", "enum": [ "string" ] }, title: { description: "Title of the schema.", type: "string" }, description: { description: "Detailed description of the schema.", type: "string" }, deprecated: { description: "Whether the type is deprecated or not.", type: "boolean" }, example: { description: "Example value." }, examples: { description: "List of example values as key-value pairs.", $ref: "#/$defs/Recordstringany" }, readOnly: { description: "Whether the property is read-only.", type: "boolean" }, writeOnly: { description: "Whether the property is write-only.", type: "boolean" } }, required: [ "type" ] }, "ILlmSchema.IArray": { description: "Array type info.", type: "object", properties: { items: { description: "Items type info.\n\nThe `items` means the type of the array elements. In other words, it is\nthe type schema info of the `T` in the TypeScript array type `Array<T>`.", $ref: "#/$defs/ILlmSchema" }, uniqueItems: { description: "Unique items restriction.\n\nIf this property value is `true`, target array must have unique items.", type: "boolean" }, minItems: { description: "Minimum items restriction.\n\nRestriction of minimum number of items in the array.", type: "integer", minimum: 0 }, maxItems: { description: "Maximum items restriction.\n\nRestriction of maximum number of items in the array.", type: "integer", minimum: 0 }, type: { description: "Discriminator value of the type.", type: "string", "enum": [ "array" ] }, title: { description: "Title of the schema.", type: "string" }, description: { description: "Detailed description of the schema.", type: "string" }, deprecated: { description: "Whether the type is deprecated or not.", type: "boolean" }, example: { description: "Example value." }, examples: { description: "List of example values as key-value pairs.", $ref: "#/$defs/Recordstringany" }, readOnly: { description: "Whether the property is read-only.", type: "boolean" }, writeOnly: { description: "Whether the property is write-only.", type: "boolean" } }, required: [ "items", "type" ] }, "ILlmSchema.IObject": { description: "Object type info.", type: "object", properties: { properties: { description: "Properties of the object.\n\nThe `properties` means a list of key-value pairs of the object's regular\nproperties. The key is the name of the regular property, and the value is\nthe type schema info.", $ref: "#/$defs/RecordstringILlmSchema" }, additionalProperties: { description: "Additional properties' info.\n\nThe `additionalProperties` means the type schema info of the additional\nproperties that are not listed in the {@link properties}.\n\nIf the value is `true`, it means that the additional properties are not\nrestricted. They can be any type. Otherwise, if the value is\n{@link ILlmSchema} type, it means that the additional properties must\nfollow the type schema info.\n\n- `true`: `Record<string, any>`\n- `ILlmSchema`: `Record<string, T>`\n\nNote: When {@link IConfig.strict} mode is enabled, this property is always\nfixed to `false`, meaning no additional properties are allowed.", anyOf: [ { type: "boolean" }, { $ref: "#/$defs/ILlmSchema.IBoolean" }, { $ref: "#/$defs/ILlmSchema.INumber" }, { $ref: "#/$defs/ILlmSchema.IInteger" }, { $ref: "#/$defs/ILlmSchema.IString" }, { $ref: "#/$defs/ILlmSchema.IArray" }, { $ref: "#/$defs/ILlmSchema.IObject" }, { $ref: "#/$defs/ILlmSchema.IReference" }, { $ref: "#/$defs/ILlmSchema.IAnyOf" }, { $ref: "#/$defs/ILlmSchema.IUnknown" }, { $ref: "#/$defs/ILlmSchema.INull" } ] }, required: { description: "List of required property keys.\n\nThe `required` contains a list of property keys from {@link properties}\nthat must be provided. Properties not listed in `required` are optional,\nwhile those listed must be filled.\n\nBelow is an example of {@link properties} and `required`:\n\n```typescript\ninterface SomeObject {\n id: string;\n email: string;\n name?: string;\n}\n```\n\nAs you can see, `id` and `email` {@link properties} are {@link required},\nso they are listed in the `required` array.\n\n```json\n{\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": \"string\" },\n \"email\": { \"type\": \"string\" },\n \"name\": { \"type\": \"string\" }\n },\n \"required\": [\"id\", \"email\"]\n}\n```", type: "array", items: { type: "string" } }, type: { description: "Discriminator value of the type.", type: "string", "enum": [ "object" ] }, title: { description: "Title of the schema.", type: "string" }, description: { description: "Detailed description of the schema.", type: "string" }, deprecated: { description: "Whether the type is deprecated or not.", type: "boolean" }, example: { description: "Example value." }, examples: { description: "List of example values as key-value pairs.", $ref: "#/$defs/Recordstringany" }, readOnly: { description: "Whether the property is read-only.", type: "boolean" }, writeOnly: { description: "Whether the property is write-only.", type: "boolean" } }, required: [ "properties", "required", "type" ] }, "ILlmSchema.IReference": { description: "Reference type directing to named schema.\n\nIf {@link IConfig.strict} mode is enabled, its other properties like\n{@link description} would be disabled. Instead, the description would be\nplaced in the parent type. For example, if this reference type is used as a\nproperty of an object, the description would be placed in the object\nplace.", type: "object", properties: { $ref: { description: "Reference to the named schema.\n\nThe `$ref` is a reference to a named schema. The format follows the JSON\nPointer specification. In OpenAPI, the `$ref` starts with `#/$defs/`\nwhich indicates the type is stored in the\n{@link ILlmSchema.IParameters.$defs} object.\n\n- `#/$defs/SomeObject`\n- `#/$defs/AnotherObject`", type: "string" }, title: { description: "Title of the schema.", type: "string" }, description: { description: "Detailed description of the schema.", type: "string" }, deprecated: { description: "Whether the type is deprecated or not.", type: "boolean" }, example: { description: "Example value." }, examples: { description: "List of example values as key-value pairs.", $ref: "#/$defs/Recordstringany" }, readOnly: { description: "Whether the property is read-only.", type: "boolean" }, writeOnly: { description: "Whether the property is write-only.", type: "boolean" } }, required: [ "$ref" ] }, "ILlmSchema.IAnyOf": { description: "Union type.\n\n`IAnyOf` represents a union type in TypeScript (`A | B | C`).\n\nFor reference, even if your Swagger (or OpenAPI) document defines `oneOf`\ninstead of `anyOf`, {@link ILlmSchema} forcibly converts it to the\n`anyOf`-based {@link ILlmSchema.IAnyOf} type.", type: "object", properties: { anyOf: { description: "List of the union types.", type: "array", items: { anyOf: [ { $ref: "#/$defs/ILlmSchema.IBoolean" }, { $ref: "#/$defs/ILlmSchema.INumber" }, { $ref: "#/$defs/ILlmSchema.IInteger" }, { $ref: "#/$defs/ILlmSchema.IString" }, { $ref: "#/$defs/ILlmSchema.IArray" }, { $ref: "#/$defs/ILlmSchema.IObject" }, { $ref: "#/$defs/ILlmSchema.IReference" }, { $ref: "#/$defs/ILlmSchema.IUnknown" }, { $ref: "#/$defs/ILlmSchema.INull" } ] } }, "x-discriminator": { description: "Discriminator info of the union type.\n\nThis discriminator is used to determine which type in the union should be\nused based on the value of a specific property.", $ref: "#/$defs/ILlmSchema.IAnyOf.IDiscriminator" }, title: { description: "Title of the schema.", type: "string" }, description: { description: "Detailed description of the schema.", type: "string" }, deprecated: { description: "Whether the type is deprecated or not.", type: "boolean" }, example: { description: "Example value." }, examples: { description: "List of example values as key-value