Agent Response Transformer
A Python SDK to transform Claude response to OpenAI response format.
Installation
Install the package via pip:
pip install agent-response-transformer
Usage
from agent_response_transformer import ResponseTransformer
# Create an instance of the transformer
transformer = ResponseTransformer()
# Transform Claude response to OpenAI format (for full conversation)
result = transformer.claude_json_to_openai_response(claude_response)
# Transform a single Claude response to OpenAI format (for individual messages)
single_result = transformer.single_claude_json_to_openai_response(single_claude_response)
Features
- Transform Claude response format to OpenAI response format
- Support for text content and function calls
- Proper handling of tool usage and results
Development
To install the package in development mode:
pip install -e .
Dependencies
The package has no direct dependencies. However, when using this package in your projects, you may need to install:
- openai
- agents (if it's a separate package)
For development, you can install all dependencies using:
pip install -r requirements.txt
Publishing to PyPI
To publish a new version to PyPI:
- Update the version in
setup.py - Build the package:
python setup.py sdist bdist_wheel
- Upload to Test PyPI first:
twine upload --repository testpypi dist/*
- Upload to PyPI:
twine upload dist/*
TODO
[] mapping claude code internal mcp to openai agent tools []
License
MIT
Metadata
Release files for agent-response-transformer 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agent_response_transformer-0.1.2.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_response_transformer-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.6 kB
Release files / agent_response_transformer-0.1.2.tar.gz
| Download URL | agent_response_transformer-0.1.2.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b014f9d1218313eb784486dd275c671058da1f04cc657f88dbca78fd8ecd559e
|
|
BLAKE2b-256 checksum How to use checksums |
f0209f313ea4a8076c6f728287d82d9446e3660ce0f92c32e1fedfc0f76dfba7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / agent_response_transformer-0.1.2-py3-none-any.whl
| Download URL | agent_response_transformer-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63b56fe6eb2093cf8e76da664e62b23fe4453a6291f3cd2fb801479c71b88a54
|
|
BLAKE2b-256 checksum How to use checksums |
c99adb02c13dcbcbe58ad077b8a0af49e601c0720f6d3996d81f9b5d31ade2d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|