No project description provided
Project description
synapseai
Generate OpenAI function-calling schemas from your tool classes!
Features
- Reads all Python tool classes in a folder
- Extracts class name, docstring, and Pydantic Field attributes
- Outputs OpenAI-compatible function-calling schema JSON
Installation
pip install synapse
As a Python Library
from synapseai import generate_schema
schemas = generate_schema(folder='/path/to/tools')
# or
schemas = generate_schema(files=['/path/to/tools/ToolA.py', '/path/to/tools/ToolB.py'])
Output Format
The output is a list of schemas in OpenAI function-calling format:
[
{
"type": "function",
"function": {
"name": "tool_name",
"description": "...",
"parameters": {
"type": "object",
"properties": { ... },
"required": [ ... ]
}
}
},
...
]
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
synapseai_python-0.1.tar.gz
(2.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synapseai_python-0.1.tar.gz.
File metadata
- Download URL: synapseai_python-0.1.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8930ed62c80afc28220d4386639d9af5de36a73ac390012a05276aa08b09f0de
|
|
| MD5 |
9772f0cc545094ff26fc7d89c1d95ce6
|
|
| BLAKE2b-256 |
dcae8ed32df15958223fa02bd7020805efcf3633812b3fdc7891b8afefbf4971
|
File details
Details for the file synapseai_python-0.1-py3-none-any.whl.
File metadata
- Download URL: synapseai_python-0.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd3dd0c5666ed8a9c249ae778db90a25baf2bfb7da3961f1b1cc593f52d5706f
|
|
| MD5 |
558392233bd6eaaaf2307960590b873c
|
|
| BLAKE2b-256 |
f5e329b54ed883f0578397d44bb1daa24689331b9166a8702894dff0dadac280
|