-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "bpm-ai" | ||
version = "1.7.2" | ||
version = "1.7.3" | ||
description = "AI task automation for BPM engines." | ||
authors = ["Bennet Krause <[email protected]>"] | ||
repository = "https://github.com/holunda-io/bpm-ai" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,30 @@ async def test_translate_none(llm): | |
assert result["subject"] is None | ||
|
||
|
||
async def test_translate_image(llm): | ||
input_data = { | ||
"doc": "files/invoice.png", | ||
} | ||
llm = llm or FakeLLM( | ||
name="openai", | ||
supports_images=True, | ||
responses=[ | ||
AssistantMessage( | ||
content={"doc": "Rechnung\n\nVon:\nDEMO - Sliced Invoices\nSuite 5A-1204\n123 Somewhere Street\nYour City AZ 12345\n[email protected]\n\nRechnungsnummer: INV-3337"} | ||
) | ||
] | ||
) | ||
result = await translate_llm( | ||
llm=llm, | ||
input_data=input_data, | ||
target_language="German", | ||
) | ||
#if isinstance(llm, FakeLLM): | ||
# llm.assert_last_request_contains("[email protected]") | ||
|
||
assert "Rechnung" in result["doc"] | ||
|
||
|
||
async def test_translate_empty(llm): | ||
input_data = {} | ||
llm = llm or FakeLLM(name="openai") | ||
|