[Feature Request] Add ZeroGPU Toolkit integration
Needs Triage
### Required prerequisites
- [x] I have searched the [Issue Tracker](https://github.com/camel-ai/camel/issues) and [Discussions](https://github.com/camel-ai/camel/discussions) that this hasn't already been reported. (+1 or comment there if it has.)
- [x] Consider asking first in a [Discussion](https://github.com/camel-ai/camel/discussions/new).
### Motivation
Integrating external model providers into CAMEL currently requires custom implementations, which can limit flexibility and increase development overhead.
ZeroGPU provides lightweight and efficient APIs for multiple NLP tasks such as text generation, classification, entity extraction, and PII handling. Supporting ZeroGPU within CAMEL would expand the available model ecosystem and enable users to leverage these capabilities through a unified toolkit interface.
This feature aims to improve extensibility and provide an additional backend for common agent workflows.
### Solution
Introduce a new `ZeroGPUToolkit` that integrates ZeroGPU APIs into CAMEL.
The toolkit provides 11 tools covering:
- Chat and text generation
- Summarization
- Classification (IAB, zero-shot, structured)
- Entity extraction and structured JSON extraction
- PII extraction and redaction
Key implementation details:
- Uses direct HTTP requests to `/v1/responses`
- Follows CAMEL toolkit conventions (`BaseToolkit`, `FunctionTool`)
- Parses responses into either text or structured JSON depending on the task
- Includes full unit tests with mocked API calls
- Includes an example script demonstrating usage and ChatAgent integration
A working implementation has already been developed and will be submitted via a pull request.
### Alternatives
An alternative approach would be to integrate ZeroGPU as a model backend (similar to existing model providers). However, given the variety of task-specific endpoints and metadata requirements, implementing it as a toolkit provides a simpler and more flexible integration path.
Another option is to rely solely on existing model providers, but this would limit access to ZeroGPU-specific capabilities such as lightweight classification and PII processing.
### Additional context
- The implementation includes:
- `camel/toolkits/zerogpu_toolkit.py`
- Unit tests (`test/toolkits/test_zerogpu_toolkit.py`)
- Example script (`examples/toolkits/zerogpu_toolkit_demo.py`)
- Environment variables added:
- `ZEROGPU_API_KEY`
- `ZEROGPU_PROJECT_ID`
- `ZEROGPU_BASE_API_URL`
- All tests pass locally using mocked responses
- No additional dependencies introduced
A pull request implementing this feature will be linked to this issue.
0 条评论