Table of Contents

Method Import

Namespace
LMKit.Agents.Tools.Http
Assembly
LM-Kit.NET.dll

Import(string, string)

Reads the operations of an OpenAPI 3 document as HTTP tool definitions.

public static IReadOnlyList<HttpApiToolDefinition> Import(string document, string baseUrl = null)

Parameters

document string

The document, as JSON or YAML.

baseUrl string

The server to call; null takes the document's first server.

Returns

IReadOnlyList<HttpApiToolDefinition>

One definition per operation, in document order.

Exceptions

ArgumentNullException

Thrown when document is null.

FormatException

Thrown when the text is not an OpenAPI 3 document, or names no server to call.

Share