Releases: ai-forever/gpt2giga
Releases · ai-forever/gpt2giga
v0.0.15.post1
Fix TypeError: Object of type bytes is not JSON serializable error. If the server returns an error with an empty body (just bytes b''), the program tries to save this error in JSON to show it, but "forgets" to turn the bytes into a string, which causes the program to crash.
What's Changed
- bugfix: fix exceptions handler decoding from bytes (#47) by @mmkolpakov in #48
Full Changelog: v0.0.15...v0.0.15.post1
v0.0.15
Improvements in file and attachment processing:
- The image upload logic in gpt2giga/protocol.py has been redesigned into a more versatile asynchronous method upload_file, which now supports both images and other file types (e.g., PDF).
Asynchronous refactoring:
- Key methods in gpt2giga/protocol.py have been converted to asynchronous, including transform_messages, _process_content_parts, and send_to_gigachat.
API and middleware improvements:
- Updated the FastAPI application creation in gpt2giga/api_server.py to support an optional configuration parameter.
Examples:
- Added a new example examples/chat_completions/documents.py, demonstrating how to send a PDF file as a base64-encoded attachment.
v0.0.14.post1
What's Changed
CI/CD and Automation Enhancements:
- Added a GitHub Actions workflow for continuous integration, including linting, formatting, test coverage reporting, and badge generation.
- Introduced a separate workflow for building Docker images across multiple Python versions.
Configuration and Environment Improvements:
- Updated
.env.exampleto use new, consistent proxy and GigaChat environment variable names (e.g.,GPT2GIGA_HOST,GPT2GIGA_PORT), and added new options for HTTPS, logging, and timeouts. - Modified
docker-compose.yamlto support configurable port and Python version via build args and environment variables. - Added a script for generating self-signed certificates for HTTPS support. (.certs/generate_cert)
Security and API Key Authentication:
- Added support for API key authentication, allowing endpoints to be protected via an API key. This includes new environment variables (
GPT2GIGA_ENABLE_API_KEY_AUTH,GPT2GIGA_API_KEY), CLI arguments, and documentation/examples for enabling and using API key protection.
Logging and Configuration Enhancements:
- Expanded logging options with new environment variables and CLI arguments for log file name, log max size, and log level, and improved logger setup in the codebase.
Documentation Updates:
- Overhauled the
README.mdto reflect new configuration options, clarify the distinction between proxy and GigaChat settings, and add CI, license, and coverage badges. - Updated the Dockerfile to support dynamic Python version selection and optimized dependency installation.
Examples and Usage:
- Added multiple new example scripts demonstrating chat completions, function calling, structured output (including nested responses), image handling (both URL and base64), embeddings, model listing/retrieval, and integration with OpenAI agent frameworks.
App changes
- Rewrite to FastAPI for better maintainability
- add examples with OpenAI client (models, chat completions, chat with image, embeddings)
- add example to work with OpenAI Agents SDK( https://openai.github.io/openai-agents-python/)
- add HTTPS protocol
- Better exceptions handler
- Add redirect middleware e.g
/api/v1/embeddings -> /v1/embeddings/
/some_prefix/another_prefix/v1/... -> /v1/...
BETA
- add Structured Output (chat.completions.parse)
- Add Responses API compatibility
- Add response format (json_schema, text)
v0.0.13
What's Changed
- Fix validation error for developer role by @nepshaaa in #27
- docker compose changes by @RakhimovRamis in #9
New Contributors
- @nepshaaa made their first contribution in #27
- @RakhimovRamis made their first contribution in #9
Full Changelog: v0.0.12...v0.0.13
v0.0.12
Full Changelog: https://github.com/ai-forever/gpt2giga/commits/v0.0.12