Generate OpenAI Compatible tool definitions by parsing Python functions
Project description
OpenAI Function Generator
This project provides a tool to generate JSON schema definitions for OpenAI functions.
Installation
pip install openai-tool-generator
Usage
from openai_tool_generator.generate_tool_definition import generate_tool_definition
def sample_func(a: int, b: Optional[str] = "default", c: List[float] = [1.0, 2.0]) -> None:
"""
Sample function for testing
"""
pass
definition = generate_tool_definition(sample_func)
print(definition)
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
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 openai_tool_generator-0.2.0.tar.gz.
File metadata
- Download URL: openai_tool_generator-0.2.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf80a1b5dabe3925bfeb2a552a02732c402a9e7c4261e9ef1e2256741c751534
|
|
| MD5 |
10b6d9d2eb83a5c96bdd466c5bf6804c
|
|
| BLAKE2b-256 |
d8dde9afd8e935c49f93a6b76f997758f17fee625264a3c04c428572fc2d4855
|
File details
Details for the file openai_tool_generator-0.2.0-py3-none-any.whl.
File metadata
- Download URL: openai_tool_generator-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cc2954a479467bda33f79b8e7ed8daaf35ac45c9c2d286c1b8055eebe6c4c8d
|
|
| MD5 |
13197a0e300786fa0be51fe2e4d504a9
|
|
| BLAKE2b-256 |
3b51aa7f2f07e862f2d7909e7d5c4963d485750bbab1164a99d927f8bb942f8c
|