Skip to content

Commit 664ee01

Browse files
Li YinLi Yin
authored andcommitted
add auto release script and the release tutorial
1 parent 0493526 commit 664ee01

6 files changed

Lines changed: 620 additions & 56 deletions

File tree

.github/workflows/release.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version to release (e.g., 1.1.2)'
11+
required: true
12+
type: string
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
id-token: write
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@v4
29+
with:
30+
python-version: '3.9'
31+
32+
- name: Install Poetry
33+
uses: snok/install-poetry@v1
34+
with:
35+
version: latest
36+
virtualenvs-create: true
37+
virtualenvs-in-project: true
38+
39+
- name: Determine version
40+
id: version
41+
run: |
42+
if [[ "${{ github.event_name }}" == "push" ]]; then
43+
VERSION=${GITHUB_REF#refs/tags/v}
44+
else
45+
VERSION=${{ github.event.inputs.version }}
46+
fi
47+
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
48+
echo "Release version: $VERSION"
49+
50+
- name: Update version in __init__.py
51+
run: |
52+
VERSION=${{ steps.version.outputs.VERSION }}
53+
sed -i "s/__version__ = \".*\"/__version__ = \"$VERSION\"/" adalflow/adalflow/__init__.py
54+
echo "Updated version to $VERSION in __init__.py"
55+
cat adalflow/adalflow/__init__.py | head -1
56+
57+
- name: Update version in pyproject.toml
58+
run: |
59+
VERSION=${{ steps.version.outputs.VERSION }}
60+
cd adalflow
61+
poetry version $VERSION
62+
echo "Updated version to $VERSION in pyproject.toml"
63+
64+
- name: Update CHANGELOG.md date
65+
run: |
66+
VERSION=${{ steps.version.outputs.VERSION }}
67+
DATE=$(date +%Y-%m-%d)
68+
sed -i "s/## \[$VERSION\] - .*/## [$VERSION] - $DATE/" adalflow/CHANGELOG.md
69+
echo "Updated CHANGELOG.md with release date $DATE"
70+
71+
- name: Commit version updates
72+
run: |
73+
git config --local user.email "action@github.com"
74+
git config --local user.name "GitHub Action"
75+
git add adalflow/adalflow/__init__.py adalflow/pyproject.toml adalflow/CHANGELOG.md
76+
git diff --staged --quiet || git commit -m "chore: bump version to ${{ steps.version.outputs.VERSION }} [skip ci]"
77+
78+
- name: Build package
79+
run: |
80+
cd adalflow
81+
poetry build
82+
83+
- name: Create GitHub Release
84+
uses: softprops/action-gh-release@v1
85+
with:
86+
tag_name: v${{ steps.version.outputs.VERSION }}
87+
name: Release v${{ steps.version.outputs.VERSION }}
88+
body: |
89+
## AdalFlow v${{ steps.version.outputs.VERSION }}
90+
91+
See [CHANGELOG.md](https://github.com/SylphAI-Inc/AdalFlow/blob/main/adalflow/CHANGELOG.md) for details.
92+
files: |
93+
adalflow/dist/*
94+
draft: false
95+
prerelease: false
96+
97+
- name: Publish to PyPI
98+
env:
99+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
100+
run: |
101+
cd adalflow
102+
poetry publish --skip-existing
103+
104+
- name: Push version updates to main
105+
if: success()
106+
run: |
107+
git push origin HEAD:main || echo "No changes to push"

adalflow/CHANGELOG.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,82 @@
11

2+
## [1.1.1] - 2025-08-11
3+
4+
### Added
5+
6+
#### Model Client Enhancements
7+
- **OpenAI Client**:
8+
- Full multimodal support for vision models (GPT-4o, GPT-4o-mini, O1, O1-mini)
9+
- Image generation capabilities via DALL-E integration (both legacy and new tools API)
10+
- Support for local images, URLs, and base64 encoded images
11+
- Reasoning model support (O1, O3) with effort configuration
12+
- Migrated to Response API for better feature support
13+
- Comprehensive streaming support for both sync and async operations
14+
15+
- **Ollama Client**:
16+
- Enhanced streaming support with proper async/sync handling
17+
- Chat API support alongside existing Generate API
18+
- GPT-OSS model integration for local reasoning capabilities
19+
- Improved error handling and connection management
20+
- Support for thinking/reasoning output extraction
21+
22+
#### Core Features
23+
- **GeneratorOutput**:
24+
- Added `save_images()` method for automatic image saving with format conversion
25+
- Support for multiple image formats (PNG, JPG, JPEG, WEBP, GIF, BMP)
26+
- Added `images` field for multimodal responses
27+
- Enhanced streaming response handling
28+
29+
- **Memory (ConversationMemory)**:
30+
- Added `clear()` method for memory management
31+
- Improved prompt rendering for chat history
32+
- Better handling of nested prompts
33+
34+
#### Documentation & Examples
35+
- Comprehensive Ollama integration guide with tutorials
36+
- OpenAI integration documentation with multimodal examples
37+
- New notebooks: `ollama_models.ipynb`, `openai_integration.ipynb`
38+
- Tutorial scripts for both Ollama and OpenAI in `tutorials/models/`
39+
- Multimodal integration tutorial
40+
41+
### Improved
42+
43+
#### Runner & Agent
44+
- **Runner**:
45+
- Enhanced error handling for `acall()`, `call()`, and streaming operations
46+
- Added cancellation logic for better control flow
47+
- Refactored `astream()` to reduce code redundancy
48+
- Improved generator input handling
49+
- Better error propagation and debugging information
50+
51+
- **Agent**:
52+
- More robust error handling and recovery
53+
- Updated prompts for better clarity
54+
- Fixed nested prompt support issues
55+
- Improved JSON output formatting and parsing
56+
57+
#### Output Parsing
58+
- JSON output parser now automatically handles JSON wrapped in markdown code blocks
59+
- Better handling of malformed JSON responses
60+
- Improved error messages for parsing failures
61+
62+
#### Testing
63+
- Comprehensive tests for image saving functionality
64+
- Enhanced Ollama client tests with streaming support
65+
- Expanded OpenAI client tests for multimodal features
66+
- Memory component tests for new functionality
67+
- Runner tests for error handling scenarios
68+
69+
### Fixed
70+
- Fixed nested prompt support by removing parentheses in agent task descriptions
71+
- Resolved streaming response handling issues in async contexts
72+
- Fixed memory rendering issues with complex conversation histories
73+
- Corrected JSON output parser for various edge cases
74+
- Fixed connection handling in Ollama client
75+
76+
### Dependencies
77+
- Updated project dependencies for better compatibility
78+
- Added support for latest OpenAI SDK features
79+
280
## [1.0.5] - Release Date TBD
381

482
# Added

docs/source/integrations/ollama.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,12 +280,6 @@ Popular models compatible with Ollama:
280280

281281
To see all available models, visit: https://ollama.com/library
282282

283-
Source Code
284-
-----------
285-
286-
- **Ollama Client**: `ollama_client.py <https://github.com/SylphAI-Inc/AdalFlow/blob/main/adalflow/adalflow/components/model_client/ollama_client.py>`_
287-
288-
289283
Resources
290284
---------
291285

0 commit comments

Comments
 (0)