Skip to content

Commit 13021df

Browse files
authored
Merge pull request #317 from SylphAI-Inc/release_0_2_7
Release 0 2 7
2 parents fe10865 + 24099c9 commit 13021df

File tree

12 files changed

+1895
-1868
lines changed

12 files changed

+1895
-1868
lines changed

.github/workflows/python-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
python-version: ['3.9', '3.10', '3.11', '3.12']
1515

1616
steps:
17-
- uses: actions/checkout@v3 # Updated to the latest version
17+
- uses: actions/checkout@v4 # Updated to the latest version
1818
- name: Set up Python ${{ matrix.python-version }}
1919
uses: actions/setup-python@v4 # Updated to the latest version
2020
with:
@@ -37,7 +37,7 @@ jobs:
3737
poetry run pytest
3838
3939
- name: Upload pytest results as an artifact (optional)
40-
uses: actions/upload-artifact@v3 # Updated to the latest version
40+
uses: actions/upload-artifact@v4 # Updated to the latest version
4141
if: always() # Always run this step to ensure test results are saved even if previous steps fail
4242
with:
4343
name: pytest-results

adalflow/CHANGELOG.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
## [0.2.7] - 2024-09-23
1+
## [0.2.7] - 2025-01-16
22

3-
### Improved
4-
- Better diagnose report for `Trainer.diagnose`.
5-
- Multi-hop RAG with handling of Cycle.
6-
7-
## [0.2.7] - TO Be Released
83
### Added
94
- `Memory` is completed with `call` and `add_dialog_turn` methods.
105
- Integrated `LanceDB` in the `Retriever`
6+
- Multi-modal (image input and generation) in `OpenAIClient` along with tests.
7+
- `ComponentList` to support a list of components registered in a component. Added `test_componentlist` to test the `ComponentList`.
8+
119
### Improved
10+
- Better diagnose report for `Trainer.diagnose`.
1211
- `BedrockAPIClient` added more details on setup, yet it is still in experimental stage.
1312
- `AzureAPIClient` added more details on setup, yet it is still in experimental stage.
13+
- `Retriever` class:
14+
- Support data id (field).
15+
- `GradComponent`: Support pass-through gradient for the `forward` method.
16+
17+
Optimization
18+
- Aggregated all backward engine prompts in `backward_engine_prompt`.
19+
- Added `TGDData` for the optimizer to support reasoning at proposing new prompt.
20+
- Added `sequential_order` in the `Trainer` to support the sequential training order. Reorganized the trainer code.
1421
## [0.2.6] - 2024-11-25
1522
### Improved
1623
- Add default `max_tokens=512` to the `AnthropicAPIClient` to avoid the error when the user does not provide the `max_tokens` in the prompt.

adalflow/adalflow/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "0.2.6"
1+
__version__ = "0.2.7"
22

33
from adalflow.core.component import Component, fun_to_component
44
from adalflow.core.container import Sequential, ComponentList

adalflow/adalflow/components/model_client/openai_client.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,19 @@ def convert_inputs_to_api_kwargs(
310310
raise ValueError("model must be specified for image generation")
311311
# Set defaults for DALL-E 3 if not specified
312312
final_model_kwargs["size"] = final_model_kwargs.get("size", "1024x1024")
313-
final_model_kwargs["quality"] = final_model_kwargs.get("quality", "standard")
313+
final_model_kwargs["quality"] = final_model_kwargs.get(
314+
"quality", "standard"
315+
)
314316
final_model_kwargs["n"] = final_model_kwargs.get("n", 1)
315-
final_model_kwargs["response_format"] = final_model_kwargs.get("response_format", "url")
317+
final_model_kwargs["response_format"] = final_model_kwargs.get(
318+
"response_format", "url"
319+
)
316320

317321
# Handle image edits and variations
318322
image = final_model_kwargs.get("image")
319323
if isinstance(image, str) and os.path.isfile(image):
320324
final_model_kwargs["image"] = self._encode_image(image)
321-
325+
322326
mask = final_model_kwargs.get("mask")
323327
if isinstance(mask, str) and os.path.isfile(mask):
324328
final_model_kwargs["mask"] = self._encode_image(mask)
@@ -340,11 +344,7 @@ def parse_image_generation_response(self, response: List[Image]) -> GeneratorOut
340344
)
341345
except Exception as e:
342346
log.error(f"Error parsing image generation response: {e}")
343-
return GeneratorOutput(
344-
data=None,
345-
error=str(e),
346-
raw_response=str(response)
347-
)
347+
return GeneratorOutput(data=None, error=str(e), raw_response=str(response))
348348

349349
@backoff.on_exception(
350350
backoff.expo,
@@ -417,7 +417,9 @@ async def acall(
417417
response = await self.async_client.images.edit(**api_kwargs)
418418
else:
419419
# Image variation
420-
response = await self.async_client.images.create_variation(**api_kwargs)
420+
response = await self.async_client.images.create_variation(
421+
**api_kwargs
422+
)
421423
else:
422424
# Image generation
423425
response = await self.async_client.images.generate(**api_kwargs)

0 commit comments

Comments
 (0)