OpenAI Function Parser
Transform Python function docstrings into JSON schemas compliant with OpenAI function calling protocols.
Installation
pip install openai-function-parser
Usage
from openai_function_parser import get_function_calling_schema
def my_function(a: int, b: str, c: float = 1.0) -> int:
"""
My function description.
Args:
a: My first argument.
b: My second argument.
c: My third argument.
Returns:
My return value.
"""
return 1
function_call_schema = get_function_calling_schema(my_function)
print(function_call_schema)
Authors
Xiaotian Duan (xduan7 at gmail dot com)
Metadata
Release files for openai-func-parser 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openai_func_parser-0.1.0.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openai_func_parser-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.9 kB
Release files / openai_func_parser-0.1.0.tar.gz
| Download URL | openai_func_parser-0.1.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d47804b232dc4d5021a5102e1425c551f4319f5380eba7dd0022fdd35d7a4495
|
|
BLAKE2b-256 checksum How to use checksums |
551c084e02f992622789de1a1f7512fc5c7bcd396b1f85cb4e7b6cd35208e807
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.10.13 Darwin/23.1.0
|
Release files / openai_func_parser-0.1.0-py3-none-any.whl
| Download URL | openai_func_parser-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b6c0246610a76743028ee0c27b2fcc25607058ddd7b56f752423a8eb784c0717
|
|
BLAKE2b-256 checksum How to use checksums |
f8d9d7e0c9bb37ccc8c99758b7468586a2f36bbb828dd723730f6b3eb95687eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.0 CPython/3.10.13 Darwin/23.1.0
|