typedefs
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| ArrayProperty schemez.functionschema.typedefs Schema property for array types. |
||
| ObjectProperty schemez.functionschema.typedefs Schema property for nested object types. |
||
| OpenAIFunctionDefinition schemez.functionschema.typedefs Schema for the function definition part of an OpenAI tool. |
||
| OpenAIFunctionTool schemez.functionschema.typedefs Complete OpenAI tool definition for function calling. |
||
| PropertyBase schemez.functionschema.typedefs Base schema property with common fields. |
||
| SimpleProperty schemez.functionschema.typedefs Schema property for primitive types. |
||
| ToolParameters schemez.functionschema.typedefs |
🛈 DocStrings¶
ToolParameters
module-attribute
¶
ToolParameters = TypedDict(
"ToolParameters",
{
"type": Literal["object"],
"properties": dict[str, Any],
"required": NotRequired[list[str]],
"$defs": NotRequired[dict[str, Any]],
},
)
Schema for tool parameters (JSON Schema object type).
ArrayProperty
¶
ObjectProperty
¶
Bases: PropertyBase
Schema property for nested object types.
Source code in src/schemez/functionschema/typedefs.py
OpenAIFunctionDefinition
¶
Bases: TypedDict
Schema for the function definition part of an OpenAI tool.
This represents the inner "function" object that contains the actual function metadata and parameters.
Source code in src/schemez/functionschema/typedefs.py
OpenAIFunctionTool
¶
Bases: TypedDict
Complete OpenAI tool definition for function calling.
This represents the top-level tool object that wraps a function definition and identifies it as a function tool type.
Source code in src/schemez/functionschema/typedefs.py
PropertyBase
¶
SimpleProperty
¶
clean_property
¶
Convert complex schema properties to simple OpenAI-compatible types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prop
|
dict[str, Any]
|
Complex property definition |
required |
description
|
str | None
|
Optional property description |
None
|
Returns:
| Type | Description |
|---|---|
Property
|
Simplified Property compatible with OpenAI |