:gemini provider atom renamed to :google for naming consistency with other libraries
# Before
LangSchema.function_calling(schema, :gemini)
LangSchema.structured_output(schema, :gemini)
# After
LangSchema.function_calling(schema, :google)
LangSchema.structured_output(schema, :google)
- Add
LangSchema.Converter.Anthropic for Anthropic (Claude) structured outputs and function calling
- Bump langchain to
~> 0.6.1
to_schema/2 and to_json_schema/2 have been renamed to clarify their purpose:
function_calling/2: Converts a schema into a provider-specific JSON schema for function calling (tool use)
structured_output/2: Converts a schema into a JSON schema wrapped in the provider-specific envelope for structured output
# Before
LangSchema.to_schema(schema, :openai) # raw JSON schema
LangSchema.to_json_schema(schema, :openai) # wrapped in envelope
# After
LangSchema.function_calling(schema, :openai) # for function calling / tool use
LangSchema.structured_output(schema, :openai) # for structured output
LangSchema.Converter.convert/2 has been split into two separate functions:
to_schema/2 → now function_calling/2
to_json_schema/2 → now structured_output/2
- Create
LangSchema.Adapter.LangChainFunctionParam for LangChain.FunctionParam
- Allow string keys for ordered object properties
- Fix order of
required of LangSchema.Type.OpenAI.Object
- Add
wrap? opt to convert/2 callback function of LangSchema.Converter
- Implement
LangSchema.Converter.OpenAI, LangSchema.Converter.Gemini