LangSchema (LangSchema v0.7.0)

View Source

Summary

Functions

Converts a schema into a provider-specific JSON schema for function calling (tool use).

Converts a schema into a JSON schema wrapped in the provider-specific envelope for structured output.

Types

provider()

@type provider() :: :openai | :google | :anthropic

Functions

function_calling(schema, provider, opts \\ [])

@spec function_calling(map(), provider(), keyword()) :: map()

Converts a schema into a provider-specific JSON schema for function calling (tool use).

structured_output(schema, provider, opts \\ [])

@spec structured_output(map(), provider(), keyword()) :: map()

Converts a schema into a JSON schema wrapped in the provider-specific envelope for structured output.